@zanichelli/albe-web-components 9.1.0-RC1 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/dist/cjs/{icons-a9849a41.js → icons-bff00e77.js} +11 -0
- package/dist/cjs/index-e3299e0a.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-header_11.cjs.entry.js +3 -3
- package/dist/cjs/z-book-card.cjs.entry.js +19 -26
- package/dist/cjs/z-carousel.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tab-link.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +1 -3
- package/dist/collection/components/icons/icons.js +11 -0
- package/dist/collection/components/navigation/z-app-header/index.js +1 -1
- package/dist/collection/components/navigation/z-app-header/styles.css +5 -1
- package/dist/collection/components/table/z-table/index.js +1 -3
- package/dist/collection/components/z-book-card/index.js +19 -41
- package/dist/collection/components/z-book-card/styles.css +92 -61
- package/dist/collection/components/z-carousel/index.js +1 -1
- package/dist/esm/{icons-6cd265c6.js → icons-cc83787f.js} +11 -0
- package/dist/esm/index-a2ca4b97.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-header_11.entry.js +3 -3
- package/dist/esm/z-book-card.entry.js +20 -27
- package/dist/esm/z-carousel.entry.js +1 -1
- package/dist/esm/z-navigation-tab-link.entry.js +1 -1
- package/dist/esm/z-navigation-tab.entry.js +1 -1
- package/dist/esm/z-table.entry.js +1 -3
- package/dist/types/components/icons/icons.d.ts +22 -0
- package/dist/types/components/table/z-table/index.d.ts +1 -3
- package/dist/types/components/z-book-card/index.d.ts +1 -5
- package/dist/web-components-library/p-1e77cacb.entry.js +1 -0
- package/dist/web-components-library/p-4d1bfd27.entry.js +1 -0
- package/dist/web-components-library/{p-9e18b3a5.entry.js → p-8b569b6d.entry.js} +1 -1
- package/dist/web-components-library/p-dc12178a.entry.js +1 -0
- package/dist/web-components-library/p-def17ce8.js +1 -0
- package/{www/build/p-75a7954d.entry.js → dist/web-components-library/p-f2ea3bb8.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-1e77cacb.entry.js +1 -0
- package/www/build/p-4d1bfd27.entry.js +1 -0
- package/www/build/{p-9e18b3a5.entry.js → p-8b569b6d.entry.js} +1 -1
- package/www/build/p-d630a8a6.js +1 -0
- package/www/build/p-dc12178a.entry.js +1 -0
- package/www/build/p-def17ce8.js +1 -0
- package/{dist/web-components-library/p-75a7954d.entry.js → www/build/p-f2ea3bb8.entry.js} +1 -1
- package/www/build/p-f39bb490.css +2 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/www/pages/book-cards.html +6 -6
- package/dist/web-components-library/p-6e324199.entry.js +0 -1
- package/dist/web-components-library/p-912df398.entry.js +0 -1
- package/dist/web-components-library/p-bb85c467.js +0 -1
- package/dist/web-components-library/p-d19e1987.entry.js +0 -1
- package/www/build/p-6e324199.entry.js +0 -1
- package/www/build/p-912df398.entry.js +0 -1
- package/www/build/p-b8842f77.js +0 -129
- package/www/build/p-bb85c467.js +0 -1
- package/www/build/p-bc2bd463.css +0 -1617
- package/www/build/p-d19e1987.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,g as i}from"./p-d17ebc2f.js";import{Y as r}from"./p-e1d9785e.js";import{m as o}from"./p-b497e33e.js";import{r as a,h as s}from"./p-aa5e3e61.js";const n=class{constructor(e){t(this,e),this.isMobile=!1,this.hasResources=!1,this.showResources=!1,this.moveFocusToResources=!1}handleResize(){this.isMobile=window.innerWidth<=o}componentWillLoad(){this.id=`id-${a()}`,this.handleResize()}componentWillRender(){this.handleResources()}componentDidRender(){this.moveFocusToResources&&(this.resourcesWrapper.focus(),this.moveFocusToResources=!1)}handleResources(){var t;this.variant===r.EXPANDED&&this.isMobile&&(this.hasResources=(null===(t=this.hostElement.querySelectorAll("[slot=resources]"))||void 0===t?void 0:t.length)>0)}toggleResources(){this.showResources=!this.showResources,this.showResources&&(this.moveFocusToResources=!0)}renderCard(){switch(this.variant){case r.EXPANDED:return this.isMobile?this.renderMobileExpandedCard():this.renderExpandedCard();case r.COMPACT:return this.renderCompactCard();case r.SEARCH:return this.renderSearchCard()}}renderExpandedCard(){return e("div",{class:"wrapper"},this.renderCover(),e("div",{class:"content"},e("div",{class:"top"},e("div",{class:"info"},e("div",{class:"left"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),e("div",{class:"right"},this.renderHeaderCtaSlot())),this.renderTagsSlot()),e("div",{class:"bottom"},this.renderResourcesSlot())))}renderMobileExpandedCard(){return e("div",{class:"wrapper"},e("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),e("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn()),this.hasResources&&e("div",{class:"footer "+(this.showResources?"open":"close")},this.renderResourcesSlot(),this.renderShowResources()))}renderSearchCard(){return e("div",{class:"wrapper-container"},e("div",{class:"wrapper"},e("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),e("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn())),this.renderFooterCtaSlot())}renderCompactCard(){return e("div",{class:"wrapper"},this.renderCover(),e("div",{class:"content"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),this.renderFooterCtaSlot())}renderCover(){return e("div",{class:"cover"},this.ribbon&&this.variant!==r.COMPACT&&e("div",{class:"ribbon"},e("span",null,this.ribbon)),e("img",{src:this.cover,onError:()=>{this.fallbackCover&&(this.cover=this.fallbackCover)},"aria-hidden":"true"}))}renderOperaTitle(){return e("div",{class:"title",innerHTML:this.operaTitleTag?`<${this.operaTitleTag}>${this.operaTitle}</${this.operaTitleTag}>`:this.operaTitle})}renderVolumeTitle(){return this.volumeTitle?e("div",{class:"subtitle"},this.volumeTitle):null}renderAuthors(){return this.authors?e("div",{class:"authors","aria-description":"Autori"},this.authors):null}renderIsbn(){return this.isbn?e("div",{class:"isbn"},e("span",{class:"code","aria-description":"ISBN edizione cartacea"},this.isbn),e("span",{class:"label"}," (ed. cartacea)")):null}renderShowResources(){return e("z-link",{icon:this.showResources?"chevron-up":"chevron-down",iconposition:"right",role:"button",class:"show-resources","aria-label":`Risorse del libro ${this.operaTitle}`,"aria-expanded":this.showResources.toString(),"aria-haspopup":"menu","aria-controls":`resources-${this.id}`,onClick:()=>this.toggleResources(),onKeyUp:t=>s(t,this.toggleResources.bind(this))},this.showResources?"Chiudi":"Vedi tutto")}renderTagsSlot(){return e("div",{class:"tags"},e("slot",{name:"tags"}))}renderHeaderCtaSlot(){return e("slot",{name:"header-cta"})}renderResourcesSlot(){return e("div",{id:`resources-${this.id}`,class:"resources",tabIndex:this.showResources?0:-1,ref:t=>this.resourcesWrapper=t},e("slot",{name:"resources"}))}renderFooterCtaSlot(){return e("div",{class:"action-container"},e("slot",{name:"footer-cta"}))}render(){return e("article",{class:`${this.variant} ${this.borderless?"borderless":""}`},this.renderCard())}get hostElement(){return i(this)}};n.style=':host{--z-book-card-ribbon-background-color:var(--avatar-C08);--z-book-card-ribbon-shadow-color:var(--green950);--z-book-card-compact-width:262px;--z-book-card-compact-height:600px;display:block;width:100%;max-width:360px;border-radius:var(--border-radius);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>article{max-width:100%;box-sizing:border-box;border:var(--border-size-medium) solid var(--color-surface03);background-color:var(--color-surface01);border-radius:var(--border-radius)}:host div.cover{position:relative;display:flex;border:var(--border-size-small) solid var(--color-surface03);border-radius:var(--border-radius);line-height:0}:host div.cover img{width:auto;max-width:100%;height:auto;max-height:100%;align-self:flex-end}:host div.cover div.ribbon{position:absolute;top:calc(var(--space-unit) * 2);display:flex;max-width:100%;height:calc(var(--space-unit) * 4);box-sizing:border-box;align-items:center;padding:0 calc(var(--space-unit) * 2);border:var(--border-size-medium) solid var(--color-surface01);margin-left:calc(var(--space-unit) * -2);background:var(--z-book-card-ribbon-background-color);border-radius:0 var(--border-radius) var(--border-radius) 0;color:var(--color-text04);font-size:var(--font-size-2);font-weight:var(--font-sb);line-height:initial}:host div.cover div.ribbon span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:nowrap}:host div.cover div.ribbon::before{position:absolute;bottom:-12px;left:0;width:0;height:0;border-top:10px solid var(--z-book-card-ribbon-shadow-color);border-left:14px solid transparent;content:""}:host>article div.content{margin:var(--space-unit) 0;border-radius:var(--border-radius)}:host div.title{color:var(--color-text02);font-size:var(--font-size-4);font-weight:var(--font-sb);line-height:1.5}:host div.title *{all:unset}:host div.subtitle{color:var(--color-text02);font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:1.4}:host div.authors{color:var(--color-text02);font-size:var(--font-size-1);font-weight:var(--font-rg);line-height:1.33}:host div.isbn{overflow:hidden;color:var(--color-text02);font-size:var(--font-size-2);line-height:1.33;text-overflow:ellipsis;white-space:nowrap;word-wrap:nowrap}:host div.isbn>.code{font-weight:var(--font-sb)}:host div.tags{display:flex;overflow:hidden;max-height:32px;flex-flow:row wrap;align-content:stretch;align-items:stretch;justify-content:flex-start;gap:calc(var(--space-unit) / 2)}:host ::slotted([slot="tags"]){margin-bottom:var(--space-unit)}:host ::slotted([slot="header-cta"]){--z-icon-width:20px;--z-icon-height:20px;padding:var(--space-unit);cursor:pointer;fill:var(--color-icon01)}:host>article.expanded{width:100%;min-width:328px;padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.expanded div.header{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:top;justify-content:space-between;margin-bottom:var(--space-unit);white-space:nowrap}:host>article.expanded div.cover img{width:100%;border-bottom-left-radius:var(--border-radius);border-top-left-radius:var(--border-radius)}:host>article.expanded .title,:host>article.expanded .subtitle,:host>article.expanded .authors{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:initial}:host>article.expanded div.footer{border-top:var(--border-size-small) solid var(--color-surface03);margin-bottom:calc(var(--space-unit) * 1.5)}:host>article.expanded div.footer.open{padding-top:calc(var(--space-unit) * 1.5)}:host>article.expanded div.footer.open div.resources{display:initial}:host>article.expanded div.footer.close div.resources{display:none}:host>article.expanded z-link.show-resources{--font-size-link:var(--font-size-2);--font-weight-link:var(--font-sb);display:flex;width:100%;flex-flow:row nowrap;align-content:center;align-items:center;justify-content:center;padding-top:var(--space-unit)}:host>article.search{width:262px;height:536px;padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.search .wrapper-container{display:flex;height:100%;flex-direction:column;justify-content:space-between}:host>article.search .wrapper-container .wrapper{height:451px}:host>article.search .wrapper-container .action-container{padding-bottom:calc(var(--space-unit) * 2);margin:auto;margin-bottom:0}:host>article.search div.header{display:flex;height:24px;flex-flow:row nowrap;align-content:stretch;align-items:center;justify-content:space-between;margin-bottom:calc(var(--space-unit) * 1.5);white-space:nowrap}:host>article.search div.cover{height:314px;border-radius:var(--border-radius)}:host>article.search div.title{font-size:var(--font-size-3)}:host>article.search .title,:host>article.search .subtitle,:host>article.search .authors{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:nowrap}:host>article.compact{width:var(--z-book-card-compact-width);height:var(--z-book-card-compact-height)}:host>article.compact.borderless{border:none}:host>article.compact div.cover{width:calc(var(--z-book-card-compact-width) - 4px);height:calc(var(--z-book-card-compact-width) * 1.4);box-sizing:border-box;border-color:transparent;border-bottom-color:var(--color-surface03);background:var(--color-white);border-radius:var(--border-radius)}:host>article.compact div.wrapper{display:flex;height:100%;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:flex-start}:host>article.compact div.content{display:flex;box-sizing:border-box;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;padding:calc(var(--space-unit) * 2);margin:0}:host>article.compact div.action-container{padding:calc(var(--space-unit) * 2);padding-top:0;margin-top:auto}:host>article.compact.borderless div.cover{width:var(--z-book-card-compact-width);border-color:var(--color-surface03)}:host>article.compact.borderless div.content{padding:0;padding-top:var(--space-unit)}:host>article.compact.borderless div.action-container{padding:0;padding-bottom:calc(var(--space-unit) * 2)}:host>article.compact .title,:host>article.compact .subtitle,:host>article.compact .authors{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:initial}@media (min-width: 768px){:host{width:100%;max-width:initial}:host>article.expanded{width:100%;min-width:initial;max-width:initial;height:360px;padding:0}:host>article.expanded div.wrapper{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:stretch;justify-content:flex-start}:host>article.expanded div.cover{width:262px;height:356px;border:0;background:var(--color-surface01);border-radius:0}:host>article.expanded div.cover img{width:auto;min-width:265px}:host>article.expanded div.cover div.ribbon::before{border-left:12px solid transparent}:host>article.expanded div.content{display:flex;overflow:hidden;width:100%;height:356px;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;margin:0;background:var(--color-surface01)}:host>article.expanded div.content div.top{padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.expanded div.content div.top div.info{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;margin-bottom:calc(var(--space-unit) / 2)}:host>article.expanded div.content div.top div.info>div.left{width:100%}:host>article.expanded div.content div.bottom{padding:calc(var(--space-unit) * 2);padding-bottom:0}}@media (min-width: 1152px){:host{width:initial;max-width:initial}:host>article.expanded{width:635px}:host>article.expanded div.content{width:369px}}';export{n as z_book_card}
|