@zanichelli/albe-web-components 18.7.5 → 18.7.6-RC
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/cjs/z-result-card.cjs.entry.js +3 -2
- package/dist/cjs/z-result-card.cjs.entry.js.map +1 -1
- package/dist/collection/components/result-card/z-result-card/index.js +2 -1
- package/dist/collection/components/result-card/z-result-card/index.js.map +1 -1
- package/dist/collection/components/result-card/z-result-card/styles.css +9 -10
- package/dist/components/z-result-card.js +3 -2
- package/dist/components/z-result-card.js.map +1 -1
- package/dist/esm/z-result-card.entry.js +3 -2
- package/dist/esm/z-result-card.entry.js.map +1 -1
- package/dist/web-components-library/p-7dfa3d66.entry.js +2 -0
- package/dist/web-components-library/p-7dfa3d66.entry.js.map +1 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/{p-2c9a489d.js → p-7894658c.js} +1 -1
- package/www/build/p-7dfa3d66.entry.js +2 -0
- package/www/build/p-7dfa3d66.entry.js.map +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/web-components-library/p-ae6604b8.entry.js +0 -2
- package/dist/web-components-library/p-ae6604b8.entry.js.map +0 -1
- package/www/build/p-ae6604b8.entry.js +0 -2
- package/www/build/p-ae6604b8.entry.js.map +0 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-96af6326.js');
|
|
6
6
|
const placeholderCover = require('./placeholder-cover-b679e768.js');
|
|
7
7
|
|
|
8
|
-
const stylesCss = ":host{display:flex;overflow:hidden;min-width:0;height:calc(
|
|
8
|
+
const stylesCss = ":host{display:flex;overflow:hidden;min-width:0;height:calc(10.88rem - var(--space-unit) * 2);max-height:calc(10.88rem - var(--space-unit) * 2);padding:var(--space-unit);border:var(--border-size-medium) solid var(--color-surface02);background-color:var(--color-white);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}.z-cover-container{position:relative;display:flex;width:119px;height:158px;align-items:center;justify-items:center}.z-cover-stack{width:100%;height:100%}.z-cover-shadow,.z-cover-img{width:117px;height:156px}.z-cover-container.has-multiple .z-cover-shadow,.z-cover-container.has-multiple .z-cover-img{width:105px;height:140px}.z-cover-shadow{position:absolute;z-index:1;background-color:var(--color-white)}.z-shadow-1{z-index:0;top:var(--space-unit);right:6px;border:var(--border-size-small) solid black}.z-shadow-2{z-index:0;top:calc(var(--space-unit) * 2);right:12px;border:var(--border-size-small) solid black}.z-cover-img{position:absolute;z-index:0;top:0;right:0;display:flex;align-items:start;justify-content:center;border:var(--border-size-small) solid black;background-color:var(--color-white);object-fit:cover;object-position:left}.z-cover-img>img{max-width:100%;max-height:100%}.z-cover-container.has-multiple .z-cover-img{left:12px}: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)}.authors-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;-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.5;word-break:break-word}.card-title>*{all:unset}.card-subtitle{overflow:hidden;color:var(--color-default-text);text-overflow:ellipsis;white-space:nowrap}.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}.tags-container{display:flex;max-width:100%;flex-wrap:wrap;margin-top:calc(var(--space-unit) * 2);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;height:calc(4.75rem - var(--space-unit) * 2);max-height:calc(4.75rem - var(--space-unit) * 2);gap:calc(var(--space-unit) * 1.5)}:host(.info-card) .info-container{padding-left:0}.info-icon-container{display:flex;width:34px;height:34px;align-items:center;justify-content:center;margin-bottom:calc(var(--space-unit) * 3);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}.info-icon{width:18px;height:18px;color:var(--color-default-text)}@media (max-width: 768px){.card-title{display:block;overflow:hidden;line-height:normal;text-overflow:ellipsis;white-space:nowrap}}";
|
|
9
9
|
const ZResultCardStyle0 = stylesCss;
|
|
10
10
|
|
|
11
11
|
const ZResultCard = class {
|
|
@@ -28,7 +28,8 @@ const ZResultCard = class {
|
|
|
28
28
|
} })))), index.h("div", { class: "info-container" }, this.authors && (index.h("span", { class: "authors-label", ref: (el) => (this.authorsRef = el) }, this.authors)), index.h("div", { class: "card-title", ref: (el) => (this.titleRef = el), innerHTML: title }), index.h("span", { class: "card-subtitle", ref: (el) => (this.subtitleRef = el) }, this.cardSubtitle), index.h("div", { class: "tags-container" }, index.h("slot", { name: "tags" })), index.h("div", { class: "volumes-label" }, index.h("slot", { name: "volumes" })))));
|
|
29
29
|
};
|
|
30
30
|
this.renderInfoCard = () => {
|
|
31
|
-
|
|
31
|
+
const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;
|
|
32
|
+
return (index.h(index.Host, { tabIndex: 0, class: "info-card" }, index.h("div", { class: "info-icon-column" }, index.h("div", { class: "info-icon-container" }, index.h("z-icon", { class: "info-icon", name: "link", width: 18, height: 18 }))), index.h("div", { class: "info-container" }, index.h("span", { class: "card-title info-title", ref: (el) => (this.titleRef = el), innerHTML: title }), index.h("span", { class: "card-subtitle info-subtitle", ref: (el) => (this.subtitleRef = el) }, this.cardSubtitle))));
|
|
32
33
|
};
|
|
33
34
|
this.cardTitle = undefined;
|
|
34
35
|
this.cardSubtitle = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"z-result-card.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,SAAS,GAAG,i2GAAi2G,CAAC;AACp3G,0BAAe,SAAS;;MCOX,WAAW;;;QA8Fd,kBAAa,GAAG;YACtB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACxC,CAAC;QAUM,oBAAe,GAAG;YACxB,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,YAAY,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC;YAEpH,QACEA,QAACC,UAAI,IAAC,QAAQ,EAAE,CAAC,IACfD,iBAAK,KAAK,EAAE,qBAAqB,IAAI,CAAC,iBAAiB,GAAG,cAAc,GAAG,EAAE,EAAE,IAC7EA,iBAAK,KAAK,EAAC,eAAe,IACvB,IAAI,CAAC,iBAAiB,KACrBA,qBACEA,iBAAK,KAAK,EAAC,2BAA2B,GAAG,EACzCA,iBAAK,KAAK,EAAC,2BAA2B,GAAG,CACrC,CACP,EACDA,iBAAK,KAAK,EAAC,aAAa,IACtBA,iBACE,GAAG,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,IAAIE,oBAAoB,EAC7D,GAAG,EAAC,EAAE,EACN,OAAO,EAAE;oBACP,IAAI,IAAI,CAAC,aAAa,EAAE;wBACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC;qBACjC;yBAAM;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AAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KACvD;IAED,oBAAoB;QAClB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KAC1D;IA+FD,MAAM;QACJ,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;KACzE;;;;;;;","names":["h","Host","defaultFallbackCover"],"sources":["src/components/result-card/z-result-card/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 min-width: 0;\n height: calc(174px - var(--space-unit) * 2);\n max-height: calc(174px - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) 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.z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-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: 117px;\n height: 156px;\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: 105px;\n height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 0;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 0;\n top: 0;\n right: 0;\n display: flex;\n align-items: start;\n justify-content: center;\n border: var(--border-size-small) solid black;\n background-color: var(--color-white);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-img > img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\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.authors-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 -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.5;\n word-break: break-word;\n}\n\n.card-title > * {\n all: unset;\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.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.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\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 height: calc(76px - var(--space-unit) * 2);\n max-height: calc(76px - var(--space-unit) * 2);\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) * 3);\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.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 line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n >\n {this.cardTitle}\n </span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"z-result-card.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,SAAS,GAAG,o4GAAo4G,CAAC;AACv5G,0BAAe,SAAS;;MCOX,WAAW;;;QA8Fd,kBAAa,GAAG;YACtB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACxC,CAAC;QAUM,oBAAe,GAAG;YACxB,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,SAAS,KAAK,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,UAAU,CAAC,CAAC;YAC9C,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC;YACxE,MAAM,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;YAExC,WAAW,GAAG,EAAE,CAAC,YAAY,GAAG,SAAS,CAAC;SAC3C;aAAM;;YAEL,WAAW,GAAG,EAAE,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW,IAAI,EAAE,CAAC,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC;SACpF;QAED,IAAI,WAAW,EAAE;YACf,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;SACjD;aAAM;YACL,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SAC7B;KACF;IAED,kBAAkB;QAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KACxC;IAQD,gBAAgB;QACd,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KACvD;IAED,oBAAoB;QAClB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KAC1D;IAgGD,MAAM;QACJ,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;KACzE;;;;;;;","names":["h","Host","defaultFallbackCover"],"sources":["src/components/result-card/z-result-card/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 min-width: 0;\n height: calc(10.88rem - var(--space-unit) * 2);\n max-height: calc(10.88rem - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) solid var(--color-surface02);\n background-color: var(--color-white);\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.z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-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: 117px;\n height: 156px;\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: 105px;\n height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 0;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 0;\n top: 0;\n right: 0;\n display: flex;\n align-items: start;\n justify-content: center;\n border: var(--border-size-small) solid black;\n background-color: var(--color-white);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-img > img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\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.authors-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 -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.5;\n word-break: break-word;\n}\n\n.card-title > * {\n all: unset;\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.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.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\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/* variant info-card */\n:host(.info-card) {\n display: flex;\n height: calc(4.75rem - var(--space-unit) * 2);\n max-height: calc(4.75rem - var(--space-unit) * 2);\n gap: calc(var(--space-unit) * 1.5);\n}\n\n:host(.info-card) .info-container {\n padding-left: 0;\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) * 3);\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.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 line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"version":3}
|
|
@@ -19,7 +19,8 @@ export class ZResultCard {
|
|
|
19
19
|
} })))), h("div", { class: "info-container" }, this.authors && (h("span", { class: "authors-label", ref: (el) => (this.authorsRef = el) }, this.authors)), h("div", { class: "card-title", ref: (el) => (this.titleRef = el), innerHTML: title }), h("span", { class: "card-subtitle", ref: (el) => (this.subtitleRef = el) }, this.cardSubtitle), h("div", { class: "tags-container" }, h("slot", { name: "tags" })), h("div", { class: "volumes-label" }, h("slot", { name: "volumes" })))));
|
|
20
20
|
};
|
|
21
21
|
this.renderInfoCard = () => {
|
|
22
|
-
|
|
22
|
+
const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;
|
|
23
|
+
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("span", { class: "card-title info-title", ref: (el) => (this.titleRef = el), innerHTML: title }), h("span", { class: "card-subtitle info-subtitle", ref: (el) => (this.subtitleRef = el) }, this.cardSubtitle))));
|
|
23
24
|
};
|
|
24
25
|
this.cardTitle = undefined;
|
|
25
26
|
this.cardSubtitle = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version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N,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAQD,gBAAgB;QACd,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACxD,CAAC;IAED,oBAAoB;QAClB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3D,CAAC;IA+FD,MAAM;QACJ,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;IAC1E,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n >\n {this.cardTitle}\n </span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/result-card/z-result-card/index.tsx"],"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C;YAChB,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QAClD,CAAC;aAAM,CAAC;YACN,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAQD,gBAAgB;QACd,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACxD,CAAC;IAED,oBAAoB;QAClB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3D,CAAC;IAgGD,MAAM;QACJ,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;IAC1E,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"]}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
min-width: 0;
|
|
5
|
-
height: calc(
|
|
6
|
-
max-height: calc(
|
|
5
|
+
height: calc(10.88rem - var(--space-unit) * 2);
|
|
6
|
+
max-height: calc(10.88rem - var(--space-unit) * 2);
|
|
7
7
|
padding: var(--space-unit);
|
|
8
8
|
border: var(--border-size-medium) solid var(--color-surface02);
|
|
9
|
+
background-color: var(--color-white);
|
|
9
10
|
border-radius: var(--border-size-large);
|
|
10
11
|
cursor: pointer;
|
|
11
12
|
font-family: var(--font-family-sans);
|
|
@@ -163,18 +164,16 @@
|
|
|
163
164
|
font-size: var(--font-size-1);
|
|
164
165
|
}
|
|
165
166
|
|
|
167
|
+
/* variant info-card */
|
|
166
168
|
:host(.info-card) {
|
|
167
169
|
display: flex;
|
|
168
|
-
height: calc(
|
|
169
|
-
max-height: calc(
|
|
170
|
+
height: calc(4.75rem - var(--space-unit) * 2);
|
|
171
|
+
max-height: calc(4.75rem - var(--space-unit) * 2);
|
|
172
|
+
gap: calc(var(--space-unit) * 1.5);
|
|
170
173
|
}
|
|
171
174
|
|
|
172
|
-
.info-
|
|
173
|
-
|
|
174
|
-
width: 50px;
|
|
175
|
-
height: 100%;
|
|
176
|
-
align-items: center;
|
|
177
|
-
justify-content: center;
|
|
175
|
+
:host(.info-card) .info-container {
|
|
176
|
+
padding-left: 0;
|
|
178
177
|
}
|
|
179
178
|
|
|
180
179
|
.info-icon-container {
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
import { i as img } from './placeholder-cover.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './index9.js';
|
|
4
4
|
|
|
5
|
-
const stylesCss = ":host{display:flex;overflow:hidden;min-width:0;height:calc(
|
|
5
|
+
const stylesCss = ":host{display:flex;overflow:hidden;min-width:0;height:calc(10.88rem - var(--space-unit) * 2);max-height:calc(10.88rem - var(--space-unit) * 2);padding:var(--space-unit);border:var(--border-size-medium) solid var(--color-surface02);background-color:var(--color-white);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}.z-cover-container{position:relative;display:flex;width:119px;height:158px;align-items:center;justify-items:center}.z-cover-stack{width:100%;height:100%}.z-cover-shadow,.z-cover-img{width:117px;height:156px}.z-cover-container.has-multiple .z-cover-shadow,.z-cover-container.has-multiple .z-cover-img{width:105px;height:140px}.z-cover-shadow{position:absolute;z-index:1;background-color:var(--color-white)}.z-shadow-1{z-index:0;top:var(--space-unit);right:6px;border:var(--border-size-small) solid black}.z-shadow-2{z-index:0;top:calc(var(--space-unit) * 2);right:12px;border:var(--border-size-small) solid black}.z-cover-img{position:absolute;z-index:0;top:0;right:0;display:flex;align-items:start;justify-content:center;border:var(--border-size-small) solid black;background-color:var(--color-white);object-fit:cover;object-position:left}.z-cover-img>img{max-width:100%;max-height:100%}.z-cover-container.has-multiple .z-cover-img{left:12px}: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)}.authors-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;-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.5;word-break:break-word}.card-title>*{all:unset}.card-subtitle{overflow:hidden;color:var(--color-default-text);text-overflow:ellipsis;white-space:nowrap}.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}.tags-container{display:flex;max-width:100%;flex-wrap:wrap;margin-top:calc(var(--space-unit) * 2);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;height:calc(4.75rem - var(--space-unit) * 2);max-height:calc(4.75rem - var(--space-unit) * 2);gap:calc(var(--space-unit) * 1.5)}:host(.info-card) .info-container{padding-left:0}.info-icon-container{display:flex;width:34px;height:34px;align-items:center;justify-content:center;margin-bottom:calc(var(--space-unit) * 3);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}.info-icon{width:18px;height:18px;color:var(--color-default-text)}@media (max-width: 768px){.card-title{display:block;overflow:hidden;line-height:normal;text-overflow:ellipsis;white-space:nowrap}}";
|
|
6
6
|
const ZResultCardStyle0 = stylesCss;
|
|
7
7
|
|
|
8
8
|
const ZResultCard$1 = /*@__PURE__*/ proxyCustomElement(class ZResultCard extends HTMLElement {
|
|
@@ -27,7 +27,8 @@ const ZResultCard$1 = /*@__PURE__*/ proxyCustomElement(class ZResultCard extends
|
|
|
27
27
|
} })))), h("div", { class: "info-container" }, this.authors && (h("span", { class: "authors-label", ref: (el) => (this.authorsRef = el) }, this.authors)), h("div", { class: "card-title", ref: (el) => (this.titleRef = el), innerHTML: title }), h("span", { class: "card-subtitle", ref: (el) => (this.subtitleRef = el) }, this.cardSubtitle), h("div", { class: "tags-container" }, h("slot", { name: "tags" })), h("div", { class: "volumes-label" }, h("slot", { name: "volumes" })))));
|
|
28
28
|
};
|
|
29
29
|
this.renderInfoCard = () => {
|
|
30
|
-
|
|
30
|
+
const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;
|
|
31
|
+
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("span", { class: "card-title info-title", ref: (el) => (this.titleRef = el), innerHTML: title }), h("span", { class: "card-subtitle info-subtitle", ref: (el) => (this.subtitleRef = el) }, this.cardSubtitle))));
|
|
31
32
|
};
|
|
32
33
|
this.cardTitle = undefined;
|
|
33
34
|
this.cardSubtitle = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"z-result-card.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,i2GAAi2G,CAAC;AACp3G,0BAAe,SAAS;;MCOXA,aAAW;;;;;QA8Fd,kBAAa,GAAG;YACtB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACxC,CAAC;QAUM,oBAAe,GAAG;YACxB,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,YAAY,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC;YAEpH,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,WAAK,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CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KACxC;IAQD,gBAAgB;QACd,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KACvD;IAED,oBAAoB;QAClB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KAC1D;IA+FD,MAAM;QACJ,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;KACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ZResultCard","defaultFallbackCover"],"sources":["src/components/result-card/z-result-card/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 min-width: 0;\n height: calc(174px - var(--space-unit) * 2);\n max-height: calc(174px - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) 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.z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-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: 117px;\n height: 156px;\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: 105px;\n height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 0;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 0;\n top: 0;\n right: 0;\n display: flex;\n align-items: start;\n justify-content: center;\n border: var(--border-size-small) solid black;\n background-color: var(--color-white);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-img > img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\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.authors-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 -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.5;\n word-break: break-word;\n}\n\n.card-title > * {\n all: unset;\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.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.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\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 height: calc(76px - var(--space-unit) * 2);\n max-height: calc(76px - var(--space-unit) * 2);\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) * 3);\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.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 line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n >\n {this.cardTitle}\n </span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"z-result-card.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,o4GAAo4G,CAAC;AACv5G,0BAAe,SAAS;;MCOXA,aAAW;;;;;QA8Fd,kBAAa,GAAG;YACtB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtC,IAAI,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ZResultCard","defaultFallbackCover"],"sources":["src/components/result-card/z-result-card/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 min-width: 0;\n height: calc(10.88rem - var(--space-unit) * 2);\n max-height: calc(10.88rem - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) solid var(--color-surface02);\n background-color: var(--color-white);\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.z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-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: 117px;\n height: 156px;\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: 105px;\n height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 0;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 0;\n top: 0;\n right: 0;\n display: flex;\n align-items: start;\n justify-content: center;\n border: var(--border-size-small) solid black;\n background-color: var(--color-white);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-img > img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\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.authors-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 -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.5;\n word-break: break-word;\n}\n\n.card-title > * {\n all: unset;\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.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.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\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/* variant info-card */\n:host(.info-card) {\n display: flex;\n height: calc(4.75rem - var(--space-unit) * 2);\n max-height: calc(4.75rem - var(--space-unit) * 2);\n gap: calc(var(--space-unit) * 1.5);\n}\n\n:host(.info-card) .info-container {\n padding-left: 0;\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) * 3);\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.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 line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-c8ceadeb.js';
|
|
2
2
|
import { i as img } from './placeholder-cover-9346be8f.js';
|
|
3
3
|
|
|
4
|
-
const stylesCss = ":host{display:flex;overflow:hidden;min-width:0;height:calc(
|
|
4
|
+
const stylesCss = ":host{display:flex;overflow:hidden;min-width:0;height:calc(10.88rem - var(--space-unit) * 2);max-height:calc(10.88rem - var(--space-unit) * 2);padding:var(--space-unit);border:var(--border-size-medium) solid var(--color-surface02);background-color:var(--color-white);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}.z-cover-container{position:relative;display:flex;width:119px;height:158px;align-items:center;justify-items:center}.z-cover-stack{width:100%;height:100%}.z-cover-shadow,.z-cover-img{width:117px;height:156px}.z-cover-container.has-multiple .z-cover-shadow,.z-cover-container.has-multiple .z-cover-img{width:105px;height:140px}.z-cover-shadow{position:absolute;z-index:1;background-color:var(--color-white)}.z-shadow-1{z-index:0;top:var(--space-unit);right:6px;border:var(--border-size-small) solid black}.z-shadow-2{z-index:0;top:calc(var(--space-unit) * 2);right:12px;border:var(--border-size-small) solid black}.z-cover-img{position:absolute;z-index:0;top:0;right:0;display:flex;align-items:start;justify-content:center;border:var(--border-size-small) solid black;background-color:var(--color-white);object-fit:cover;object-position:left}.z-cover-img>img{max-width:100%;max-height:100%}.z-cover-container.has-multiple .z-cover-img{left:12px}: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)}.authors-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;-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.5;word-break:break-word}.card-title>*{all:unset}.card-subtitle{overflow:hidden;color:var(--color-default-text);text-overflow:ellipsis;white-space:nowrap}.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}.tags-container{display:flex;max-width:100%;flex-wrap:wrap;margin-top:calc(var(--space-unit) * 2);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;height:calc(4.75rem - var(--space-unit) * 2);max-height:calc(4.75rem - var(--space-unit) * 2);gap:calc(var(--space-unit) * 1.5)}:host(.info-card) .info-container{padding-left:0}.info-icon-container{display:flex;width:34px;height:34px;align-items:center;justify-content:center;margin-bottom:calc(var(--space-unit) * 3);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}.info-icon{width:18px;height:18px;color:var(--color-default-text)}@media (max-width: 768px){.card-title{display:block;overflow:hidden;line-height:normal;text-overflow:ellipsis;white-space:nowrap}}";
|
|
5
5
|
const ZResultCardStyle0 = stylesCss;
|
|
6
6
|
|
|
7
7
|
const ZResultCard = class {
|
|
@@ -24,7 +24,8 @@ const ZResultCard = class {
|
|
|
24
24
|
} })))), h("div", { class: "info-container" }, this.authors && (h("span", { class: "authors-label", ref: (el) => (this.authorsRef = el) }, this.authors)), h("div", { class: "card-title", ref: (el) => (this.titleRef = el), innerHTML: title }), h("span", { class: "card-subtitle", ref: (el) => (this.subtitleRef = el) }, this.cardSubtitle), h("div", { class: "tags-container" }, h("slot", { name: "tags" })), h("div", { class: "volumes-label" }, h("slot", { name: "volumes" })))));
|
|
25
25
|
};
|
|
26
26
|
this.renderInfoCard = () => {
|
|
27
|
-
|
|
27
|
+
const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;
|
|
28
|
+
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("span", { class: "card-title info-title", ref: (el) => (this.titleRef = el), innerHTML: title }), h("span", { class: "card-subtitle info-subtitle", ref: (el) => (this.subtitleRef = el) }, this.cardSubtitle))));
|
|
28
29
|
};
|
|
29
30
|
this.cardTitle = undefined;
|
|
30
31
|
this.cardSubtitle = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"z-result-card.entry.js","mappings":";;;AAAA,MAAM,SAAS,GAAG,i2GAAi2G,CAAC;AACp3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/result-card/z-result-card/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 min-width: 0;\n height: calc(174px - var(--space-unit) * 2);\n max-height: calc(174px - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) 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.z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-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: 117px;\n height: 156px;\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: 105px;\n height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 0;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 0;\n top: 0;\n right: 0;\n display: flex;\n align-items: start;\n justify-content: center;\n border: var(--border-size-small) solid black;\n background-color: var(--color-white);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-img > img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\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.authors-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 -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.5;\n word-break: break-word;\n}\n\n.card-title > * {\n all: unset;\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.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.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\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 height: calc(76px - var(--space-unit) * 2);\n max-height: calc(76px - var(--space-unit) * 2);\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) * 3);\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.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 line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n >\n {this.cardTitle}\n </span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"z-result-card.entry.js","mappings":";;;AAAA,MAAM,SAAS,GAAG,o4GAAo4G,CAAC;AACv5G,0BAAe,SAAS;;MCOX,WAAW;;;QA8Fd,kBAAa,GAAG;YACtB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACxC,CAAC;QAUM,oBAAe,GAAG;YACxB,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,YAAY,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC;YAEpH,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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AAE,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;SACjD;aAAM;YACL,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SAC7B;KACF;IAED,kBAAkB;QAChB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KACxC;IAQD,gBAAgB;QACd,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KACvD;IAED,oBAAoB;QAClB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KAC1D;IAgGD,MAAM;QACJ,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;KACzE;;;;;;;","names":["defaultFallbackCover"],"sources":["src/components/result-card/z-result-card/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 min-width: 0;\n height: calc(10.88rem - var(--space-unit) * 2);\n max-height: calc(10.88rem - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) solid var(--color-surface02);\n background-color: var(--color-white);\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.z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-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: 117px;\n height: 156px;\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: 105px;\n height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 0;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 0;\n top: 0;\n right: 0;\n display: flex;\n align-items: start;\n justify-content: center;\n border: var(--border-size-small) solid black;\n background-color: var(--color-white);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-img > img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\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.authors-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 -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.5;\n word-break: break-word;\n}\n\n.card-title > * {\n all: unset;\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.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.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\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/* variant info-card */\n:host(.info-card) {\n display: flex;\n height: calc(4.75rem - var(--space-unit) * 2);\n max-height: calc(4.75rem - var(--space-unit) * 2);\n gap: calc(var(--space-unit) * 1.5);\n}\n\n:host(.info-card) .info-container {\n padding-left: 0;\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) * 3);\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.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 line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as i,h as e,a as t,g as o}from"./p-75c4a726.js";import{i as s}from"./p-8d923a1d.js";const a=":host{display:flex;overflow:hidden;min-width:0;height:calc(10.88rem - var(--space-unit) * 2);max-height:calc(10.88rem - var(--space-unit) * 2);padding:var(--space-unit);border:var(--border-size-medium) solid var(--color-surface02);background-color:var(--color-white);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}.z-cover-container{position:relative;display:flex;width:119px;height:158px;align-items:center;justify-items:center}.z-cover-stack{width:100%;height:100%}.z-cover-shadow,.z-cover-img{width:117px;height:156px}.z-cover-container.has-multiple .z-cover-shadow,.z-cover-container.has-multiple .z-cover-img{width:105px;height:140px}.z-cover-shadow{position:absolute;z-index:1;background-color:var(--color-white)}.z-shadow-1{z-index:0;top:var(--space-unit);right:6px;border:var(--border-size-small) solid black}.z-shadow-2{z-index:0;top:calc(var(--space-unit) * 2);right:12px;border:var(--border-size-small) solid black}.z-cover-img{position:absolute;z-index:0;top:0;right:0;display:flex;align-items:start;justify-content:center;border:var(--border-size-small) solid black;background-color:var(--color-white);object-fit:cover;object-position:left}.z-cover-img>img{max-width:100%;max-height:100%}.z-cover-container.has-multiple .z-cover-img{left:12px}: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)}.authors-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;-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.5;word-break:break-word}.card-title>*{all:unset}.card-subtitle{overflow:hidden;color:var(--color-default-text);text-overflow:ellipsis;white-space:nowrap}.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}.tags-container{display:flex;max-width:100%;flex-wrap:wrap;margin-top:calc(var(--space-unit) * 2);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;height:calc(4.75rem - var(--space-unit) * 2);max-height:calc(4.75rem - var(--space-unit) * 2);gap:calc(var(--space-unit) * 1.5)}:host(.info-card) .info-container{padding-left:0}.info-icon-container{display:flex;width:34px;height:34px;align-items:center;justify-content:center;margin-bottom:calc(var(--space-unit) * 3);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}.info-icon{width:18px;height:18px;color:var(--color-default-text)}@media (max-width: 768px){.card-title{display:block;overflow:hidden;line-height:normal;text-overflow:ellipsis;white-space:nowrap}}";const r=a;const n=class{constructor(o){i(this,o);this.resizeHandler=()=>{this.setTooltipTitle(this.authorsRef);this.setTooltipTitle(this.titleRef);this.setTooltipTitle(this.subtitleRef)};this.renderOperaCard=()=>{const i=this.titleHtmlTag?`<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>`:this.cardTitle;return e(t,{tabIndex:0},e("div",{class:`z-cover-container ${this.hasMultipleCovers?"has-multiple":""}`},e("div",{class:"z-cover-stack"},this.hasMultipleCovers&&e("div",null,e("div",{class:"z-cover-shadow z-shadow-2"}),e("div",{class:"z-cover-shadow z-shadow-1"})),e("div",{class:"z-cover-img"},e("img",{src:this.cover||this.fallbackCover||s,alt:"",onError:()=>{if(this.fallbackCover){this.cover=this.fallbackCover}else{this.cover=s}}})))),e("div",{class:"info-container"},this.authors&&e("span",{class:"authors-label",ref:i=>this.authorsRef=i},this.authors),e("div",{class:"card-title",ref:i=>this.titleRef=i,innerHTML:i}),e("span",{class:"card-subtitle",ref:i=>this.subtitleRef=i},this.cardSubtitle),e("div",{class:"tags-container"},e("slot",{name:"tags"})),e("div",{class:"volumes-label"},e("slot",{name:"volumes"}))))};this.renderInfoCard=()=>{const i=this.titleHtmlTag?`<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>`:this.cardTitle;return e(t,{tabIndex:0,class:"info-card"},e("div",{class:"info-icon-column"},e("div",{class:"info-icon-container"},e("z-icon",{class:"info-icon",name:"link",width:18,height:18}))),e("div",{class:"info-container"},e("span",{class:"card-title info-title",ref:i=>this.titleRef=i,innerHTML:i}),e("span",{class:"card-subtitle info-subtitle",ref:i=>this.subtitleRef=i},this.cardSubtitle)))};this.cardTitle=undefined;this.cardSubtitle=undefined;this.authors=undefined;this.cover=undefined;this.fallbackCover=undefined;this.hasMultipleCovers=false;this.isInfoCard=false;this.titleHtmlTag=undefined}setTooltipTitle(i){if(!i){return}const e=window.getComputedStyle(i);const t=e.getPropertyValue("-webkit-line-clamp")!=="none";let o;if(t){const t=parseInt(e.lineHeight);const s=parseInt(e.getPropertyValue("-webkit-line-clamp"));const a=t*s;o=i.scrollHeight>a}else{o=i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight}if(o){i.setAttribute("title",i.textContent.trim())}else{i.removeAttribute("title")}}componentDidRender(){this.setTooltipTitle(this.authorsRef);this.setTooltipTitle(this.titleRef);this.setTooltipTitle(this.subtitleRef)}componentDidLoad(){window.addEventListener("resize",this.resizeHandler)}disconnectedCallback(){window.removeEventListener("resize",this.resizeHandler)}render(){return this.isInfoCard?this.renderInfoCard():this.renderOperaCard()}get hostElement(){return o(this)}};n.style=r;export{n as z_result_card};
|
|
2
|
+
//# sourceMappingURL=p-7dfa3d66.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stylesCss","ZResultCardStyle0","ZResultCard","this","resizeHandler","setTooltipTitle","authorsRef","titleRef","subtitleRef","renderOperaCard","title","titleHtmlTag","cardTitle","h","Host","tabIndex","class","hasMultipleCovers","src","cover","fallbackCover","defaultFallbackCover","alt","onError","authors","ref","el","innerHTML","cardSubtitle","name","renderInfoCard","width","height","style","window","getComputedStyle","hasLineClamp","getPropertyValue","isTruncated","lineHeight","parseInt","maxLines","maxHeight","scrollHeight","scrollWidth","clientWidth","clientHeight","setAttribute","textContent","trim","removeAttribute","componentDidRender","componentDidLoad","addEventListener","disconnectedCallback","removeEventListener","render","isInfoCard"],"sources":["src/components/result-card/z-result-card/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 min-width: 0;\n height: calc(10.88rem - var(--space-unit) * 2);\n max-height: calc(10.88rem - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) solid var(--color-surface02);\n background-color: var(--color-white);\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.z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-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: 117px;\n height: 156px;\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: 105px;\n height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 0;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 0;\n top: 0;\n right: 0;\n display: flex;\n align-items: start;\n justify-content: center;\n border: var(--border-size-small) solid black;\n background-color: var(--color-white);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-img > img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\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.authors-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 -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.5;\n word-break: break-word;\n}\n\n.card-title > * {\n all: unset;\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.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.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\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/* variant info-card */\n:host(.info-card) {\n display: flex;\n height: calc(4.75rem - var(--space-unit) * 2);\n max-height: calc(4.75rem - var(--space-unit) * 2);\n gap: calc(var(--space-unit) * 1.5);\n}\n\n:host(.info-card) .info-container {\n padding-left: 0;\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) * 3);\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.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 line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAY,q4GAClB,MAAAC,EAAeD,E,MCOFE,EAAW,M,yBA8FdC,KAAAC,cAAgB,KACtBD,KAAKE,gBAAgBF,KAAKG,YAC1BH,KAAKE,gBAAgBF,KAAKI,UAC1BJ,KAAKE,gBAAgBF,KAAKK,YAAY,EAWhCL,KAAAM,gBAAkB,KACxB,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EG,MAAM,wBACNS,IAAMC,GAAQvB,KAAKI,SAAWmB,EAC9BC,UAAWjB,IAEbG,EAAA,QACEG,MAAM,8BACNS,IAAMC,GAAQvB,KAAKK,YAAckB,GAEhCvB,KAAKyB,eAGL,E,qJAjKS,M,gBAOP,M,4BAeL,eAAAvB,CAAgBqB,GACtB,IAAKA,EAAI,CACP,M,CAIF,MAAMO,EAAQC,OAAOC,iBAAiBT,GACtC,MAAMU,EAAeH,EAAMI,iBAAiB,wBAA0B,OAEtE,IAAIC,EACJ,GAAIF,EAAc,CAEhB,MAAMG,EAAaC,SAASP,EAAMM,YAClC,MAAME,EAAWD,SAASP,EAAMI,iBAAiB,uBACjD,MAAMK,EAAYH,EAAaE,EAE/BH,EAAcZ,EAAGiB,aAAeD,C,KAC3B,CAELJ,EAAcZ,EAAGkB,YAAclB,EAAGmB,aAAenB,EAAGiB,aAAejB,EAAGoB,Y,CAGxE,GAAIR,EAAa,CACfZ,EAAGqB,aAAa,QAASrB,EAAGsB,YAAYC,O,KACnC,CACLvB,EAAGwB,gBAAgB,Q,EAIvB,kBAAAC,GACEhD,KAAKE,gBAAgBF,KAAKG,YAC1BH,KAAKE,gBAAgBF,KAAKI,UAC1BJ,KAAKE,gBAAgBF,KAAKK,Y,CAS5B,gBAAA4C,GACElB,OAAOmB,iBAAiB,SAAUlD,KAAKC,c,CAGzC,oBAAAkD,GACEpB,OAAOqB,oBAAoB,SAAUpD,KAAKC,c,CAiG5C,MAAAoD,GACE,OAAOrD,KAAKsD,WAAatD,KAAK2B,iBAAmB3B,KAAKM,iB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as a,b as t}from"./p-75c4a726.js";export{s as setNonce}from"./p-75c4a726.js";import{g as o}from"./p-e1255160.js";var i=()=>{{l(a.prototype)}const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};var l=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const o=this.childNodes;if(e){for(let e=0;e<o.length;e++){if(o[e].nodeType!==2){t.appendChild(o[e].cloneNode(true))}}}return t}};i().then((async e=>{await o();return t(JSON.parse('[["p-6d0fa7c1",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[4,"skip-load-animation"],"skipAnimation":[32]},[[2,"click","stopEvent"],[2,"focusin","stopEvent"]],{"variant":["handlePageOverflow"],"open":["onOpenChanged"]}],[6,"z-tag",{"icon":[1],"expandable":[4]}],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"]}],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-element",{"alignButton":[513,"align-button"],"clickable":[516],"dividerColor":[1,"divider-color"],"dividerType":[1,"divider-type"],"dividerSize":[1,"divider-size"],"expandable":[516],"expandableStyle":[1,"expandable-style"],"listElementId":[514,"list-element-id"],"size":[513],"color":[513],"disabled":[516],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"],"role":[513],"htmlTabindex":[2,"html-tabindex"],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[2,"z-input",{"htmlid":[1],"type":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"ariaExpanded":[1,"aria-expanded"],"ariaControls":[1,"aria-controls"],"ariaAutocomplete":[1,"aria-autocomplete"],"ariaActivedescendant":[1,"aria-activedescendant"],"value":[1025],"disabled":[516],"readonly":[4],"required":[4],"checked":[1028],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"labelPosition":[1,"label-position"],"autocomplete":[1],"role":[1],"hasclearicon":[4],"icon":[1],"min":[2],"minlength":[2],"max":[2],"maxlength":[2],"step":[2],"pattern":[1],"size":[513],"isTyping":[32],"passwordHidden":[32],"isChecked":[64]},[[4,"inputCheck","inputCheckListener"]]],[1,"z-input-message",{"message":[1],"status":[513],"disabled":[516],"statusRole":[32]},null,{"message":["onMessageChange"],"status":["onMessageChange"]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[6,"z-button",{"ariaLabel":[1,"aria-label"],"role":[1],"htmlrole":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"iconPosition":[513,"icon-position"],"size":[513]}],[1,"z-icon",{"name":[1],"height":[8],"width":[8],"iconid":[1],"fill":[1]}]]],["p-b63c8e8b",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-24474394",[[2,"z-select",{"htmlid":[1],"items":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"readonly":[4],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"autocomplete":[4],"noresultslabel":[1],"hasGroupItems":[4,"has-group-items"],"hasTreeItems":[4,"has-tree-items"],"showChildrenOfMatchingParent":[4,"show-children-of-matching-parent"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"flattenedList":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"]}]]],["p-1ad8810a",[[1,"z-breadcrumb",{"pathStyle":[513,"path-style"],"homepageVariant":[1,"homepage-variant"],"maxNodesToShow":[2,"max-nodes-to-show"],"preventFollowUrl":[4,"prevent-follow-url"],"overflowMenuItemRows":[2,"overflow-menu-item-rows"],"truncateChar":[2,"truncate-char"],"viewPortWidth":[32],"hasOverflow":[32],"popoverEllipsisOpen":[32]},[[9,"resize","handleResize"]],{"maxNodesToShow":["handlePropChange"],"viewPortWidth":["handleResizeUp"]}]]],["p-22c755d5",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32],"checkboxes":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"],"checkboxes":["watchCheckboxes"]}]]],["p-e231e811",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-757415e9",[[6,"z-file-upload",{"type":[513],"buttonVariant":[1,"button-variant"],"acceptedFormat":[1,"accepted-format"],"fileMaxSize":[2,"file-max-size"],"mainTitle":[1,"main-title"],"description":[1],"uploadBtnLabel":[1,"upload-btn-label"],"dragAndDropLabel":[1,"drag-and-drop-label"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"inputName":[1,"input-name"],"showErrors":[4,"show-errors"],"_type":[32],"files":[32],"invalidFiles":[32],"input":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","onFileRemoved"],[0,"fileDropped","fileDroppedListener"]]]]],["p-8c164e0d",[[0,"z-pagination",{"label":[1],"navArrows":[4,"nav-arrows"],"totalPages":[2,"total-pages"],"skip":[2],"edges":[4],"split":[2],"visiblePages":[2,"visible-pages"],"currentPage":[1026,"current-page"],"goToPage":[4,"go-to-page"],"_visiblePages":[32],"isMobile":[32],"goToPageValue":[32]},[[9,"resize","onResize"]],{"_visiblePages":["setPagesContainerWidth"],"visiblePages":["setVisiblePages"],"currentPage":["onPageChanged"],"split":["onSplitChanged"]}]]],["p-4cec3345",[[1,"z-tree-list",{"items":[1],"htmlAriaLabelledby":[513,"html-aria-labelledby"],"htmlSectionTitle":[513,"html-section-title"]},null,{"items":["watchItems"]}]]],["p-342b0eb0",[[1,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[516],"arrowsPosition":[513,"arrows-position"],"progressMode":[1,"progress-mode"],"fixedArrows":[516,"fixed-arrows"],"ghostLoadingHeight":[2,"ghost-loading-height"],"infinite":[4],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},null,{"current":["onIndexChange"],"single":["onSingleModeChange"],"infinite":["onInfiniteModeChange"]}]]],["p-817689d5",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"name":[1],"value":[1],"flatpickrPosition":[32],"inputError":[32]},[[2,"keydown","handleKeyDown"]],{"mode":["setupPickers"]}]]],["p-a905df88",[[2,"z-file",{"fileNumber":[2,"file-number"],"fileName":[1,"file-name"],"allowPopover":[32],"popoverVisible":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]]],["p-e3b82454",[[0,"z-range-picker",{"rangePickerId":[1,"range-picker-id"],"firstAriaLabel":[1,"first-aria-label"],"firstLabel":[1,"first-label"],"secondAriaLabel":[1,"second-aria-label"],"secondLabel":[1,"second-label"],"mode":[1],"firstPickerReadOnly":[4,"first-picker-read-only"],"lastPickerReadOnly":[4,"last-picker-read-only"],"firstPickerPlaceholder":[1,"first-picker-placeholder"],"lastPickerPlaceholder":[1,"last-picker-placeholder"],"flatpickrPosition":[32],"activeInput":[32],"firstInputError":[32],"lastInputError":[32]},[[18,"click","handleClick"],[18,"keyup","handleKeyDown"]],{"firstPickerReadOnly":["setupFirstPickersReadOnly"],"lastPickerReadOnly":["setupLastPickersReadOnly"],"mode":["setupPickers"]}]]],["p-e5407cc1",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-d90d2698",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"showSorting":[513,"show-sorting"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"sorted":[1540],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-b7b972c0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsedLabel":[1,"collapsed-label"],"isCollapsed":[516,"is-collapsed"],"collapsed":[32]}]]],["p-165d5acc",[[1,"z-book-card",{"variant":[513],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"year":[1],"ebookUrl":[1,"ebook-url"],"fallbackCover":[1,"fallback-cover"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-cebc9451",[[1,"z-book-card-app",{"logo":[1],"name":[1],"link":[1],"laz":[4],"info":[1]}]]],["p-63c1bde5",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-01302e57",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-3ed25564",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-cb1de7b4",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-d6a7b7f3",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]},null,{"isDisabled":["onDisabledChange"]}]]],["p-539f99db",[[1,"z-book-card-deprecated",{"variant":[1],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"ribbon":[1],"ribbonIcon":[1,"ribbon-icon"],"ribbonInteractive":[4,"ribbon-interactive"],"borderless":[4],"fallbackCover":[1,"fallback-cover"],"operaTitleTag":[1,"opera-title-tag"],"isMobile":[32],"hasResources":[32],"showResources":[32]}]]],["p-4c730d4a",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-ee695830",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-4fbcf534",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-2e0923bd",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-5a24e268",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-962c7f6b",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-816fd6dc",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-e639e1bc",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-8117a929",[[4,"z-navigation-tabs",{"ariaLabel":[1,"aria-label"],"orientation":[513],"size":[513],"selectedTab":[1026,"selected-tab"],"canNavigate":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},[[0,"click","handleTabClick"],[0,"focusin","onTabFocusIn"],[0,"keydown","navigateThroughTabs"],[0,"focusout","onTabFocusOut"]],{"canNavigate":["checkScrollEnabled"],"selectedTab":["onTabSelected"]}]]],["p-ac585bcd",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-caa491ca",[[6,"z-panel-elem",{"elemid":[1],"imgurl":[1],"imgalt":[1],"linkicon":[1],"linklabel":[1],"url":[1],"target":[1],"isdisabled":[4],"descrSlotName":[1,"descr-slot-name"]}]]],["p-ae6604b8",[[1,"z-result-card",{"cardTitle":[1,"card-title"],"cardSubtitle":[1,"card-subtitle"],"authors":[1],"cover":[1],"fallbackCover":[1,"fallback-cover"],"hasMultipleCovers":[4,"has-multiple-covers"],"isInfoCard":[4,"is-info-card"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-fb232d07",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-8bd4a2aa",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-6793061a",[[1,"z-stepper-item",{"index":[514],"href":[513],"pressed":[516],"checked":[516],"disabled":[516]}]]],["p-0eab3c09",[[1,"z-toast-notification",{"heading":[1],"message":[1],"closebutton":[4],"autoclose":[2],"pauseonfocusloss":[4],"type":[1],"isdraggable":[4],"draggablepercentage":[2],"transition":[1],"percentage":[32]},null,{"isdraggable":["watchPropIsdraggable"],"autoclose":["watchPropAutoclose"],"pauseonfocusloss":["watchPropPauseonfocusloss"]}]]],["p-6273db7f",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-8dec332e",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-badd98ad",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-3284e37b",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-74819cbe",[[4,"z-aria-alert",{"mode":[1]}]]],["p-cbab66f7",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-09ba466b",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-5cf3a797",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-0756fe6f",[[1,"z-myz-card-footer",{"titolo":[1],"autori":[1],"isbn":[1],"faded":[4],"cardtype":[1],"opened":[4],"customContent":[4,"custom-content"],"isOpen":[32],"allowTooltipAuthors":[32]},[[0,"toggleClick","handleToggle"]]]]],["p-67edb420",[[1,"z-myz-card-footer-sections"]]],["p-f1c55eda",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-7916e0f7",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-97608d16",[[1,"z-stepper"]]],["p-63d220da",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-237fcaa9",[[1,"z-tbody"]]],["p-d75f8bbb",[[1,"z-tfoot",{"sticky":[516]}]]],["p-9e3da0b7",[[1,"z-thead",{"sticky":[516],"isFocusable":[516,"is-focusable"]}]]],["p-6ca0ee2f",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-8c52635e",[[1,"z-visually-hidden"]]],["p-d8aa6afa",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-dc5ba112",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"ariaLabel":[1,"aria-label"],"size":[513],"open":[32]},[[9,"resize","adjustPanelPosition"],[10,"keydown","handleEscapeKey"]],{"position":["adjustPanelPosition"],"open":["adjustPanelPosition"]}]]],["p-966cbf03",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-e8419614",[[1,"z-alert",{"type":[1]}]]],["p-d6d3a92a",[[1,"z-ghost-loading"]]],["p-689b0280",[[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"],"dragging":[32]}],[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"lockPageScroll":[4,"lock-page-scroll"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-d0d54d42",[[1,"z-myz-card",{"faded":[4],"cardtype":[1],"ispressed":[4],"ishighlighted":[4]}],[1,"z-myz-card-body"],[1,"z-myz-card-cover",{"img":[1],"titolo":[1],"faded":[4],"defaultimg":[1]}],[1,"z-myz-card-header",{"titolo":[1],"faded":[4],"cardtype":[1],"allowTooltip":[32]}]]],["p-2b8eb0c2",[[1,"z-popover",{"position":[1537],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]],{"position":["validatePosition"],"open":["onOpen"],"bindTo":["onBindingChange"]}]]]]'),e)}));
|
|
1
|
+
import{p as e,H as a,b as t}from"./p-75c4a726.js";export{s as setNonce}from"./p-75c4a726.js";import{g as o}from"./p-e1255160.js";var i=()=>{{l(a.prototype)}const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};var l=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const o=this.childNodes;if(e){for(let e=0;e<o.length;e++){if(o[e].nodeType!==2){t.appendChild(o[e].cloneNode(true))}}}return t}};i().then((async e=>{await o();return t(JSON.parse('[["p-6d0fa7c1",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[4,"skip-load-animation"],"skipAnimation":[32]},[[2,"click","stopEvent"],[2,"focusin","stopEvent"]],{"variant":["handlePageOverflow"],"open":["onOpenChanged"]}],[6,"z-tag",{"icon":[1],"expandable":[4]}],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"]}],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-element",{"alignButton":[513,"align-button"],"clickable":[516],"dividerColor":[1,"divider-color"],"dividerType":[1,"divider-type"],"dividerSize":[1,"divider-size"],"expandable":[516],"expandableStyle":[1,"expandable-style"],"listElementId":[514,"list-element-id"],"size":[513],"color":[513],"disabled":[516],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"],"role":[513],"htmlTabindex":[2,"html-tabindex"],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[2,"z-input",{"htmlid":[1],"type":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"ariaExpanded":[1,"aria-expanded"],"ariaControls":[1,"aria-controls"],"ariaAutocomplete":[1,"aria-autocomplete"],"ariaActivedescendant":[1,"aria-activedescendant"],"value":[1025],"disabled":[516],"readonly":[4],"required":[4],"checked":[1028],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"labelPosition":[1,"label-position"],"autocomplete":[1],"role":[1],"hasclearicon":[4],"icon":[1],"min":[2],"minlength":[2],"max":[2],"maxlength":[2],"step":[2],"pattern":[1],"size":[513],"isTyping":[32],"passwordHidden":[32],"isChecked":[64]},[[4,"inputCheck","inputCheckListener"]]],[1,"z-input-message",{"message":[1],"status":[513],"disabled":[516],"statusRole":[32]},null,{"message":["onMessageChange"],"status":["onMessageChange"]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[6,"z-button",{"ariaLabel":[1,"aria-label"],"role":[1],"htmlrole":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"iconPosition":[513,"icon-position"],"size":[513]}],[1,"z-icon",{"name":[1],"height":[8],"width":[8],"iconid":[1],"fill":[1]}]]],["p-b63c8e8b",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-24474394",[[2,"z-select",{"htmlid":[1],"items":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"readonly":[4],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"autocomplete":[4],"noresultslabel":[1],"hasGroupItems":[4,"has-group-items"],"hasTreeItems":[4,"has-tree-items"],"showChildrenOfMatchingParent":[4,"show-children-of-matching-parent"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"flattenedList":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"]}]]],["p-1ad8810a",[[1,"z-breadcrumb",{"pathStyle":[513,"path-style"],"homepageVariant":[1,"homepage-variant"],"maxNodesToShow":[2,"max-nodes-to-show"],"preventFollowUrl":[4,"prevent-follow-url"],"overflowMenuItemRows":[2,"overflow-menu-item-rows"],"truncateChar":[2,"truncate-char"],"viewPortWidth":[32],"hasOverflow":[32],"popoverEllipsisOpen":[32]},[[9,"resize","handleResize"]],{"maxNodesToShow":["handlePropChange"],"viewPortWidth":["handleResizeUp"]}]]],["p-22c755d5",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32],"checkboxes":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"],"checkboxes":["watchCheckboxes"]}]]],["p-e231e811",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-757415e9",[[6,"z-file-upload",{"type":[513],"buttonVariant":[1,"button-variant"],"acceptedFormat":[1,"accepted-format"],"fileMaxSize":[2,"file-max-size"],"mainTitle":[1,"main-title"],"description":[1],"uploadBtnLabel":[1,"upload-btn-label"],"dragAndDropLabel":[1,"drag-and-drop-label"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"inputName":[1,"input-name"],"showErrors":[4,"show-errors"],"_type":[32],"files":[32],"invalidFiles":[32],"input":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","onFileRemoved"],[0,"fileDropped","fileDroppedListener"]]]]],["p-8c164e0d",[[0,"z-pagination",{"label":[1],"navArrows":[4,"nav-arrows"],"totalPages":[2,"total-pages"],"skip":[2],"edges":[4],"split":[2],"visiblePages":[2,"visible-pages"],"currentPage":[1026,"current-page"],"goToPage":[4,"go-to-page"],"_visiblePages":[32],"isMobile":[32],"goToPageValue":[32]},[[9,"resize","onResize"]],{"_visiblePages":["setPagesContainerWidth"],"visiblePages":["setVisiblePages"],"currentPage":["onPageChanged"],"split":["onSplitChanged"]}]]],["p-4cec3345",[[1,"z-tree-list",{"items":[1],"htmlAriaLabelledby":[513,"html-aria-labelledby"],"htmlSectionTitle":[513,"html-section-title"]},null,{"items":["watchItems"]}]]],["p-342b0eb0",[[1,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[516],"arrowsPosition":[513,"arrows-position"],"progressMode":[1,"progress-mode"],"fixedArrows":[516,"fixed-arrows"],"ghostLoadingHeight":[2,"ghost-loading-height"],"infinite":[4],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},null,{"current":["onIndexChange"],"single":["onSingleModeChange"],"infinite":["onInfiniteModeChange"]}]]],["p-817689d5",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"name":[1],"value":[1],"flatpickrPosition":[32],"inputError":[32]},[[2,"keydown","handleKeyDown"]],{"mode":["setupPickers"]}]]],["p-a905df88",[[2,"z-file",{"fileNumber":[2,"file-number"],"fileName":[1,"file-name"],"allowPopover":[32],"popoverVisible":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]]],["p-e3b82454",[[0,"z-range-picker",{"rangePickerId":[1,"range-picker-id"],"firstAriaLabel":[1,"first-aria-label"],"firstLabel":[1,"first-label"],"secondAriaLabel":[1,"second-aria-label"],"secondLabel":[1,"second-label"],"mode":[1],"firstPickerReadOnly":[4,"first-picker-read-only"],"lastPickerReadOnly":[4,"last-picker-read-only"],"firstPickerPlaceholder":[1,"first-picker-placeholder"],"lastPickerPlaceholder":[1,"last-picker-placeholder"],"flatpickrPosition":[32],"activeInput":[32],"firstInputError":[32],"lastInputError":[32]},[[18,"click","handleClick"],[18,"keyup","handleKeyDown"]],{"firstPickerReadOnly":["setupFirstPickersReadOnly"],"lastPickerReadOnly":["setupLastPickersReadOnly"],"mode":["setupPickers"]}]]],["p-e5407cc1",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-d90d2698",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"showSorting":[513,"show-sorting"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"sorted":[1540],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-b7b972c0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsedLabel":[1,"collapsed-label"],"isCollapsed":[516,"is-collapsed"],"collapsed":[32]}]]],["p-165d5acc",[[1,"z-book-card",{"variant":[513],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"year":[1],"ebookUrl":[1,"ebook-url"],"fallbackCover":[1,"fallback-cover"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-cebc9451",[[1,"z-book-card-app",{"logo":[1],"name":[1],"link":[1],"laz":[4],"info":[1]}]]],["p-63c1bde5",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-01302e57",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-3ed25564",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-cb1de7b4",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-d6a7b7f3",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]},null,{"isDisabled":["onDisabledChange"]}]]],["p-539f99db",[[1,"z-book-card-deprecated",{"variant":[1],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"ribbon":[1],"ribbonIcon":[1,"ribbon-icon"],"ribbonInteractive":[4,"ribbon-interactive"],"borderless":[4],"fallbackCover":[1,"fallback-cover"],"operaTitleTag":[1,"opera-title-tag"],"isMobile":[32],"hasResources":[32],"showResources":[32]}]]],["p-4c730d4a",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-ee695830",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-4fbcf534",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-2e0923bd",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-5a24e268",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-962c7f6b",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-816fd6dc",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-e639e1bc",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-8117a929",[[4,"z-navigation-tabs",{"ariaLabel":[1,"aria-label"],"orientation":[513],"size":[513],"selectedTab":[1026,"selected-tab"],"canNavigate":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},[[0,"click","handleTabClick"],[0,"focusin","onTabFocusIn"],[0,"keydown","navigateThroughTabs"],[0,"focusout","onTabFocusOut"]],{"canNavigate":["checkScrollEnabled"],"selectedTab":["onTabSelected"]}]]],["p-ac585bcd",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-caa491ca",[[6,"z-panel-elem",{"elemid":[1],"imgurl":[1],"imgalt":[1],"linkicon":[1],"linklabel":[1],"url":[1],"target":[1],"isdisabled":[4],"descrSlotName":[1,"descr-slot-name"]}]]],["p-7dfa3d66",[[1,"z-result-card",{"cardTitle":[1,"card-title"],"cardSubtitle":[1,"card-subtitle"],"authors":[1],"cover":[1],"fallbackCover":[1,"fallback-cover"],"hasMultipleCovers":[4,"has-multiple-covers"],"isInfoCard":[4,"is-info-card"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-fb232d07",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-8bd4a2aa",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-6793061a",[[1,"z-stepper-item",{"index":[514],"href":[513],"pressed":[516],"checked":[516],"disabled":[516]}]]],["p-0eab3c09",[[1,"z-toast-notification",{"heading":[1],"message":[1],"closebutton":[4],"autoclose":[2],"pauseonfocusloss":[4],"type":[1],"isdraggable":[4],"draggablepercentage":[2],"transition":[1],"percentage":[32]},null,{"isdraggable":["watchPropIsdraggable"],"autoclose":["watchPropAutoclose"],"pauseonfocusloss":["watchPropPauseonfocusloss"]}]]],["p-6273db7f",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-8dec332e",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-badd98ad",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-3284e37b",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-74819cbe",[[4,"z-aria-alert",{"mode":[1]}]]],["p-cbab66f7",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-09ba466b",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-5cf3a797",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-0756fe6f",[[1,"z-myz-card-footer",{"titolo":[1],"autori":[1],"isbn":[1],"faded":[4],"cardtype":[1],"opened":[4],"customContent":[4,"custom-content"],"isOpen":[32],"allowTooltipAuthors":[32]},[[0,"toggleClick","handleToggle"]]]]],["p-67edb420",[[1,"z-myz-card-footer-sections"]]],["p-f1c55eda",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-7916e0f7",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-97608d16",[[1,"z-stepper"]]],["p-63d220da",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-237fcaa9",[[1,"z-tbody"]]],["p-d75f8bbb",[[1,"z-tfoot",{"sticky":[516]}]]],["p-9e3da0b7",[[1,"z-thead",{"sticky":[516],"isFocusable":[516,"is-focusable"]}]]],["p-6ca0ee2f",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-8c52635e",[[1,"z-visually-hidden"]]],["p-d8aa6afa",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-dc5ba112",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"ariaLabel":[1,"aria-label"],"size":[513],"open":[32]},[[9,"resize","adjustPanelPosition"],[10,"keydown","handleEscapeKey"]],{"position":["adjustPanelPosition"],"open":["adjustPanelPosition"]}]]],["p-966cbf03",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-e8419614",[[1,"z-alert",{"type":[1]}]]],["p-d6d3a92a",[[1,"z-ghost-loading"]]],["p-689b0280",[[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"],"dragging":[32]}],[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"lockPageScroll":[4,"lock-page-scroll"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-d0d54d42",[[1,"z-myz-card",{"faded":[4],"cardtype":[1],"ispressed":[4],"ishighlighted":[4]}],[1,"z-myz-card-body"],[1,"z-myz-card-cover",{"img":[1],"titolo":[1],"faded":[4],"defaultimg":[1]}],[1,"z-myz-card-header",{"titolo":[1],"faded":[4],"cardtype":[1],"allowTooltip":[32]}]]],["p-2b8eb0c2",[[1,"z-popover",{"position":[1537],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]],{"position":["validatePosition"],"open":["onOpen"],"bindTo":["onBindingChange"]}]]]]'),e)}));
|
|
2
2
|
//# sourceMappingURL=web-components-library.esm.js.map
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as a,b as t}from"./p-75c4a726.js";export{s as setNonce}from"./p-75c4a726.js";import{g as o}from"./p-e1255160.js";var i=()=>{{l(a.prototype)}const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};var l=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const o=this.childNodes;if(e){for(let e=0;e<o.length;e++){if(o[e].nodeType!==2){t.appendChild(o[e].cloneNode(true))}}}return t}};i().then((async e=>{await o();return t(JSON.parse('[["p-6d0fa7c1",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[4,"skip-load-animation"],"skipAnimation":[32]},[[2,"click","stopEvent"],[2,"focusin","stopEvent"]],{"variant":["handlePageOverflow"],"open":["onOpenChanged"]}],[6,"z-tag",{"icon":[1],"expandable":[4]}],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"]}],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-element",{"alignButton":[513,"align-button"],"clickable":[516],"dividerColor":[1,"divider-color"],"dividerType":[1,"divider-type"],"dividerSize":[1,"divider-size"],"expandable":[516],"expandableStyle":[1,"expandable-style"],"listElementId":[514,"list-element-id"],"size":[513],"color":[513],"disabled":[516],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"],"role":[513],"htmlTabindex":[2,"html-tabindex"],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[2,"z-input",{"htmlid":[1],"type":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"ariaExpanded":[1,"aria-expanded"],"ariaControls":[1,"aria-controls"],"ariaAutocomplete":[1,"aria-autocomplete"],"ariaActivedescendant":[1,"aria-activedescendant"],"value":[1025],"disabled":[516],"readonly":[4],"required":[4],"checked":[1028],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"labelPosition":[1,"label-position"],"autocomplete":[1],"role":[1],"hasclearicon":[4],"icon":[1],"min":[2],"minlength":[2],"max":[2],"maxlength":[2],"step":[2],"pattern":[1],"size":[513],"isTyping":[32],"passwordHidden":[32],"isChecked":[64]},[[4,"inputCheck","inputCheckListener"]]],[1,"z-input-message",{"message":[1],"status":[513],"disabled":[516],"statusRole":[32]},null,{"message":["onMessageChange"],"status":["onMessageChange"]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[6,"z-button",{"ariaLabel":[1,"aria-label"],"role":[1],"htmlrole":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"iconPosition":[513,"icon-position"],"size":[513]}],[1,"z-icon",{"name":[1],"height":[8],"width":[8],"iconid":[1],"fill":[1]}]]],["p-b63c8e8b",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-24474394",[[2,"z-select",{"htmlid":[1],"items":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"readonly":[4],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"autocomplete":[4],"noresultslabel":[1],"hasGroupItems":[4,"has-group-items"],"hasTreeItems":[4,"has-tree-items"],"showChildrenOfMatchingParent":[4,"show-children-of-matching-parent"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"flattenedList":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"]}]]],["p-1ad8810a",[[1,"z-breadcrumb",{"pathStyle":[513,"path-style"],"homepageVariant":[1,"homepage-variant"],"maxNodesToShow":[2,"max-nodes-to-show"],"preventFollowUrl":[4,"prevent-follow-url"],"overflowMenuItemRows":[2,"overflow-menu-item-rows"],"truncateChar":[2,"truncate-char"],"viewPortWidth":[32],"hasOverflow":[32],"popoverEllipsisOpen":[32]},[[9,"resize","handleResize"]],{"maxNodesToShow":["handlePropChange"],"viewPortWidth":["handleResizeUp"]}]]],["p-22c755d5",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32],"checkboxes":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"],"checkboxes":["watchCheckboxes"]}]]],["p-e231e811",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-757415e9",[[6,"z-file-upload",{"type":[513],"buttonVariant":[1,"button-variant"],"acceptedFormat":[1,"accepted-format"],"fileMaxSize":[2,"file-max-size"],"mainTitle":[1,"main-title"],"description":[1],"uploadBtnLabel":[1,"upload-btn-label"],"dragAndDropLabel":[1,"drag-and-drop-label"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"inputName":[1,"input-name"],"showErrors":[4,"show-errors"],"_type":[32],"files":[32],"invalidFiles":[32],"input":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","onFileRemoved"],[0,"fileDropped","fileDroppedListener"]]]]],["p-8c164e0d",[[0,"z-pagination",{"label":[1],"navArrows":[4,"nav-arrows"],"totalPages":[2,"total-pages"],"skip":[2],"edges":[4],"split":[2],"visiblePages":[2,"visible-pages"],"currentPage":[1026,"current-page"],"goToPage":[4,"go-to-page"],"_visiblePages":[32],"isMobile":[32],"goToPageValue":[32]},[[9,"resize","onResize"]],{"_visiblePages":["setPagesContainerWidth"],"visiblePages":["setVisiblePages"],"currentPage":["onPageChanged"],"split":["onSplitChanged"]}]]],["p-4cec3345",[[1,"z-tree-list",{"items":[1],"htmlAriaLabelledby":[513,"html-aria-labelledby"],"htmlSectionTitle":[513,"html-section-title"]},null,{"items":["watchItems"]}]]],["p-342b0eb0",[[1,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[516],"arrowsPosition":[513,"arrows-position"],"progressMode":[1,"progress-mode"],"fixedArrows":[516,"fixed-arrows"],"ghostLoadingHeight":[2,"ghost-loading-height"],"infinite":[4],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},null,{"current":["onIndexChange"],"single":["onSingleModeChange"],"infinite":["onInfiniteModeChange"]}]]],["p-817689d5",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"name":[1],"value":[1],"flatpickrPosition":[32],"inputError":[32]},[[2,"keydown","handleKeyDown"]],{"mode":["setupPickers"]}]]],["p-a905df88",[[2,"z-file",{"fileNumber":[2,"file-number"],"fileName":[1,"file-name"],"allowPopover":[32],"popoverVisible":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]]],["p-e3b82454",[[0,"z-range-picker",{"rangePickerId":[1,"range-picker-id"],"firstAriaLabel":[1,"first-aria-label"],"firstLabel":[1,"first-label"],"secondAriaLabel":[1,"second-aria-label"],"secondLabel":[1,"second-label"],"mode":[1],"firstPickerReadOnly":[4,"first-picker-read-only"],"lastPickerReadOnly":[4,"last-picker-read-only"],"firstPickerPlaceholder":[1,"first-picker-placeholder"],"lastPickerPlaceholder":[1,"last-picker-placeholder"],"flatpickrPosition":[32],"activeInput":[32],"firstInputError":[32],"lastInputError":[32]},[[18,"click","handleClick"],[18,"keyup","handleKeyDown"]],{"firstPickerReadOnly":["setupFirstPickersReadOnly"],"lastPickerReadOnly":["setupLastPickersReadOnly"],"mode":["setupPickers"]}]]],["p-e5407cc1",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-d90d2698",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"showSorting":[513,"show-sorting"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"sorted":[1540],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-b7b972c0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsedLabel":[1,"collapsed-label"],"isCollapsed":[516,"is-collapsed"],"collapsed":[32]}]]],["p-165d5acc",[[1,"z-book-card",{"variant":[513],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"year":[1],"ebookUrl":[1,"ebook-url"],"fallbackCover":[1,"fallback-cover"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-cebc9451",[[1,"z-book-card-app",{"logo":[1],"name":[1],"link":[1],"laz":[4],"info":[1]}]]],["p-63c1bde5",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-01302e57",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-3ed25564",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-cb1de7b4",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-d6a7b7f3",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]},null,{"isDisabled":["onDisabledChange"]}]]],["p-539f99db",[[1,"z-book-card-deprecated",{"variant":[1],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"ribbon":[1],"ribbonIcon":[1,"ribbon-icon"],"ribbonInteractive":[4,"ribbon-interactive"],"borderless":[4],"fallbackCover":[1,"fallback-cover"],"operaTitleTag":[1,"opera-title-tag"],"isMobile":[32],"hasResources":[32],"showResources":[32]}]]],["p-4c730d4a",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-ee695830",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-4fbcf534",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-2e0923bd",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-5a24e268",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-962c7f6b",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-816fd6dc",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-e639e1bc",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-8117a929",[[4,"z-navigation-tabs",{"ariaLabel":[1,"aria-label"],"orientation":[513],"size":[513],"selectedTab":[1026,"selected-tab"],"canNavigate":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},[[0,"click","handleTabClick"],[0,"focusin","onTabFocusIn"],[0,"keydown","navigateThroughTabs"],[0,"focusout","onTabFocusOut"]],{"canNavigate":["checkScrollEnabled"],"selectedTab":["onTabSelected"]}]]],["p-ac585bcd",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-caa491ca",[[6,"z-panel-elem",{"elemid":[1],"imgurl":[1],"imgalt":[1],"linkicon":[1],"linklabel":[1],"url":[1],"target":[1],"isdisabled":[4],"descrSlotName":[1,"descr-slot-name"]}]]],["p-ae6604b8",[[1,"z-result-card",{"cardTitle":[1,"card-title"],"cardSubtitle":[1,"card-subtitle"],"authors":[1],"cover":[1],"fallbackCover":[1,"fallback-cover"],"hasMultipleCovers":[4,"has-multiple-covers"],"isInfoCard":[4,"is-info-card"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-fb232d07",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-8bd4a2aa",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-6793061a",[[1,"z-stepper-item",{"index":[514],"href":[513],"pressed":[516],"checked":[516],"disabled":[516]}]]],["p-0eab3c09",[[1,"z-toast-notification",{"heading":[1],"message":[1],"closebutton":[4],"autoclose":[2],"pauseonfocusloss":[4],"type":[1],"isdraggable":[4],"draggablepercentage":[2],"transition":[1],"percentage":[32]},null,{"isdraggable":["watchPropIsdraggable"],"autoclose":["watchPropAutoclose"],"pauseonfocusloss":["watchPropPauseonfocusloss"]}]]],["p-6273db7f",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-8dec332e",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-badd98ad",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-3284e37b",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-74819cbe",[[4,"z-aria-alert",{"mode":[1]}]]],["p-cbab66f7",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-09ba466b",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-5cf3a797",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-0756fe6f",[[1,"z-myz-card-footer",{"titolo":[1],"autori":[1],"isbn":[1],"faded":[4],"cardtype":[1],"opened":[4],"customContent":[4,"custom-content"],"isOpen":[32],"allowTooltipAuthors":[32]},[[0,"toggleClick","handleToggle"]]]]],["p-67edb420",[[1,"z-myz-card-footer-sections"]]],["p-f1c55eda",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-7916e0f7",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-97608d16",[[1,"z-stepper"]]],["p-63d220da",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-237fcaa9",[[1,"z-tbody"]]],["p-d75f8bbb",[[1,"z-tfoot",{"sticky":[516]}]]],["p-9e3da0b7",[[1,"z-thead",{"sticky":[516],"isFocusable":[516,"is-focusable"]}]]],["p-6ca0ee2f",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-8c52635e",[[1,"z-visually-hidden"]]],["p-d8aa6afa",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-dc5ba112",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"ariaLabel":[1,"aria-label"],"size":[513],"open":[32]},[[9,"resize","adjustPanelPosition"],[10,"keydown","handleEscapeKey"]],{"position":["adjustPanelPosition"],"open":["adjustPanelPosition"]}]]],["p-966cbf03",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-e8419614",[[1,"z-alert",{"type":[1]}]]],["p-d6d3a92a",[[1,"z-ghost-loading"]]],["p-689b0280",[[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"],"dragging":[32]}],[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"lockPageScroll":[4,"lock-page-scroll"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-d0d54d42",[[1,"z-myz-card",{"faded":[4],"cardtype":[1],"ispressed":[4],"ishighlighted":[4]}],[1,"z-myz-card-body"],[1,"z-myz-card-cover",{"img":[1],"titolo":[1],"faded":[4],"defaultimg":[1]}],[1,"z-myz-card-header",{"titolo":[1],"faded":[4],"cardtype":[1],"allowTooltip":[32]}]]],["p-2b8eb0c2",[[1,"z-popover",{"position":[1537],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]],{"position":["validatePosition"],"open":["onOpen"],"bindTo":["onBindingChange"]}]]]]'),e)}));
|
|
1
|
+
import{p as e,H as a,b as t}from"./p-75c4a726.js";export{s as setNonce}from"./p-75c4a726.js";import{g as o}from"./p-e1255160.js";var i=()=>{{l(a.prototype)}const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};var l=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const o=this.childNodes;if(e){for(let e=0;e<o.length;e++){if(o[e].nodeType!==2){t.appendChild(o[e].cloneNode(true))}}}return t}};i().then((async e=>{await o();return t(JSON.parse('[["p-6d0fa7c1",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[4,"skip-load-animation"],"skipAnimation":[32]},[[2,"click","stopEvent"],[2,"focusin","stopEvent"]],{"variant":["handlePageOverflow"],"open":["onOpenChanged"]}],[6,"z-tag",{"icon":[1],"expandable":[4]}],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"]}],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-element",{"alignButton":[513,"align-button"],"clickable":[516],"dividerColor":[1,"divider-color"],"dividerType":[1,"divider-type"],"dividerSize":[1,"divider-size"],"expandable":[516],"expandableStyle":[1,"expandable-style"],"listElementId":[514,"list-element-id"],"size":[513],"color":[513],"disabled":[516],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"],"role":[513],"htmlTabindex":[2,"html-tabindex"],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[2,"z-input",{"htmlid":[1],"type":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"ariaExpanded":[1,"aria-expanded"],"ariaControls":[1,"aria-controls"],"ariaAutocomplete":[1,"aria-autocomplete"],"ariaActivedescendant":[1,"aria-activedescendant"],"value":[1025],"disabled":[516],"readonly":[4],"required":[4],"checked":[1028],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"labelPosition":[1,"label-position"],"autocomplete":[1],"role":[1],"hasclearicon":[4],"icon":[1],"min":[2],"minlength":[2],"max":[2],"maxlength":[2],"step":[2],"pattern":[1],"size":[513],"isTyping":[32],"passwordHidden":[32],"isChecked":[64]},[[4,"inputCheck","inputCheckListener"]]],[1,"z-input-message",{"message":[1],"status":[513],"disabled":[516],"statusRole":[32]},null,{"message":["onMessageChange"],"status":["onMessageChange"]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[6,"z-button",{"ariaLabel":[1,"aria-label"],"role":[1],"htmlrole":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"iconPosition":[513,"icon-position"],"size":[513]}],[1,"z-icon",{"name":[1],"height":[8],"width":[8],"iconid":[1],"fill":[1]}]]],["p-b63c8e8b",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-24474394",[[2,"z-select",{"htmlid":[1],"items":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"readonly":[4],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"autocomplete":[4],"noresultslabel":[1],"hasGroupItems":[4,"has-group-items"],"hasTreeItems":[4,"has-tree-items"],"showChildrenOfMatchingParent":[4,"show-children-of-matching-parent"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"flattenedList":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"]}]]],["p-1ad8810a",[[1,"z-breadcrumb",{"pathStyle":[513,"path-style"],"homepageVariant":[1,"homepage-variant"],"maxNodesToShow":[2,"max-nodes-to-show"],"preventFollowUrl":[4,"prevent-follow-url"],"overflowMenuItemRows":[2,"overflow-menu-item-rows"],"truncateChar":[2,"truncate-char"],"viewPortWidth":[32],"hasOverflow":[32],"popoverEllipsisOpen":[32]},[[9,"resize","handleResize"]],{"maxNodesToShow":["handlePropChange"],"viewPortWidth":["handleResizeUp"]}]]],["p-22c755d5",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32],"checkboxes":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"],"checkboxes":["watchCheckboxes"]}]]],["p-e231e811",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-757415e9",[[6,"z-file-upload",{"type":[513],"buttonVariant":[1,"button-variant"],"acceptedFormat":[1,"accepted-format"],"fileMaxSize":[2,"file-max-size"],"mainTitle":[1,"main-title"],"description":[1],"uploadBtnLabel":[1,"upload-btn-label"],"dragAndDropLabel":[1,"drag-and-drop-label"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"inputName":[1,"input-name"],"showErrors":[4,"show-errors"],"_type":[32],"files":[32],"invalidFiles":[32],"input":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","onFileRemoved"],[0,"fileDropped","fileDroppedListener"]]]]],["p-8c164e0d",[[0,"z-pagination",{"label":[1],"navArrows":[4,"nav-arrows"],"totalPages":[2,"total-pages"],"skip":[2],"edges":[4],"split":[2],"visiblePages":[2,"visible-pages"],"currentPage":[1026,"current-page"],"goToPage":[4,"go-to-page"],"_visiblePages":[32],"isMobile":[32],"goToPageValue":[32]},[[9,"resize","onResize"]],{"_visiblePages":["setPagesContainerWidth"],"visiblePages":["setVisiblePages"],"currentPage":["onPageChanged"],"split":["onSplitChanged"]}]]],["p-4cec3345",[[1,"z-tree-list",{"items":[1],"htmlAriaLabelledby":[513,"html-aria-labelledby"],"htmlSectionTitle":[513,"html-section-title"]},null,{"items":["watchItems"]}]]],["p-342b0eb0",[[1,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[516],"arrowsPosition":[513,"arrows-position"],"progressMode":[1,"progress-mode"],"fixedArrows":[516,"fixed-arrows"],"ghostLoadingHeight":[2,"ghost-loading-height"],"infinite":[4],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},null,{"current":["onIndexChange"],"single":["onSingleModeChange"],"infinite":["onInfiniteModeChange"]}]]],["p-817689d5",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"name":[1],"value":[1],"flatpickrPosition":[32],"inputError":[32]},[[2,"keydown","handleKeyDown"]],{"mode":["setupPickers"]}]]],["p-a905df88",[[2,"z-file",{"fileNumber":[2,"file-number"],"fileName":[1,"file-name"],"allowPopover":[32],"popoverVisible":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]]],["p-e3b82454",[[0,"z-range-picker",{"rangePickerId":[1,"range-picker-id"],"firstAriaLabel":[1,"first-aria-label"],"firstLabel":[1,"first-label"],"secondAriaLabel":[1,"second-aria-label"],"secondLabel":[1,"second-label"],"mode":[1],"firstPickerReadOnly":[4,"first-picker-read-only"],"lastPickerReadOnly":[4,"last-picker-read-only"],"firstPickerPlaceholder":[1,"first-picker-placeholder"],"lastPickerPlaceholder":[1,"last-picker-placeholder"],"flatpickrPosition":[32],"activeInput":[32],"firstInputError":[32],"lastInputError":[32]},[[18,"click","handleClick"],[18,"keyup","handleKeyDown"]],{"firstPickerReadOnly":["setupFirstPickersReadOnly"],"lastPickerReadOnly":["setupLastPickersReadOnly"],"mode":["setupPickers"]}]]],["p-e5407cc1",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-d90d2698",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"showSorting":[513,"show-sorting"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"sorted":[1540],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-b7b972c0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsedLabel":[1,"collapsed-label"],"isCollapsed":[516,"is-collapsed"],"collapsed":[32]}]]],["p-165d5acc",[[1,"z-book-card",{"variant":[513],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"year":[1],"ebookUrl":[1,"ebook-url"],"fallbackCover":[1,"fallback-cover"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-cebc9451",[[1,"z-book-card-app",{"logo":[1],"name":[1],"link":[1],"laz":[4],"info":[1]}]]],["p-63c1bde5",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-01302e57",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-3ed25564",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-cb1de7b4",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-d6a7b7f3",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]},null,{"isDisabled":["onDisabledChange"]}]]],["p-539f99db",[[1,"z-book-card-deprecated",{"variant":[1],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"ribbon":[1],"ribbonIcon":[1,"ribbon-icon"],"ribbonInteractive":[4,"ribbon-interactive"],"borderless":[4],"fallbackCover":[1,"fallback-cover"],"operaTitleTag":[1,"opera-title-tag"],"isMobile":[32],"hasResources":[32],"showResources":[32]}]]],["p-4c730d4a",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-ee695830",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-4fbcf534",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-2e0923bd",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-5a24e268",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-962c7f6b",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-816fd6dc",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-e639e1bc",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-8117a929",[[4,"z-navigation-tabs",{"ariaLabel":[1,"aria-label"],"orientation":[513],"size":[513],"selectedTab":[1026,"selected-tab"],"canNavigate":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},[[0,"click","handleTabClick"],[0,"focusin","onTabFocusIn"],[0,"keydown","navigateThroughTabs"],[0,"focusout","onTabFocusOut"]],{"canNavigate":["checkScrollEnabled"],"selectedTab":["onTabSelected"]}]]],["p-ac585bcd",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-caa491ca",[[6,"z-panel-elem",{"elemid":[1],"imgurl":[1],"imgalt":[1],"linkicon":[1],"linklabel":[1],"url":[1],"target":[1],"isdisabled":[4],"descrSlotName":[1,"descr-slot-name"]}]]],["p-7dfa3d66",[[1,"z-result-card",{"cardTitle":[1,"card-title"],"cardSubtitle":[1,"card-subtitle"],"authors":[1],"cover":[1],"fallbackCover":[1,"fallback-cover"],"hasMultipleCovers":[4,"has-multiple-covers"],"isInfoCard":[4,"is-info-card"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-fb232d07",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-8bd4a2aa",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-6793061a",[[1,"z-stepper-item",{"index":[514],"href":[513],"pressed":[516],"checked":[516],"disabled":[516]}]]],["p-0eab3c09",[[1,"z-toast-notification",{"heading":[1],"message":[1],"closebutton":[4],"autoclose":[2],"pauseonfocusloss":[4],"type":[1],"isdraggable":[4],"draggablepercentage":[2],"transition":[1],"percentage":[32]},null,{"isdraggable":["watchPropIsdraggable"],"autoclose":["watchPropAutoclose"],"pauseonfocusloss":["watchPropPauseonfocusloss"]}]]],["p-6273db7f",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-8dec332e",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-badd98ad",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-3284e37b",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-74819cbe",[[4,"z-aria-alert",{"mode":[1]}]]],["p-cbab66f7",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-09ba466b",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-5cf3a797",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-0756fe6f",[[1,"z-myz-card-footer",{"titolo":[1],"autori":[1],"isbn":[1],"faded":[4],"cardtype":[1],"opened":[4],"customContent":[4,"custom-content"],"isOpen":[32],"allowTooltipAuthors":[32]},[[0,"toggleClick","handleToggle"]]]]],["p-67edb420",[[1,"z-myz-card-footer-sections"]]],["p-f1c55eda",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-7916e0f7",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-97608d16",[[1,"z-stepper"]]],["p-63d220da",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-237fcaa9",[[1,"z-tbody"]]],["p-d75f8bbb",[[1,"z-tfoot",{"sticky":[516]}]]],["p-9e3da0b7",[[1,"z-thead",{"sticky":[516],"isFocusable":[516,"is-focusable"]}]]],["p-6ca0ee2f",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-8c52635e",[[1,"z-visually-hidden"]]],["p-d8aa6afa",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-dc5ba112",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"ariaLabel":[1,"aria-label"],"size":[513],"open":[32]},[[9,"resize","adjustPanelPosition"],[10,"keydown","handleEscapeKey"]],{"position":["adjustPanelPosition"],"open":["adjustPanelPosition"]}]]],["p-966cbf03",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-e8419614",[[1,"z-alert",{"type":[1]}]]],["p-d6d3a92a",[[1,"z-ghost-loading"]]],["p-689b0280",[[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"],"dragging":[32]}],[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"lockPageScroll":[4,"lock-page-scroll"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-d0d54d42",[[1,"z-myz-card",{"faded":[4],"cardtype":[1],"ispressed":[4],"ishighlighted":[4]}],[1,"z-myz-card-body"],[1,"z-myz-card-cover",{"img":[1],"titolo":[1],"faded":[4],"defaultimg":[1]}],[1,"z-myz-card-header",{"titolo":[1],"faded":[4],"cardtype":[1],"allowTooltip":[32]}]]],["p-2b8eb0c2",[[1,"z-popover",{"position":[1537],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]],{"position":["validatePosition"],"open":["onOpen"],"bindTo":["onBindingChange"]}]]]]'),e)}));
|
|
2
2
|
//# sourceMappingURL=web-components-library.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as i,h as e,a as t,g as o}from"./p-75c4a726.js";import{i as s}from"./p-8d923a1d.js";const a=":host{display:flex;overflow:hidden;min-width:0;height:calc(10.88rem - var(--space-unit) * 2);max-height:calc(10.88rem - var(--space-unit) * 2);padding:var(--space-unit);border:var(--border-size-medium) solid var(--color-surface02);background-color:var(--color-white);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}.z-cover-container{position:relative;display:flex;width:119px;height:158px;align-items:center;justify-items:center}.z-cover-stack{width:100%;height:100%}.z-cover-shadow,.z-cover-img{width:117px;height:156px}.z-cover-container.has-multiple .z-cover-shadow,.z-cover-container.has-multiple .z-cover-img{width:105px;height:140px}.z-cover-shadow{position:absolute;z-index:1;background-color:var(--color-white)}.z-shadow-1{z-index:0;top:var(--space-unit);right:6px;border:var(--border-size-small) solid black}.z-shadow-2{z-index:0;top:calc(var(--space-unit) * 2);right:12px;border:var(--border-size-small) solid black}.z-cover-img{position:absolute;z-index:0;top:0;right:0;display:flex;align-items:start;justify-content:center;border:var(--border-size-small) solid black;background-color:var(--color-white);object-fit:cover;object-position:left}.z-cover-img>img{max-width:100%;max-height:100%}.z-cover-container.has-multiple .z-cover-img{left:12px}: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)}.authors-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;-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.5;word-break:break-word}.card-title>*{all:unset}.card-subtitle{overflow:hidden;color:var(--color-default-text);text-overflow:ellipsis;white-space:nowrap}.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}.tags-container{display:flex;max-width:100%;flex-wrap:wrap;margin-top:calc(var(--space-unit) * 2);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;height:calc(4.75rem - var(--space-unit) * 2);max-height:calc(4.75rem - var(--space-unit) * 2);gap:calc(var(--space-unit) * 1.5)}:host(.info-card) .info-container{padding-left:0}.info-icon-container{display:flex;width:34px;height:34px;align-items:center;justify-content:center;margin-bottom:calc(var(--space-unit) * 3);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}.info-icon{width:18px;height:18px;color:var(--color-default-text)}@media (max-width: 768px){.card-title{display:block;overflow:hidden;line-height:normal;text-overflow:ellipsis;white-space:nowrap}}";const r=a;const n=class{constructor(o){i(this,o);this.resizeHandler=()=>{this.setTooltipTitle(this.authorsRef);this.setTooltipTitle(this.titleRef);this.setTooltipTitle(this.subtitleRef)};this.renderOperaCard=()=>{const i=this.titleHtmlTag?`<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>`:this.cardTitle;return e(t,{tabIndex:0},e("div",{class:`z-cover-container ${this.hasMultipleCovers?"has-multiple":""}`},e("div",{class:"z-cover-stack"},this.hasMultipleCovers&&e("div",null,e("div",{class:"z-cover-shadow z-shadow-2"}),e("div",{class:"z-cover-shadow z-shadow-1"})),e("div",{class:"z-cover-img"},e("img",{src:this.cover||this.fallbackCover||s,alt:"",onError:()=>{if(this.fallbackCover){this.cover=this.fallbackCover}else{this.cover=s}}})))),e("div",{class:"info-container"},this.authors&&e("span",{class:"authors-label",ref:i=>this.authorsRef=i},this.authors),e("div",{class:"card-title",ref:i=>this.titleRef=i,innerHTML:i}),e("span",{class:"card-subtitle",ref:i=>this.subtitleRef=i},this.cardSubtitle),e("div",{class:"tags-container"},e("slot",{name:"tags"})),e("div",{class:"volumes-label"},e("slot",{name:"volumes"}))))};this.renderInfoCard=()=>{const i=this.titleHtmlTag?`<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>`:this.cardTitle;return e(t,{tabIndex:0,class:"info-card"},e("div",{class:"info-icon-column"},e("div",{class:"info-icon-container"},e("z-icon",{class:"info-icon",name:"link",width:18,height:18}))),e("div",{class:"info-container"},e("span",{class:"card-title info-title",ref:i=>this.titleRef=i,innerHTML:i}),e("span",{class:"card-subtitle info-subtitle",ref:i=>this.subtitleRef=i},this.cardSubtitle)))};this.cardTitle=undefined;this.cardSubtitle=undefined;this.authors=undefined;this.cover=undefined;this.fallbackCover=undefined;this.hasMultipleCovers=false;this.isInfoCard=false;this.titleHtmlTag=undefined}setTooltipTitle(i){if(!i){return}const e=window.getComputedStyle(i);const t=e.getPropertyValue("-webkit-line-clamp")!=="none";let o;if(t){const t=parseInt(e.lineHeight);const s=parseInt(e.getPropertyValue("-webkit-line-clamp"));const a=t*s;o=i.scrollHeight>a}else{o=i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight}if(o){i.setAttribute("title",i.textContent.trim())}else{i.removeAttribute("title")}}componentDidRender(){this.setTooltipTitle(this.authorsRef);this.setTooltipTitle(this.titleRef);this.setTooltipTitle(this.subtitleRef)}componentDidLoad(){window.addEventListener("resize",this.resizeHandler)}disconnectedCallback(){window.removeEventListener("resize",this.resizeHandler)}render(){return this.isInfoCard?this.renderInfoCard():this.renderOperaCard()}get hostElement(){return o(this)}};n.style=r;export{n as z_result_card};
|
|
2
|
+
//# sourceMappingURL=p-7dfa3d66.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stylesCss","ZResultCardStyle0","ZResultCard","this","resizeHandler","setTooltipTitle","authorsRef","titleRef","subtitleRef","renderOperaCard","title","titleHtmlTag","cardTitle","h","Host","tabIndex","class","hasMultipleCovers","src","cover","fallbackCover","defaultFallbackCover","alt","onError","authors","ref","el","innerHTML","cardSubtitle","name","renderInfoCard","width","height","style","window","getComputedStyle","hasLineClamp","getPropertyValue","isTruncated","lineHeight","parseInt","maxLines","maxHeight","scrollHeight","scrollWidth","clientWidth","clientHeight","setAttribute","textContent","trim","removeAttribute","componentDidRender","componentDidLoad","addEventListener","disconnectedCallback","removeEventListener","render","isInfoCard"],"sources":["src/components/result-card/z-result-card/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 min-width: 0;\n height: calc(10.88rem - var(--space-unit) * 2);\n max-height: calc(10.88rem - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) solid var(--color-surface02);\n background-color: var(--color-white);\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.z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-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: 117px;\n height: 156px;\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: 105px;\n height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 0;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 0;\n top: 0;\n right: 0;\n display: flex;\n align-items: start;\n justify-content: center;\n border: var(--border-size-small) solid black;\n background-color: var(--color-white);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-img > img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\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.authors-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 -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.5;\n word-break: break-word;\n}\n\n.card-title > * {\n all: unset;\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.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.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\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/* variant info-card */\n:host(.info-card) {\n display: flex;\n height: calc(4.75rem - var(--space-unit) * 2);\n max-height: calc(4.75rem - var(--space-unit) * 2);\n gap: calc(var(--space-unit) * 1.5);\n}\n\n:host(.info-card) .info-container {\n padding-left: 0;\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) * 3);\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.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 line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAY,q4GAClB,MAAAC,EAAeD,E,MCOFE,EAAW,M,yBA8FdC,KAAAC,cAAgB,KACtBD,KAAKE,gBAAgBF,KAAKG,YAC1BH,KAAKE,gBAAgBF,KAAKI,UAC1BJ,KAAKE,gBAAgBF,KAAKK,YAAY,EAWhCL,KAAAM,gBAAkB,KACxB,MAAMC,EAAQP,KAAKQ,aAAe,IAAIR,KAAKQ,gBAAgBR,KAAKS,cAAcT,KAAKQ,gBAAkBR,KAAKS,UAE1G,OACEC,EAACC,EAAI,CAACC,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B,GAEhCvB,KAAKyB,eAGL,E,qJAjKS,M,gBAOP,M,4BAeL,eAAAvB,CAAgBqB,GACtB,IAAKA,EAAI,CACP,M,CAIF,MAAMO,EAAQC,OAAOC,iBAAiBT,GACtC,MAAMU,EAAeH,EAAMI,iBAAiB,wBAA0B,OAEtE,IAAIC,EACJ,GAAIF,EAAc,CAEhB,MAAMG,EAAaC,SAASP,EAAMM,YAClC,MAAME,EAAWD,SAASP,EAAMI,iBAAiB,uBACjD,MAAMK,EAAYH,EAAaE,EAE/BH,EAAcZ,EAAGiB,aAAeD,C,KAC3B,CAELJ,EAAcZ,EAAGkB,YAAclB,EAAGmB,aAAenB,EAAGiB,aAAejB,EAAGoB,Y,CAGxE,GAAIR,EAAa,CACfZ,EAAGqB,aAAa,QAASrB,EAAGsB,YAAYC,O,KACnC,CACLvB,EAAGwB,gBAAgB,Q,EAIvB,kBAAAC,GACEhD,KAAKE,gBAAgBF,KAAKG,YAC1BH,KAAKE,gBAAgBF,KAAKI,UAC1BJ,KAAKE,gBAAgBF,KAAKK,Y,CAS5B,gBAAA4C,GACElB,OAAOmB,iBAAiB,SAAUlD,KAAKC,c,CAGzC,oBAAAkD,GACEpB,OAAOqB,oBAAoB,SAAUpD,KAAKC,c,CAiG5C,MAAAoD,GACE,OAAOrD,KAAKsD,WAAatD,KAAK2B,iBAAmB3B,KAAKM,iB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as a,b as t}from"./p-75c4a726.js";export{s as setNonce}from"./p-75c4a726.js";import{g as o}from"./p-e1255160.js";var i=()=>{{l(a.prototype)}const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};var l=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const o=this.childNodes;if(e){for(let e=0;e<o.length;e++){if(o[e].nodeType!==2){t.appendChild(o[e].cloneNode(true))}}}return t}};i().then((async e=>{await o();return t(JSON.parse('[["p-6d0fa7c1",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[4,"skip-load-animation"],"skipAnimation":[32]},[[2,"click","stopEvent"],[2,"focusin","stopEvent"]],{"variant":["handlePageOverflow"],"open":["onOpenChanged"]}],[6,"z-tag",{"icon":[1],"expandable":[4]}],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"]}],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-element",{"alignButton":[513,"align-button"],"clickable":[516],"dividerColor":[1,"divider-color"],"dividerType":[1,"divider-type"],"dividerSize":[1,"divider-size"],"expandable":[516],"expandableStyle":[1,"expandable-style"],"listElementId":[514,"list-element-id"],"size":[513],"color":[513],"disabled":[516],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"],"role":[513],"htmlTabindex":[2,"html-tabindex"],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[2,"z-input",{"htmlid":[1],"type":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"ariaExpanded":[1,"aria-expanded"],"ariaControls":[1,"aria-controls"],"ariaAutocomplete":[1,"aria-autocomplete"],"ariaActivedescendant":[1,"aria-activedescendant"],"value":[1025],"disabled":[516],"readonly":[4],"required":[4],"checked":[1028],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"labelPosition":[1,"label-position"],"autocomplete":[1],"role":[1],"hasclearicon":[4],"icon":[1],"min":[2],"minlength":[2],"max":[2],"maxlength":[2],"step":[2],"pattern":[1],"size":[513],"isTyping":[32],"passwordHidden":[32],"isChecked":[64]},[[4,"inputCheck","inputCheckListener"]]],[1,"z-input-message",{"message":[1],"status":[513],"disabled":[516],"statusRole":[32]},null,{"message":["onMessageChange"],"status":["onMessageChange"]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[6,"z-button",{"ariaLabel":[1,"aria-label"],"role":[1],"htmlrole":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"iconPosition":[513,"icon-position"],"size":[513]}],[1,"z-icon",{"name":[1],"height":[8],"width":[8],"iconid":[1],"fill":[1]}]]],["p-b63c8e8b",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-24474394",[[2,"z-select",{"htmlid":[1],"items":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"readonly":[4],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"autocomplete":[4],"noresultslabel":[1],"hasGroupItems":[4,"has-group-items"],"hasTreeItems":[4,"has-tree-items"],"showChildrenOfMatchingParent":[4,"show-children-of-matching-parent"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"flattenedList":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"]}]]],["p-1ad8810a",[[1,"z-breadcrumb",{"pathStyle":[513,"path-style"],"homepageVariant":[1,"homepage-variant"],"maxNodesToShow":[2,"max-nodes-to-show"],"preventFollowUrl":[4,"prevent-follow-url"],"overflowMenuItemRows":[2,"overflow-menu-item-rows"],"truncateChar":[2,"truncate-char"],"viewPortWidth":[32],"hasOverflow":[32],"popoverEllipsisOpen":[32]},[[9,"resize","handleResize"]],{"maxNodesToShow":["handlePropChange"],"viewPortWidth":["handleResizeUp"]}]]],["p-22c755d5",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32],"checkboxes":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"],"checkboxes":["watchCheckboxes"]}]]],["p-e231e811",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-757415e9",[[6,"z-file-upload",{"type":[513],"buttonVariant":[1,"button-variant"],"acceptedFormat":[1,"accepted-format"],"fileMaxSize":[2,"file-max-size"],"mainTitle":[1,"main-title"],"description":[1],"uploadBtnLabel":[1,"upload-btn-label"],"dragAndDropLabel":[1,"drag-and-drop-label"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"inputName":[1,"input-name"],"showErrors":[4,"show-errors"],"_type":[32],"files":[32],"invalidFiles":[32],"input":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","onFileRemoved"],[0,"fileDropped","fileDroppedListener"]]]]],["p-8c164e0d",[[0,"z-pagination",{"label":[1],"navArrows":[4,"nav-arrows"],"totalPages":[2,"total-pages"],"skip":[2],"edges":[4],"split":[2],"visiblePages":[2,"visible-pages"],"currentPage":[1026,"current-page"],"goToPage":[4,"go-to-page"],"_visiblePages":[32],"isMobile":[32],"goToPageValue":[32]},[[9,"resize","onResize"]],{"_visiblePages":["setPagesContainerWidth"],"visiblePages":["setVisiblePages"],"currentPage":["onPageChanged"],"split":["onSplitChanged"]}]]],["p-4cec3345",[[1,"z-tree-list",{"items":[1],"htmlAriaLabelledby":[513,"html-aria-labelledby"],"htmlSectionTitle":[513,"html-section-title"]},null,{"items":["watchItems"]}]]],["p-342b0eb0",[[1,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[516],"arrowsPosition":[513,"arrows-position"],"progressMode":[1,"progress-mode"],"fixedArrows":[516,"fixed-arrows"],"ghostLoadingHeight":[2,"ghost-loading-height"],"infinite":[4],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},null,{"current":["onIndexChange"],"single":["onSingleModeChange"],"infinite":["onInfiniteModeChange"]}]]],["p-817689d5",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"name":[1],"value":[1],"flatpickrPosition":[32],"inputError":[32]},[[2,"keydown","handleKeyDown"]],{"mode":["setupPickers"]}]]],["p-a905df88",[[2,"z-file",{"fileNumber":[2,"file-number"],"fileName":[1,"file-name"],"allowPopover":[32],"popoverVisible":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]]],["p-e3b82454",[[0,"z-range-picker",{"rangePickerId":[1,"range-picker-id"],"firstAriaLabel":[1,"first-aria-label"],"firstLabel":[1,"first-label"],"secondAriaLabel":[1,"second-aria-label"],"secondLabel":[1,"second-label"],"mode":[1],"firstPickerReadOnly":[4,"first-picker-read-only"],"lastPickerReadOnly":[4,"last-picker-read-only"],"firstPickerPlaceholder":[1,"first-picker-placeholder"],"lastPickerPlaceholder":[1,"last-picker-placeholder"],"flatpickrPosition":[32],"activeInput":[32],"firstInputError":[32],"lastInputError":[32]},[[18,"click","handleClick"],[18,"keyup","handleKeyDown"]],{"firstPickerReadOnly":["setupFirstPickersReadOnly"],"lastPickerReadOnly":["setupLastPickersReadOnly"],"mode":["setupPickers"]}]]],["p-e5407cc1",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-d90d2698",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"showSorting":[513,"show-sorting"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"sorted":[1540],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-b7b972c0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsedLabel":[1,"collapsed-label"],"isCollapsed":[516,"is-collapsed"],"collapsed":[32]}]]],["p-165d5acc",[[1,"z-book-card",{"variant":[513],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"year":[1],"ebookUrl":[1,"ebook-url"],"fallbackCover":[1,"fallback-cover"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-cebc9451",[[1,"z-book-card-app",{"logo":[1],"name":[1],"link":[1],"laz":[4],"info":[1]}]]],["p-63c1bde5",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-01302e57",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-3ed25564",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-cb1de7b4",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-d6a7b7f3",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]},null,{"isDisabled":["onDisabledChange"]}]]],["p-539f99db",[[1,"z-book-card-deprecated",{"variant":[1],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"ribbon":[1],"ribbonIcon":[1,"ribbon-icon"],"ribbonInteractive":[4,"ribbon-interactive"],"borderless":[4],"fallbackCover":[1,"fallback-cover"],"operaTitleTag":[1,"opera-title-tag"],"isMobile":[32],"hasResources":[32],"showResources":[32]}]]],["p-4c730d4a",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-ee695830",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-4fbcf534",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-2e0923bd",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-5a24e268",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-962c7f6b",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-816fd6dc",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-e639e1bc",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-8117a929",[[4,"z-navigation-tabs",{"ariaLabel":[1,"aria-label"],"orientation":[513],"size":[513],"selectedTab":[1026,"selected-tab"],"canNavigate":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},[[0,"click","handleTabClick"],[0,"focusin","onTabFocusIn"],[0,"keydown","navigateThroughTabs"],[0,"focusout","onTabFocusOut"]],{"canNavigate":["checkScrollEnabled"],"selectedTab":["onTabSelected"]}]]],["p-ac585bcd",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-caa491ca",[[6,"z-panel-elem",{"elemid":[1],"imgurl":[1],"imgalt":[1],"linkicon":[1],"linklabel":[1],"url":[1],"target":[1],"isdisabled":[4],"descrSlotName":[1,"descr-slot-name"]}]]],["p-ae6604b8",[[1,"z-result-card",{"cardTitle":[1,"card-title"],"cardSubtitle":[1,"card-subtitle"],"authors":[1],"cover":[1],"fallbackCover":[1,"fallback-cover"],"hasMultipleCovers":[4,"has-multiple-covers"],"isInfoCard":[4,"is-info-card"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-fb232d07",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-8bd4a2aa",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-6793061a",[[1,"z-stepper-item",{"index":[514],"href":[513],"pressed":[516],"checked":[516],"disabled":[516]}]]],["p-0eab3c09",[[1,"z-toast-notification",{"heading":[1],"message":[1],"closebutton":[4],"autoclose":[2],"pauseonfocusloss":[4],"type":[1],"isdraggable":[4],"draggablepercentage":[2],"transition":[1],"percentage":[32]},null,{"isdraggable":["watchPropIsdraggable"],"autoclose":["watchPropAutoclose"],"pauseonfocusloss":["watchPropPauseonfocusloss"]}]]],["p-6273db7f",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-8dec332e",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-badd98ad",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-3284e37b",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-74819cbe",[[4,"z-aria-alert",{"mode":[1]}]]],["p-cbab66f7",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-09ba466b",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-5cf3a797",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-0756fe6f",[[1,"z-myz-card-footer",{"titolo":[1],"autori":[1],"isbn":[1],"faded":[4],"cardtype":[1],"opened":[4],"customContent":[4,"custom-content"],"isOpen":[32],"allowTooltipAuthors":[32]},[[0,"toggleClick","handleToggle"]]]]],["p-67edb420",[[1,"z-myz-card-footer-sections"]]],["p-f1c55eda",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-7916e0f7",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-97608d16",[[1,"z-stepper"]]],["p-63d220da",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-237fcaa9",[[1,"z-tbody"]]],["p-d75f8bbb",[[1,"z-tfoot",{"sticky":[516]}]]],["p-9e3da0b7",[[1,"z-thead",{"sticky":[516],"isFocusable":[516,"is-focusable"]}]]],["p-6ca0ee2f",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-8c52635e",[[1,"z-visually-hidden"]]],["p-d8aa6afa",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-dc5ba112",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"ariaLabel":[1,"aria-label"],"size":[513],"open":[32]},[[9,"resize","adjustPanelPosition"],[10,"keydown","handleEscapeKey"]],{"position":["adjustPanelPosition"],"open":["adjustPanelPosition"]}]]],["p-966cbf03",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-e8419614",[[1,"z-alert",{"type":[1]}]]],["p-d6d3a92a",[[1,"z-ghost-loading"]]],["p-689b0280",[[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"],"dragging":[32]}],[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"lockPageScroll":[4,"lock-page-scroll"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-d0d54d42",[[1,"z-myz-card",{"faded":[4],"cardtype":[1],"ispressed":[4],"ishighlighted":[4]}],[1,"z-myz-card-body"],[1,"z-myz-card-cover",{"img":[1],"titolo":[1],"faded":[4],"defaultimg":[1]}],[1,"z-myz-card-header",{"titolo":[1],"faded":[4],"cardtype":[1],"allowTooltip":[32]}]]],["p-2b8eb0c2",[[1,"z-popover",{"position":[1537],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]],{"position":["validatePosition"],"open":["onOpen"],"bindTo":["onBindingChange"]}]]]]'),e)}));
|
|
1
|
+
import{p as e,H as a,b as t}from"./p-75c4a726.js";export{s as setNonce}from"./p-75c4a726.js";import{g as o}from"./p-e1255160.js";var i=()=>{{l(a.prototype)}const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};var l=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const o=this.childNodes;if(e){for(let e=0;e<o.length;e++){if(o[e].nodeType!==2){t.appendChild(o[e].cloneNode(true))}}}return t}};i().then((async e=>{await o();return t(JSON.parse('[["p-6d0fa7c1",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[4,"skip-load-animation"],"skipAnimation":[32]},[[2,"click","stopEvent"],[2,"focusin","stopEvent"]],{"variant":["handlePageOverflow"],"open":["onOpenChanged"]}],[6,"z-tag",{"icon":[1],"expandable":[4]}],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"]}],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-element",{"alignButton":[513,"align-button"],"clickable":[516],"dividerColor":[1,"divider-color"],"dividerType":[1,"divider-type"],"dividerSize":[1,"divider-size"],"expandable":[516],"expandableStyle":[1,"expandable-style"],"listElementId":[514,"list-element-id"],"size":[513],"color":[513],"disabled":[516],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"],"role":[513],"htmlTabindex":[2,"html-tabindex"],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[2,"z-input",{"htmlid":[1],"type":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"ariaExpanded":[1,"aria-expanded"],"ariaControls":[1,"aria-controls"],"ariaAutocomplete":[1,"aria-autocomplete"],"ariaActivedescendant":[1,"aria-activedescendant"],"value":[1025],"disabled":[516],"readonly":[4],"required":[4],"checked":[1028],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"labelPosition":[1,"label-position"],"autocomplete":[1],"role":[1],"hasclearicon":[4],"icon":[1],"min":[2],"minlength":[2],"max":[2],"maxlength":[2],"step":[2],"pattern":[1],"size":[513],"isTyping":[32],"passwordHidden":[32],"isChecked":[64]},[[4,"inputCheck","inputCheckListener"]]],[1,"z-input-message",{"message":[1],"status":[513],"disabled":[516],"statusRole":[32]},null,{"message":["onMessageChange"],"status":["onMessageChange"]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[6,"z-button",{"ariaLabel":[1,"aria-label"],"role":[1],"htmlrole":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"iconPosition":[513,"icon-position"],"size":[513]}],[1,"z-icon",{"name":[1],"height":[8],"width":[8],"iconid":[1],"fill":[1]}]]],["p-b63c8e8b",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-24474394",[[2,"z-select",{"htmlid":[1],"items":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"readonly":[4],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"autocomplete":[4],"noresultslabel":[1],"hasGroupItems":[4,"has-group-items"],"hasTreeItems":[4,"has-tree-items"],"showChildrenOfMatchingParent":[4,"show-children-of-matching-parent"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"flattenedList":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"]}]]],["p-1ad8810a",[[1,"z-breadcrumb",{"pathStyle":[513,"path-style"],"homepageVariant":[1,"homepage-variant"],"maxNodesToShow":[2,"max-nodes-to-show"],"preventFollowUrl":[4,"prevent-follow-url"],"overflowMenuItemRows":[2,"overflow-menu-item-rows"],"truncateChar":[2,"truncate-char"],"viewPortWidth":[32],"hasOverflow":[32],"popoverEllipsisOpen":[32]},[[9,"resize","handleResize"]],{"maxNodesToShow":["handlePropChange"],"viewPortWidth":["handleResizeUp"]}]]],["p-22c755d5",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32],"checkboxes":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"],"checkboxes":["watchCheckboxes"]}]]],["p-e231e811",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-757415e9",[[6,"z-file-upload",{"type":[513],"buttonVariant":[1,"button-variant"],"acceptedFormat":[1,"accepted-format"],"fileMaxSize":[2,"file-max-size"],"mainTitle":[1,"main-title"],"description":[1],"uploadBtnLabel":[1,"upload-btn-label"],"dragAndDropLabel":[1,"drag-and-drop-label"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"inputName":[1,"input-name"],"showErrors":[4,"show-errors"],"_type":[32],"files":[32],"invalidFiles":[32],"input":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","onFileRemoved"],[0,"fileDropped","fileDroppedListener"]]]]],["p-8c164e0d",[[0,"z-pagination",{"label":[1],"navArrows":[4,"nav-arrows"],"totalPages":[2,"total-pages"],"skip":[2],"edges":[4],"split":[2],"visiblePages":[2,"visible-pages"],"currentPage":[1026,"current-page"],"goToPage":[4,"go-to-page"],"_visiblePages":[32],"isMobile":[32],"goToPageValue":[32]},[[9,"resize","onResize"]],{"_visiblePages":["setPagesContainerWidth"],"visiblePages":["setVisiblePages"],"currentPage":["onPageChanged"],"split":["onSplitChanged"]}]]],["p-4cec3345",[[1,"z-tree-list",{"items":[1],"htmlAriaLabelledby":[513,"html-aria-labelledby"],"htmlSectionTitle":[513,"html-section-title"]},null,{"items":["watchItems"]}]]],["p-342b0eb0",[[1,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[516],"arrowsPosition":[513,"arrows-position"],"progressMode":[1,"progress-mode"],"fixedArrows":[516,"fixed-arrows"],"ghostLoadingHeight":[2,"ghost-loading-height"],"infinite":[4],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},null,{"current":["onIndexChange"],"single":["onSingleModeChange"],"infinite":["onInfiniteModeChange"]}]]],["p-817689d5",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"name":[1],"value":[1],"flatpickrPosition":[32],"inputError":[32]},[[2,"keydown","handleKeyDown"]],{"mode":["setupPickers"]}]]],["p-a905df88",[[2,"z-file",{"fileNumber":[2,"file-number"],"fileName":[1,"file-name"],"allowPopover":[32],"popoverVisible":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]]],["p-e3b82454",[[0,"z-range-picker",{"rangePickerId":[1,"range-picker-id"],"firstAriaLabel":[1,"first-aria-label"],"firstLabel":[1,"first-label"],"secondAriaLabel":[1,"second-aria-label"],"secondLabel":[1,"second-label"],"mode":[1],"firstPickerReadOnly":[4,"first-picker-read-only"],"lastPickerReadOnly":[4,"last-picker-read-only"],"firstPickerPlaceholder":[1,"first-picker-placeholder"],"lastPickerPlaceholder":[1,"last-picker-placeholder"],"flatpickrPosition":[32],"activeInput":[32],"firstInputError":[32],"lastInputError":[32]},[[18,"click","handleClick"],[18,"keyup","handleKeyDown"]],{"firstPickerReadOnly":["setupFirstPickersReadOnly"],"lastPickerReadOnly":["setupLastPickersReadOnly"],"mode":["setupPickers"]}]]],["p-e5407cc1",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-d90d2698",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"showSorting":[513,"show-sorting"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"sorted":[1540],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-b7b972c0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsedLabel":[1,"collapsed-label"],"isCollapsed":[516,"is-collapsed"],"collapsed":[32]}]]],["p-165d5acc",[[1,"z-book-card",{"variant":[513],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"year":[1],"ebookUrl":[1,"ebook-url"],"fallbackCover":[1,"fallback-cover"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-cebc9451",[[1,"z-book-card-app",{"logo":[1],"name":[1],"link":[1],"laz":[4],"info":[1]}]]],["p-63c1bde5",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-01302e57",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-3ed25564",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-cb1de7b4",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-d6a7b7f3",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]},null,{"isDisabled":["onDisabledChange"]}]]],["p-539f99db",[[1,"z-book-card-deprecated",{"variant":[1],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"ribbon":[1],"ribbonIcon":[1,"ribbon-icon"],"ribbonInteractive":[4,"ribbon-interactive"],"borderless":[4],"fallbackCover":[1,"fallback-cover"],"operaTitleTag":[1,"opera-title-tag"],"isMobile":[32],"hasResources":[32],"showResources":[32]}]]],["p-4c730d4a",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-ee695830",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-4fbcf534",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-2e0923bd",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-5a24e268",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-962c7f6b",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-816fd6dc",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-e639e1bc",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-8117a929",[[4,"z-navigation-tabs",{"ariaLabel":[1,"aria-label"],"orientation":[513],"size":[513],"selectedTab":[1026,"selected-tab"],"canNavigate":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},[[0,"click","handleTabClick"],[0,"focusin","onTabFocusIn"],[0,"keydown","navigateThroughTabs"],[0,"focusout","onTabFocusOut"]],{"canNavigate":["checkScrollEnabled"],"selectedTab":["onTabSelected"]}]]],["p-ac585bcd",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-caa491ca",[[6,"z-panel-elem",{"elemid":[1],"imgurl":[1],"imgalt":[1],"linkicon":[1],"linklabel":[1],"url":[1],"target":[1],"isdisabled":[4],"descrSlotName":[1,"descr-slot-name"]}]]],["p-7dfa3d66",[[1,"z-result-card",{"cardTitle":[1,"card-title"],"cardSubtitle":[1,"card-subtitle"],"authors":[1],"cover":[1],"fallbackCover":[1,"fallback-cover"],"hasMultipleCovers":[4,"has-multiple-covers"],"isInfoCard":[4,"is-info-card"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-fb232d07",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-8bd4a2aa",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-6793061a",[[1,"z-stepper-item",{"index":[514],"href":[513],"pressed":[516],"checked":[516],"disabled":[516]}]]],["p-0eab3c09",[[1,"z-toast-notification",{"heading":[1],"message":[1],"closebutton":[4],"autoclose":[2],"pauseonfocusloss":[4],"type":[1],"isdraggable":[4],"draggablepercentage":[2],"transition":[1],"percentage":[32]},null,{"isdraggable":["watchPropIsdraggable"],"autoclose":["watchPropAutoclose"],"pauseonfocusloss":["watchPropPauseonfocusloss"]}]]],["p-6273db7f",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-8dec332e",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-badd98ad",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-3284e37b",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-74819cbe",[[4,"z-aria-alert",{"mode":[1]}]]],["p-cbab66f7",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-09ba466b",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-5cf3a797",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-0756fe6f",[[1,"z-myz-card-footer",{"titolo":[1],"autori":[1],"isbn":[1],"faded":[4],"cardtype":[1],"opened":[4],"customContent":[4,"custom-content"],"isOpen":[32],"allowTooltipAuthors":[32]},[[0,"toggleClick","handleToggle"]]]]],["p-67edb420",[[1,"z-myz-card-footer-sections"]]],["p-f1c55eda",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-7916e0f7",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-97608d16",[[1,"z-stepper"]]],["p-63d220da",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-237fcaa9",[[1,"z-tbody"]]],["p-d75f8bbb",[[1,"z-tfoot",{"sticky":[516]}]]],["p-9e3da0b7",[[1,"z-thead",{"sticky":[516],"isFocusable":[516,"is-focusable"]}]]],["p-6ca0ee2f",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-8c52635e",[[1,"z-visually-hidden"]]],["p-d8aa6afa",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-dc5ba112",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"ariaLabel":[1,"aria-label"],"size":[513],"open":[32]},[[9,"resize","adjustPanelPosition"],[10,"keydown","handleEscapeKey"]],{"position":["adjustPanelPosition"],"open":["adjustPanelPosition"]}]]],["p-966cbf03",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-e8419614",[[1,"z-alert",{"type":[1]}]]],["p-d6d3a92a",[[1,"z-ghost-loading"]]],["p-689b0280",[[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"],"dragging":[32]}],[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"lockPageScroll":[4,"lock-page-scroll"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-d0d54d42",[[1,"z-myz-card",{"faded":[4],"cardtype":[1],"ispressed":[4],"ishighlighted":[4]}],[1,"z-myz-card-body"],[1,"z-myz-card-cover",{"img":[1],"titolo":[1],"faded":[4],"defaultimg":[1]}],[1,"z-myz-card-header",{"titolo":[1],"faded":[4],"cardtype":[1],"allowTooltip":[32]}]]],["p-2b8eb0c2",[[1,"z-popover",{"position":[1537],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]],{"position":["validatePosition"],"open":["onOpen"],"bindTo":["onBindingChange"]}]]]]'),e)}));
|
|
2
2
|
//# sourceMappingURL=web-components-library.esm.js.map
|
package/www/index.html
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Albe test application</title> <link rel="stylesheet" type="text/css" href="/build/p-dbdf8ca8.css"> <link rel="modulepreload" href="/build/p-
|
|
1
|
+
<!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Albe test application</title> <link rel="stylesheet" type="text/css" href="/build/p-dbdf8ca8.css"> <link rel="modulepreload" href="/build/p-7894658c.js"><link rel="modulepreload" href="/build/p-17af7fb2.js"><link rel="modulepreload" href="/build/p-5145a606.js"><link rel="modulepreload" href="/build/p-625e2cee.js"><link rel="modulepreload" href="/build/p-75c4a726.js"><script type="module" src="/build/p-7894658c.js" data-stencil data-resources-url="/build/" data-stencil-namespace="web-components-library"></script> <script nomodule="" src="/build/web-components-library.js" data-stencil></script> </head> <body> <header> <z-app-header> <h1 slot="title">Albe test app</h1> </z-app-header> </header> <main></main> <style>body {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}</style> </body></html>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as i,h as e,a as t,g as o}from"./p-75c4a726.js";import{i as s}from"./p-8d923a1d.js";const a=":host{display:flex;overflow:hidden;min-width:0;height:calc(174px - var(--space-unit) * 2);max-height:calc(174px - var(--space-unit) * 2);padding:var(--space-unit);border:var(--border-size-medium) 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}.z-cover-container{position:relative;display:flex;width:119px;height:158px;align-items:center;justify-items:center}.z-cover-stack{width:100%;height:100%}.z-cover-shadow,.z-cover-img{width:117px;height:156px}.z-cover-container.has-multiple .z-cover-shadow,.z-cover-container.has-multiple .z-cover-img{width:105px;height:140px}.z-cover-shadow{position:absolute;z-index:1;background-color:var(--color-white)}.z-shadow-1{z-index:0;top:var(--space-unit);right:6px;border:var(--border-size-small) solid black}.z-shadow-2{z-index:0;top:calc(var(--space-unit) * 2);right:12px;border:var(--border-size-small) solid black}.z-cover-img{position:absolute;z-index:0;top:0;right:0;display:flex;align-items:start;justify-content:center;border:var(--border-size-small) solid black;background-color:var(--color-white);object-fit:cover;object-position:left}.z-cover-img>img{max-width:100%;max-height:100%}.z-cover-container.has-multiple .z-cover-img{left:12px}: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)}.authors-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;-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.5;word-break:break-word}.card-title>*{all:unset}.card-subtitle{overflow:hidden;color:var(--color-default-text);text-overflow:ellipsis;white-space:nowrap}.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}.tags-container{display:flex;max-width:100%;flex-wrap:wrap;margin-top:calc(var(--space-unit) * 2);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;height:calc(76px - var(--space-unit) * 2);max-height:calc(76px - var(--space-unit) * 2)}.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) * 3);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}.info-icon{width:18px;height:18px;color:var(--color-default-text)}@media (max-width: 768px){.card-title{display:block;overflow:hidden;line-height:normal;text-overflow:ellipsis;white-space:nowrap}}";const r=a;const n=class{constructor(o){i(this,o);this.resizeHandler=()=>{this.setTooltipTitle(this.authorsRef);this.setTooltipTitle(this.titleRef);this.setTooltipTitle(this.subtitleRef)};this.renderOperaCard=()=>{const i=this.titleHtmlTag?`<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>`:this.cardTitle;return e(t,{tabIndex:0},e("div",{class:`z-cover-container ${this.hasMultipleCovers?"has-multiple":""}`},e("div",{class:"z-cover-stack"},this.hasMultipleCovers&&e("div",null,e("div",{class:"z-cover-shadow z-shadow-2"}),e("div",{class:"z-cover-shadow z-shadow-1"})),e("div",{class:"z-cover-img"},e("img",{src:this.cover||this.fallbackCover||s,alt:"",onError:()=>{if(this.fallbackCover){this.cover=this.fallbackCover}else{this.cover=s}}})))),e("div",{class:"info-container"},this.authors&&e("span",{class:"authors-label",ref:i=>this.authorsRef=i},this.authors),e("div",{class:"card-title",ref:i=>this.titleRef=i,innerHTML:i}),e("span",{class:"card-subtitle",ref:i=>this.subtitleRef=i},this.cardSubtitle),e("div",{class:"tags-container"},e("slot",{name:"tags"})),e("div",{class:"volumes-label"},e("slot",{name:"volumes"}))))};this.renderInfoCard=()=>e(t,{tabIndex:0,class:"info-card"},e("div",{class:"info-icon-column"},e("div",{class:"info-icon-container"},e("z-icon",{class:"info-icon",name:"link",width:18,height:18}))),e("div",{class:"info-container"},e("span",{class:"card-title info-title",ref:i=>this.titleRef=i},this.cardTitle),e("span",{class:"card-subtitle info-subtitle",ref:i=>this.subtitleRef=i},this.cardSubtitle)));this.cardTitle=undefined;this.cardSubtitle=undefined;this.authors=undefined;this.cover=undefined;this.fallbackCover=undefined;this.hasMultipleCovers=false;this.isInfoCard=false;this.titleHtmlTag=undefined}setTooltipTitle(i){if(!i){return}const e=window.getComputedStyle(i);const t=e.getPropertyValue("-webkit-line-clamp")!=="none";let o;if(t){const t=parseInt(e.lineHeight);const s=parseInt(e.getPropertyValue("-webkit-line-clamp"));const a=t*s;o=i.scrollHeight>a}else{o=i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight}if(o){i.setAttribute("title",i.textContent.trim())}else{i.removeAttribute("title")}}componentDidRender(){this.setTooltipTitle(this.authorsRef);this.setTooltipTitle(this.titleRef);this.setTooltipTitle(this.subtitleRef)}componentDidLoad(){window.addEventListener("resize",this.resizeHandler)}disconnectedCallback(){window.removeEventListener("resize",this.resizeHandler)}render(){return this.isInfoCard?this.renderInfoCard():this.renderOperaCard()}get hostElement(){return o(this)}};n.style=r;export{n as z_result_card};
|
|
2
|
-
//# sourceMappingURL=p-ae6604b8.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZResultCardStyle0","ZResultCard","this","resizeHandler","setTooltipTitle","authorsRef","titleRef","subtitleRef","renderOperaCard","title","titleHtmlTag","cardTitle","h","Host","tabIndex","class","hasMultipleCovers","src","cover","fallbackCover","defaultFallbackCover","alt","onError","authors","ref","el","innerHTML","cardSubtitle","name","renderInfoCard","width","height","style","window","getComputedStyle","hasLineClamp","getPropertyValue","isTruncated","lineHeight","parseInt","maxLines","maxHeight","scrollHeight","scrollWidth","clientWidth","clientHeight","setAttribute","textContent","trim","removeAttribute","componentDidRender","componentDidLoad","addEventListener","disconnectedCallback","removeEventListener","render","isInfoCard"],"sources":["src/components/result-card/z-result-card/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 min-width: 0;\n height: calc(174px - var(--space-unit) * 2);\n max-height: calc(174px - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) 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.z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-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: 117px;\n height: 156px;\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: 105px;\n height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 0;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 0;\n top: 0;\n right: 0;\n display: flex;\n align-items: start;\n justify-content: center;\n border: var(--border-size-small) solid black;\n background-color: var(--color-white);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-img > img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\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.authors-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 -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.5;\n word-break: break-word;\n}\n\n.card-title > * {\n all: unset;\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.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.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\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 height: calc(76px - var(--space-unit) * 2);\n max-height: calc(76px - var(--space-unit) * 2);\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) * 3);\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.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 line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n >\n {this.cardTitle}\n </span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"mappings":"6FAAA,M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BACTH,EAAA,UACEG,MAAM,YACNa,KAAK,OACLE,MAAO,GACPC,OAAQ,OAIdnB,EAAA,OAAKG,MAAM,kBACTH,EAAA,QACEG,MAAM,wBACNS,IAAMC,GAAQvB,KAAKI,SAAWmB,GAE7BvB,KAAKS,WAERC,EAAA,QACEG,MAAM,8BACNS,IAAMC,GAAQvB,KAAKK,YAAckB,GAEhCvB,KAAKyB,gB,qJA7JI,M,gBAOP,M,4BAeL,eAAAvB,CAAgBqB,GACtB,IAAKA,EAAI,CACP,M,CAIF,MAAMO,EAAQC,OAAOC,iBAAiBT,GACtC,MAAMU,EAAeH,EAAMI,iBAAiB,wBAA0B,OAEtE,IAAIC,EACJ,GAAIF,EAAc,CAEhB,MAAMG,EAAaC,SAASP,EAAMM,YAClC,MAAME,EAAWD,SAASP,EAAMI,iBAAiB,uBACjD,MAAMK,EAAYH,EAAaE,EAE/BH,EAAcZ,EAAGiB,aAAeD,C,KAC3B,CAELJ,EAAcZ,EAAGkB,YAAclB,EAAGmB,aAAenB,EAAGiB,aAAejB,EAAGoB,Y,CAGxE,GAAIR,EAAa,CACfZ,EAAGqB,aAAa,QAASrB,EAAGsB,YAAYC,O,KACnC,CACLvB,EAAGwB,gBAAgB,Q,EAIvB,kBAAAC,GACEhD,KAAKE,gBAAgBF,KAAKG,YAC1BH,KAAKE,gBAAgBF,KAAKI,UAC1BJ,KAAKE,gBAAgBF,KAAKK,Y,CAS5B,gBAAA4C,GACElB,OAAOmB,iBAAiB,SAAUlD,KAAKC,c,CAGzC,oBAAAkD,GACEpB,OAAOqB,oBAAoB,SAAUpD,KAAKC,c,CAgG5C,MAAAoD,GACE,OAAOrD,KAAKsD,WAAatD,KAAK2B,iBAAmB3B,KAAKM,iB","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as i,h as e,a as t,g as o}from"./p-75c4a726.js";import{i as s}from"./p-8d923a1d.js";const a=":host{display:flex;overflow:hidden;min-width:0;height:calc(174px - var(--space-unit) * 2);max-height:calc(174px - var(--space-unit) * 2);padding:var(--space-unit);border:var(--border-size-medium) 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}.z-cover-container{position:relative;display:flex;width:119px;height:158px;align-items:center;justify-items:center}.z-cover-stack{width:100%;height:100%}.z-cover-shadow,.z-cover-img{width:117px;height:156px}.z-cover-container.has-multiple .z-cover-shadow,.z-cover-container.has-multiple .z-cover-img{width:105px;height:140px}.z-cover-shadow{position:absolute;z-index:1;background-color:var(--color-white)}.z-shadow-1{z-index:0;top:var(--space-unit);right:6px;border:var(--border-size-small) solid black}.z-shadow-2{z-index:0;top:calc(var(--space-unit) * 2);right:12px;border:var(--border-size-small) solid black}.z-cover-img{position:absolute;z-index:0;top:0;right:0;display:flex;align-items:start;justify-content:center;border:var(--border-size-small) solid black;background-color:var(--color-white);object-fit:cover;object-position:left}.z-cover-img>img{max-width:100%;max-height:100%}.z-cover-container.has-multiple .z-cover-img{left:12px}: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)}.authors-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;-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.5;word-break:break-word}.card-title>*{all:unset}.card-subtitle{overflow:hidden;color:var(--color-default-text);text-overflow:ellipsis;white-space:nowrap}.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}.tags-container{display:flex;max-width:100%;flex-wrap:wrap;margin-top:calc(var(--space-unit) * 2);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;height:calc(76px - var(--space-unit) * 2);max-height:calc(76px - var(--space-unit) * 2)}.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) * 3);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}.info-icon{width:18px;height:18px;color:var(--color-default-text)}@media (max-width: 768px){.card-title{display:block;overflow:hidden;line-height:normal;text-overflow:ellipsis;white-space:nowrap}}";const r=a;const n=class{constructor(o){i(this,o);this.resizeHandler=()=>{this.setTooltipTitle(this.authorsRef);this.setTooltipTitle(this.titleRef);this.setTooltipTitle(this.subtitleRef)};this.renderOperaCard=()=>{const i=this.titleHtmlTag?`<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>`:this.cardTitle;return e(t,{tabIndex:0},e("div",{class:`z-cover-container ${this.hasMultipleCovers?"has-multiple":""}`},e("div",{class:"z-cover-stack"},this.hasMultipleCovers&&e("div",null,e("div",{class:"z-cover-shadow z-shadow-2"}),e("div",{class:"z-cover-shadow z-shadow-1"})),e("div",{class:"z-cover-img"},e("img",{src:this.cover||this.fallbackCover||s,alt:"",onError:()=>{if(this.fallbackCover){this.cover=this.fallbackCover}else{this.cover=s}}})))),e("div",{class:"info-container"},this.authors&&e("span",{class:"authors-label",ref:i=>this.authorsRef=i},this.authors),e("div",{class:"card-title",ref:i=>this.titleRef=i,innerHTML:i}),e("span",{class:"card-subtitle",ref:i=>this.subtitleRef=i},this.cardSubtitle),e("div",{class:"tags-container"},e("slot",{name:"tags"})),e("div",{class:"volumes-label"},e("slot",{name:"volumes"}))))};this.renderInfoCard=()=>e(t,{tabIndex:0,class:"info-card"},e("div",{class:"info-icon-column"},e("div",{class:"info-icon-container"},e("z-icon",{class:"info-icon",name:"link",width:18,height:18}))),e("div",{class:"info-container"},e("span",{class:"card-title info-title",ref:i=>this.titleRef=i},this.cardTitle),e("span",{class:"card-subtitle info-subtitle",ref:i=>this.subtitleRef=i},this.cardSubtitle)));this.cardTitle=undefined;this.cardSubtitle=undefined;this.authors=undefined;this.cover=undefined;this.fallbackCover=undefined;this.hasMultipleCovers=false;this.isInfoCard=false;this.titleHtmlTag=undefined}setTooltipTitle(i){if(!i){return}const e=window.getComputedStyle(i);const t=e.getPropertyValue("-webkit-line-clamp")!=="none";let o;if(t){const t=parseInt(e.lineHeight);const s=parseInt(e.getPropertyValue("-webkit-line-clamp"));const a=t*s;o=i.scrollHeight>a}else{o=i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight}if(o){i.setAttribute("title",i.textContent.trim())}else{i.removeAttribute("title")}}componentDidRender(){this.setTooltipTitle(this.authorsRef);this.setTooltipTitle(this.titleRef);this.setTooltipTitle(this.subtitleRef)}componentDidLoad(){window.addEventListener("resize",this.resizeHandler)}disconnectedCallback(){window.removeEventListener("resize",this.resizeHandler)}render(){return this.isInfoCard?this.renderInfoCard():this.renderOperaCard()}get hostElement(){return o(this)}};n.style=r;export{n as z_result_card};
|
|
2
|
-
//# sourceMappingURL=p-ae6604b8.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZResultCardStyle0","ZResultCard","this","resizeHandler","setTooltipTitle","authorsRef","titleRef","subtitleRef","renderOperaCard","title","titleHtmlTag","cardTitle","h","Host","tabIndex","class","hasMultipleCovers","src","cover","fallbackCover","defaultFallbackCover","alt","onError","authors","ref","el","innerHTML","cardSubtitle","name","renderInfoCard","width","height","style","window","getComputedStyle","hasLineClamp","getPropertyValue","isTruncated","lineHeight","parseInt","maxLines","maxHeight","scrollHeight","scrollWidth","clientWidth","clientHeight","setAttribute","textContent","trim","removeAttribute","componentDidRender","componentDidLoad","addEventListener","disconnectedCallback","removeEventListener","render","isInfoCard"],"sources":["src/components/result-card/z-result-card/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 min-width: 0;\n height: calc(174px - var(--space-unit) * 2);\n max-height: calc(174px - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) 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.z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-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: 117px;\n height: 156px;\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: 105px;\n height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 0;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 0;\n top: 0;\n right: 0;\n display: flex;\n align-items: start;\n justify-content: center;\n border: var(--border-size-small) solid black;\n background-color: var(--color-white);\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-img > img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\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.authors-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 -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.5;\n word-break: break-word;\n}\n\n.card-title > * {\n all: unset;\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.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.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\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 height: calc(76px - var(--space-unit) * 2);\n max-height: calc(76px - var(--space-unit) * 2);\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) * 3);\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.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 line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\nimport defaultFallbackCover from \"../../../assets/images/png/placeholder-cover.png\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: 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 /** [optional] Fallback cover URL */\n @Prop()\n fallbackCover?: 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 /**\n * [optional]\n * Use for insert heading when needed.\n */\n @Prop()\n titleHtmlTag?: string;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n const title = this.titleHtmlTag ? `<${this.titleHtmlTag}>${this.cardTitle}</${this.titleHtmlTag}>` : this.cardTitle;\n\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 <div class=\"z-cover-img\">\n <img\n src={this.cover || this.fallbackCover || defaultFallbackCover}\n alt=\"\"\n onError={() => {\n if (this.fallbackCover) {\n this.cover = this.fallbackCover;\n } else {\n this.cover = defaultFallbackCover;\n }\n }}\n />\n </div>\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <div\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n innerHTML={title}\n ></div>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\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 <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n >\n {this.cardTitle}\n </span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAY,k2GAClB,MAAAC,EAAeD,E,MCOFE,EAAW,M,yBA8FdC,KAAAC,cAAgB,KACtBD,KAAKE,gBAAgBF,KAAKG,YAC1BH,KAAKE,gBAAgBF,KAAKI,UAC1BJ,KAAKE,gBAAgBF,KAAKK,YAAY,EAWhCL,KAAAM,gBAAkB,KACxB,MAAMC,EAAQP,KAAKQ,aAAe,IAAIR,KAAKQ,gBAAgBR,KAAKS,cAAcT,KAAKQ,gBAAkBR,KAAKS,UAE1G,OACEC,EAACC,EAAI,CAACC,SAAU,GACdF,EAAA,OAAKG,MAAO,qBAAqBb,KAAKc,kBAAoB,eAAiB,MACzEJ,EAAA,OAAKG,MAAM,iBACRb,KAAKc,mBACJJ,EAAA,WACEA,EAAA,OAAKG,MAAM,8BACXH,EAAA,OAAKG,MAAM,+BAGfH,EAAA,OAAKG,MAAM,eACTH,EAAA,OACEK,IAAKf,KAAKgB,OAAShB,KAAKiB,eAAiBC,EACzCC,IAAI,GACJC,QAAS,KACP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