@zanichelli/albe-web-components 7.3.7 → 7.4.0
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 +2540 -0
- package/dist/cjs/{breakpoints-88c4fd6c.js → breakpoints-ebe1a437.js} +3 -1
- package/dist/cjs/{index-2dfdb7e2.js → index-b7c319f2.js} +11 -0
- package/dist/cjs/index-e3299e0a.js +2 -6
- package/dist/cjs/index.cjs.js +15 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-b447f1da.js → utils-38f8555a.js} +5 -3
- package/dist/cjs/{utils-f21f9a4f.js → utils-938e5834.js} +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
- package/dist/cjs/{z-app-header_11.cjs.entry.js → z-app-header_13.cjs.entry.js} +572 -23
- package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-avatar.cjs.entry.js +1 -1
- package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
- package/dist/cjs/z-card.cjs.entry.js +1 -1
- package/dist/cjs/z-carousel.cjs.entry.js +1 -1
- package/dist/cjs/z-chip.cjs.entry.js +4 -4
- package/dist/cjs/z-combobox.cjs.entry.js +3 -3
- package/dist/cjs/z-contextual-menu.cjs.entry.js +1 -1
- package/dist/cjs/z-cover-hero.cjs.entry.js +1 -1
- package/dist/cjs/z-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +1 -1
- package/dist/cjs/z-file-upload.cjs.entry.js +4 -4
- package/dist/cjs/z-file.cjs.entry.js +2 -2
- package/dist/cjs/z-info-reveal.cjs.entry.js +1 -1
- package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
- package/dist/cjs/z-myz-card_4.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list-item.cjs.entry.js +3 -3
- 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-navigation-tabs.cjs.entry.js +1 -1
- package/dist/cjs/z-otp.cjs.entry.js +1 -1
- package/dist/cjs/z-pagination.cjs.entry.js +1 -1
- package/dist/cjs/z-pocket_3.cjs.entry.js +3 -3
- package/dist/cjs/z-range-picker.cjs.entry.js +2 -2
- package/dist/cjs/z-section-title.cjs.entry.js +1 -1
- package/dist/cjs/z-select.cjs.entry.js +3 -3
- package/dist/cjs/z-skip-to-content.cjs.entry.js +3 -3
- package/dist/cjs/z-slideshow.cjs.entry.js +3 -3
- package/dist/cjs/z-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/z-table-header.cjs.entry.js +3 -3
- package/dist/cjs/z-table-row.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +2 -2
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js +2 -2
- package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
- package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
- package/dist/collection/beans/index.js +11 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/buttons/z-chip/index.js +1 -1
- package/dist/collection/components/file-upload/z-file-upload/index.js +1 -1
- package/dist/collection/components/z-breadcrumb/index.js +421 -0
- package/dist/collection/components/z-breadcrumb/styles.css +139 -0
- package/dist/collection/constants/breakpoints.js +3 -2
- package/dist/collection/utils/utils.js +4 -2
- package/dist/esm/breakpoints-9b81eb1b.js +5 -0
- package/dist/esm/{index-f3202f58.js → index-7e4df1be.js} +12 -1
- package/dist/esm/index-a2ca4b97.js +2 -6
- package/dist/esm/index.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-930405dd.js → utils-af924ea4.js} +1 -1
- package/dist/esm/{utils-0cfc97ad.js → utils-b7bdd1bf.js} +6 -4
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js +1 -1
- package/dist/esm/{z-app-header_11.entry.js → z-app-header_13.entry.js} +571 -24
- package/dist/esm/z-aria-alert.entry.js +1 -1
- package/dist/esm/z-avatar.entry.js +1 -1
- package/dist/esm/z-button-sort.entry.js +1 -1
- package/dist/esm/z-card.entry.js +1 -1
- package/dist/esm/z-carousel.entry.js +1 -1
- package/dist/esm/z-chip.entry.js +4 -4
- package/dist/esm/z-combobox.entry.js +3 -3
- package/dist/esm/z-contextual-menu.entry.js +1 -1
- package/dist/esm/z-cover-hero.entry.js +1 -1
- package/dist/esm/z-date-picker.entry.js +2 -2
- package/dist/esm/z-dragdrop-area_2.entry.js +1 -1
- package/dist/esm/z-file-upload.entry.js +4 -4
- package/dist/esm/z-file.entry.js +2 -2
- package/dist/esm/z-info-reveal.entry.js +1 -1
- package/dist/esm/z-messages-pocket.entry.js +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +3 -3
- package/dist/esm/z-myz-card_4.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +3 -3
- 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-navigation-tabs.entry.js +1 -1
- package/dist/esm/z-otp.entry.js +1 -1
- package/dist/esm/z-pagination.entry.js +1 -1
- package/dist/esm/z-pocket_3.entry.js +3 -3
- package/dist/esm/z-range-picker.entry.js +2 -2
- package/dist/esm/z-section-title.entry.js +1 -1
- package/dist/esm/z-select.entry.js +3 -3
- package/dist/esm/z-skip-to-content.entry.js +3 -3
- package/dist/esm/z-slideshow.entry.js +3 -3
- package/dist/esm/z-table-cell.entry.js +1 -1
- package/dist/esm/z-table-header.entry.js +3 -3
- package/dist/esm/z-table-row.entry.js +1 -1
- package/dist/esm/z-table.entry.js +2 -2
- package/dist/esm/z-toast-notification-list.entry.js +1 -1
- package/dist/esm/z-toast-notification.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +3 -3
- package/dist/esm/z-tooltip.entry.js +1 -1
- package/dist/types/beans/index.d.ts +15 -1
- package/dist/types/components/z-breadcrumb/index.d.ts +58 -0
- package/dist/types/components.d.ts +78 -1
- package/dist/types/constants/breakpoints.d.ts +3 -2
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/p-0235869e.entry.js +1 -0
- package/dist/web-components-library/p-0397366d.js +1 -0
- package/dist/web-components-library/{p-39c52a0d.entry.js → p-0418f9fb.entry.js} +1 -1
- package/dist/web-components-library/{p-b85be817.entry.js → p-079357ba.entry.js} +1 -1
- package/dist/web-components-library/{p-c736b92c.entry.js → p-0b822ad0.entry.js} +1 -1
- package/{www/build/p-cf53ce51.entry.js → dist/web-components-library/p-0c0735e5.entry.js} +1 -1
- package/dist/web-components-library/{p-5449fd41.entry.js → p-10f2be79.entry.js} +1 -1
- package/dist/web-components-library/p-14ab82cd.entry.js +1 -0
- package/dist/web-components-library/{p-6736e894.entry.js → p-14db3f16.entry.js} +1 -1
- package/dist/web-components-library/p-1cc1a418.js +1 -0
- package/dist/web-components-library/{p-93191e1d.entry.js → p-1e7ef8ca.entry.js} +1 -1
- package/dist/web-components-library/{p-74c27fc5.entry.js → p-227667b6.entry.js} +1 -1
- package/dist/web-components-library/{p-daf06f6f.entry.js → p-27100ea1.entry.js} +1 -1
- package/dist/web-components-library/{p-0c07b4f9.entry.js → p-2f547970.entry.js} +1 -1
- package/dist/web-components-library/{p-515b46d9.entry.js → p-4610db36.entry.js} +1 -1
- package/dist/web-components-library/{p-2c871e12.entry.js → p-485bff7b.entry.js} +1 -1
- package/dist/web-components-library/{p-a93e5cad.entry.js → p-4b9882b3.entry.js} +1 -1
- package/dist/web-components-library/p-515c2acf.entry.js +1 -0
- package/dist/web-components-library/p-685ae50d.entry.js +1 -0
- package/dist/web-components-library/{p-4c85652a.entry.js → p-6be6a2f4.entry.js} +1 -1
- package/{www/build/p-82291408.entry.js → dist/web-components-library/p-7ac431a5.entry.js} +1 -1
- package/{www/build/p-c64c5cbb.entry.js → dist/web-components-library/p-8f7680ef.entry.js} +1 -1
- package/dist/web-components-library/{p-562eb005.entry.js → p-910ca14c.entry.js} +1 -1
- package/dist/web-components-library/{p-adce9752.entry.js → p-9fee86aa.entry.js} +1 -1
- package/dist/web-components-library/{p-eb293bba.entry.js → p-a19a70a0.entry.js} +1 -1
- package/{www/build/p-9566edeb.entry.js → dist/web-components-library/p-a250409a.entry.js} +1 -1
- package/dist/web-components-library/p-a4b91a8f.entry.js +1 -0
- package/dist/web-components-library/{p-c085be1d.entry.js → p-ac5dda12.entry.js} +1 -1
- package/dist/web-components-library/{p-84116d2d.entry.js → p-af5103a0.entry.js} +1 -1
- package/dist/web-components-library/p-b497e33e.js +1 -0
- package/{www/build/p-ffc56e80.entry.js → dist/web-components-library/p-bda48953.entry.js} +1 -1
- package/dist/web-components-library/{p-7d8711d1.entry.js → p-c241bab0.entry.js} +1 -1
- package/dist/web-components-library/{p-8d4b2131.entry.js → p-c47d529f.entry.js} +1 -1
- package/dist/web-components-library/{p-1505703f.entry.js → p-c8b36560.entry.js} +1 -1
- package/dist/web-components-library/p-c8bdfb84.entry.js +1 -0
- package/dist/web-components-library/{p-33251591.entry.js → p-cd456854.entry.js} +1 -1
- package/dist/web-components-library/{p-66c4eda8.entry.js → p-cfc9cf52.entry.js} +1 -1
- package/dist/web-components-library/{p-5d651052.entry.js → p-d011d1b5.entry.js} +1 -1
- package/{www/build/p-8539c6f2.entry.js → dist/web-components-library/p-d966a1b9.entry.js} +1 -1
- package/dist/web-components-library/{p-9c3f4437.entry.js → p-d98d3cf1.entry.js} +1 -1
- package/dist/web-components-library/{p-3bd60dc8.entry.js → p-e606b019.entry.js} +1 -1
- package/dist/web-components-library/{p-32c36f6c.entry.js → p-ec5242da.entry.js} +1 -1
- package/dist/web-components-library/{p-e9bf5f75.js → p-ee918c17.js} +1 -1
- package/dist/web-components-library/{p-a4e68d80.entry.js → p-f5a247b9.entry.js} +1 -1
- package/{www/build/p-642d6be4.entry.js → dist/web-components-library/p-fd8eae32.entry.js} +1 -1
- package/dist/web-components-library/{p-c75451cc.entry.js → p-ff838f90.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +3 -2
- package/react/components.js.map +1 -1
- package/src-react/index.ts +1 -0
- package/www/build/index.esm.js +1 -1
- package/www/build/p-0235869e.entry.js +1 -0
- package/www/build/p-0397366d.js +1 -0
- package/www/build/{p-39c52a0d.entry.js → p-0418f9fb.entry.js} +1 -1
- package/www/build/{p-b85be817.entry.js → p-079357ba.entry.js} +1 -1
- package/www/build/{p-c736b92c.entry.js → p-0b822ad0.entry.js} +1 -1
- package/{dist/web-components-library/p-cf53ce51.entry.js → www/build/p-0c0735e5.entry.js} +1 -1
- package/www/build/{p-5449fd41.entry.js → p-10f2be79.entry.js} +1 -1
- package/www/build/p-14ab82cd.entry.js +1 -0
- package/www/build/{p-6736e894.entry.js → p-14db3f16.entry.js} +1 -1
- package/www/build/p-1cc1a418.js +1 -0
- package/www/build/{p-93191e1d.entry.js → p-1e7ef8ca.entry.js} +1 -1
- package/www/build/{p-74c27fc5.entry.js → p-227667b6.entry.js} +1 -1
- package/www/build/{p-daf06f6f.entry.js → p-27100ea1.entry.js} +1 -1
- package/www/build/{p-0c07b4f9.entry.js → p-2f547970.entry.js} +1 -1
- package/www/build/{p-515b46d9.entry.js → p-4610db36.entry.js} +1 -1
- package/www/build/{p-2c871e12.entry.js → p-485bff7b.entry.js} +1 -1
- package/www/build/{p-a93e5cad.entry.js → p-4b9882b3.entry.js} +1 -1
- package/www/build/p-515c2acf.entry.js +1 -0
- package/www/build/p-685ae50d.entry.js +1 -0
- package/www/build/{p-4c85652a.entry.js → p-6be6a2f4.entry.js} +1 -1
- package/{dist/web-components-library/p-82291408.entry.js → www/build/p-7ac431a5.entry.js} +1 -1
- package/{dist/web-components-library/p-c64c5cbb.entry.js → www/build/p-8f7680ef.entry.js} +1 -1
- package/www/build/{p-562eb005.entry.js → p-910ca14c.entry.js} +1 -1
- package/www/build/{p-adce9752.entry.js → p-9fee86aa.entry.js} +1 -1
- package/www/build/{p-eb293bba.entry.js → p-a19a70a0.entry.js} +1 -1
- package/{dist/web-components-library/p-9566edeb.entry.js → www/build/p-a250409a.entry.js} +1 -1
- package/www/build/p-a4b91a8f.entry.js +1 -0
- package/www/build/{p-c085be1d.entry.js → p-ac5dda12.entry.js} +1 -1
- package/www/build/{p-84116d2d.entry.js → p-af5103a0.entry.js} +1 -1
- package/www/build/p-b497e33e.js +1 -0
- package/{dist/web-components-library/p-ffc56e80.entry.js → www/build/p-bda48953.entry.js} +1 -1
- package/www/build/{p-7d8711d1.entry.js → p-c241bab0.entry.js} +1 -1
- package/www/build/{p-8d4b2131.entry.js → p-c47d529f.entry.js} +1 -1
- package/www/build/{p-1505703f.entry.js → p-c8b36560.entry.js} +1 -1
- package/www/build/p-c8bdfb84.entry.js +1 -0
- package/www/build/{p-33251591.entry.js → p-cd456854.entry.js} +1 -1
- package/www/build/{p-66c4eda8.entry.js → p-cfc9cf52.entry.js} +1 -1
- package/www/build/{p-5d651052.entry.js → p-d011d1b5.entry.js} +1 -1
- package/{dist/web-components-library/p-8539c6f2.entry.js → www/build/p-d966a1b9.entry.js} +1 -1
- package/www/build/{p-9c3f4437.entry.js → p-d98d3cf1.entry.js} +1 -1
- package/www/build/p-e35c7022.js +1 -0
- package/www/build/{p-3bd60dc8.entry.js → p-e606b019.entry.js} +1 -1
- package/www/build/{p-32c36f6c.entry.js → p-ec5242da.entry.js} +1 -1
- package/www/build/{p-e9bf5f75.js → p-ee918c17.js} +1 -1
- package/www/build/{p-a4e68d80.entry.js → p-f5a247b9.entry.js} +1 -1
- package/{dist/web-components-library/p-642d6be4.entry.js → www/build/p-fd8eae32.entry.js} +1 -1
- package/www/build/{p-c75451cc.entry.js → p-ff838f90.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +127 -1
- package/dist/cjs/z-popover.cjs.entry.js +0 -328
- package/dist/esm/breakpoints-c386984e.js +0 -4
- package/dist/esm/z-popover.entry.js +0 -324
- package/dist/web-components-library/p-06de959d.entry.js +0 -1
- package/dist/web-components-library/p-1b4d5a24.entry.js +0 -1
- package/dist/web-components-library/p-6816cba3.entry.js +0 -1
- package/dist/web-components-library/p-6b454593.js +0 -1
- package/dist/web-components-library/p-7a276150.entry.js +0 -1
- package/dist/web-components-library/p-7c94ae08.entry.js +0 -1
- package/dist/web-components-library/p-98eac308.entry.js +0 -1
- package/dist/web-components-library/p-b1068026.js +0 -1
- package/dist/web-components-library/p-d69e14fb.js +0 -1
- package/dist/web-components-library/p-dcea357f.entry.js +0 -1
- package/www/build/p-06de959d.entry.js +0 -1
- package/www/build/p-1b4d5a24.entry.js +0 -1
- package/www/build/p-6816cba3.entry.js +0 -1
- package/www/build/p-6b454593.js +0 -1
- package/www/build/p-7a276150.entry.js +0 -1
- package/www/build/p-7c94ae08.entry.js +0 -1
- package/www/build/p-98eac308.entry.js +0 -1
- package/www/build/p-b1068026.js +0 -1
- package/www/build/p-d69e14fb.js +0 -1
- package/www/build/p-dcea357f.entry.js +0 -1
- package/www/build/p-f8cba0b0.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,H as a,g as r}from"./p-d17ebc2f.js";import{e as s,B as n,O as o,w as c,W as l,X as h,q as p,P as u,g as d,m as v,i as b,c as z,D as g,h as f,l as m,I as x,n as w,k as y,E as k}from"./p-1cc1a418.js";import{g as C,h as $,r as O,b as S,a as j}from"./p-0397366d.js";import{I as M}from"./p-bb85c467.js";import"./p-b497e33e.js";const I="undefined"!=typeof IntersectionObserver,T=class{constructor(e){t(this,e),this.sticking=i(this,"sticking",7),this.stuck=!1,this.overlay=!1,this.flow="auto",this.drawerOpen=!1,this.enableSearch=!1,this.searchPlaceholder="Cerca",this._stuck=!1,this.currentViewport="mobile",this.observer=I&&new IntersectionObserver((([t])=>{this._stuck=!t.isIntersecting}),{threshold:.5}),this.openDrawer=this.openDrawer.bind(this),this.closeDrawer=this.closeDrawer.bind(this),this.collectMenuElements=this.collectMenuElements.bind(this)}evaluateViewport(){this.currentViewport=window.innerWidth<768?"mobile":window.innerWidth>=768&&window.innerWidth<1152?"tablet":"desktop"}onStuck(){this.scrollParent&&this.sticking.emit(this._stuck)}setMenuFloatingMode(){0!==this.menuElements.length&&this.menuElements.forEach((t=>{t.open=!1,t.floating=!this.drawerOpen,t.verticalContext=this.drawerOpen}))}get title(){const t=this.hostElement.querySelector('[slot="title"]');return null===t?"":t.textContent.trim()}get scrollParent(){const t=this.hostElement.offsetParent;return t===document.body||t===document.documentElement?window:t}get canShowMenu(){return this.menuLength>0&&"offcanvas"!==this.flow&&"mobile"!==this.currentViewport&&!this.drawerOpen}get canShowSearchbar(){return!(!this.enableSearch||this.searchPageUrl&&"desktop"!==this.currentViewport)}get hasHero(){return!!this.hero||null!==this.hostElement.querySelector("[slot=hero]")}openDrawer(){this.drawerOpen=!0}closeDrawer(){this.drawerOpen=!1}collectMenuElements(){const t=this.menuElements=this.hostElement.querySelectorAll('[slot="menu"]');this.menuLength=t.length,this.setMenuFloatingMode()}enableStuckObserver(){this.observer&&this.observer.observe(this.container)}disableStuckMode(){this._stuck=!1,this.observer&&this.observer.unobserve(this.container)}onStuckMode(){this.stuck?this.enableStuckObserver():this.disableStuckMode()}renderSearchLinkButton(){return this.enableSearch&&this.searchPageUrl&&"desktop"!==this.currentViewport?e("z-button",{class:"search-page-button",variant:n.SECONDARY,href:this.searchPageUrl,icon:"search",size:s.X_SMALL}):null}componentDidLoad(){this.collectMenuElements(),this.onStuckMode(),this.evaluateViewport()}render(){return e(a,{"menu-length":this.menuLength},this.hasHero&&e("div",{class:"hero-container"},e("slot",{name:"hero"},this.hero&&e("img",{alt:"",src:this.hero}))),e("div",{class:"heading-panel",ref:t=>this.container=t},e("div",{class:"heading-container"},e("div",{class:"heading-title"},this.menuLength>0&&e("button",{class:"drawer-trigger","aria-label":"Apri menu",onClick:this.openDrawer},e("z-icon",{name:"burger-menu"})),e("slot",{name:"title"}),this.renderSearchLinkButton()),e("div",{class:"heading-subtitle"},e("slot",{name:"subtitle"}))),(this.canShowMenu||this.canShowSearchbar)&&e("div",{class:"menu-container"},this.canShowMenu&&e("slot",{name:"menu",onSlotchange:this.collectMenuElements}),this.canShowSearchbar&&e("z-searchbar",{placeholder:this.searchPlaceholder,showSearchButton:!0,searchButtonIconOnly:"desktop"!==this.currentViewport,size:s.X_SMALL,variant:n.SECONDARY,preventSubmit:!0,onSearchTyping:t=>{t.target.preventSubmit=!t.detail||t.detail.length<3}}))),e("z-offcanvas",{variant:o.OVERLAY,transitiondirection:c.RIGHT,open:this.drawerOpen,onCanvasOpenStatusChanged:t=>this.drawerOpen=t.detail},e("button",{class:"drawer-close","aria-label":"Chiudi menu",onClick:this.closeDrawer,slot:"canvasContent"},e("z-icon",{name:"close"})),this.drawerOpen&&e("div",{class:"drawer-content",slot:"canvasContent"},e("slot",{name:"menu",onSlotchange:this.collectMenuElements}))),this._stuck&&e("div",{class:"heading-stuck"},e("div",{class:"heading-stuck-content"},this.menuLength>0&&e("button",{class:"drawer-trigger","aria-label":"Apri menu",onClick:this.openDrawer},e("z-icon",{name:"burger-menu"})),e("div",{class:"heading-title"},e("slot",{name:"stucked-title"},this.title)),this.renderSearchLinkButton(),this.canShowSearchbar&&"desktop"===this.currentViewport&&e("z-searchbar",{placeholder:this.searchPlaceholder,showSearchButton:!0,searchButtonIconOnly:!1,size:s.X_SMALL,variant:n.SECONDARY,preventSubmit:!0,onSearchTyping:t=>{var i;t.target.preventSubmit=(null===(i=t.detail)||void 0===i?void 0:i.length)<3}}))))}get hostElement(){return r(this)}static get watchers(){return{_stuck:["onStuck"],drawerOpen:["setMenuFloatingMode"],stuck:["onStuckMode"]}}};T.style=':host{--app-header-typography-1-size:24px;--app-header-typography-2-size:28px;--app-header-typography-3-size:32px;--app-header-typography-4-size:36px;--app-header-typography-5-size:42px;--app-header-typography-6-size:48px;--app-header-typography-7-size:54px;--app-header-typography-8-size:60px;--app-header-typography-9-size:68px;--app-header-typography-10-size:76px;--app-header-typography-11-size:84px;--app-header-typography-12-size:92px;--app-header-typography-1-lineheight:1.33;--app-header-typography-2-lineheight:1.29;--app-header-typography-3-lineheight:1.25;--app-header-typography-4-lineheight:1.24;--app-header-typography-5-lineheight:1.24;--app-header-typography-6-lineheight:1.25;--app-header-typography-7-lineheight:1.2;--app-header-typography-8-lineheight:1.26;--app-header-typography-9-lineheight:1.24;--app-header-typography-10-lineheight:1.26;--app-header-typography-11-lineheight:1.2;--app-header-typography-12-lineheight:1.2;--app-header-typography-1-tracking:calc(-0.2 / 1em);--app-header-typography-2-tracking:calc(-0.4 / 1em);--app-header-typography-3-tracking:calc(-0.6 / 1em);--app-header-typography-4-tracking:calc(-0.8 / 1em);--app-header-typography-5-tracking:calc(-1 / 1em);--app-header-typography-6-tracking:calc(-1.2 / 1em);--app-header-typography-7-tracking:calc(-1.4 / 1em);--app-header-typography-8-tracking:calc(-1.6 / 1em);--app-header-typography-9-tracking:calc(-1.8 / 1em);--app-header-typography-10-tracking:calc(-2 / 1em);--app-header-typography-11-tracking:calc(-2.2 / 1em);--app-header-typography-12-tracking:calc(-2.4 / 1em);--app-header-content-max-width:100%;--app-header-height:auto;--app-header-top-offset:48px;--app-header-drawer-trigger-size:calc(var(--space-unit) * 4);--app-header-bg:var(--color-surface01);--app-header-stucked-bg:var(--color-surface01);--app-header-text-color:var(--color-text01);--app-header-title-font-size:var(--app-header-typography-3-size);--app-header-title-lineheight:var(--app-header-typography-3-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-3-tracking);--app-header-stucked-text-color:var(--color-text01);position:relative;display:block;height:var(--app-header-height);color:var(--app-header-text-color)}:host,*{box-sizing:border-box}.heading-panel{position:relative;display:flex;width:100%;max-width:var(--app-header-content-max-width);flex-direction:column;flex-grow:0;flex-shrink:0;align-items:baseline;padding:var(--grid-margin);margin:0 auto;background:var(--app-header-bg);gap:calc(var(--space-unit) * 2) calc(var(--space-unit) * 5)}.hero-container+.heading-panel{background:transparent}:host(:empty) .heading-panel{padding:0}.heading-container{position:relative;z-index:1;display:flex;width:100%;max-width:100%;flex:1 auto;flex-direction:column;justify-content:flex-start}.heading-title{display:flex;max-width:100%;flex-direction:row;align-items:flex-start;column-gap:calc(var(--space-unit) * 2)}::slotted([slot="title"]),.heading-stuck .heading-title>*,::slotted([slot="stucked-title"]){margin:0;font-family:"IBM Plex Serif", serif;font-weight:var(--font-bd)}::slotted([slot="title"]){font-size:var(--app-header-title-font-size);letter-spacing:var(--app-header-title-letter-spacing);line-height:var(--app-header-title-lineheight)}.heading-stuck .heading-title>*,::slotted([slot="stucked-title"]){font-size:var(--app-header-typography-3-size);letter-spacing:var(--app-header-typography-3-tracking);line-height:var(--app-header-typography-3-lineheight)}:host(:not([menu-length="0"])) .heading-subtitle{padding-left:calc(var(--app-header-drawer-trigger-size) + (var(--space-unit) * 2))}::slotted([slot="subtitle"]){margin:0;font-family:var(--font-family-sans);font-size:20px;font-style:italic;font-weight:500;line-height:26px}.menu-container{display:flex;width:100%;flex:1 auto;flex-flow:row wrap}.menu-container ::slotted([open]){position:relative;z-index:3}z-searchbar{z-index:0;display:flex;width:auto;min-width:calc(var(--space-unit) * 32);flex:1 auto;align-items:center;margin-left:auto}.heading-stuck{position:fixed;z-index:20;top:var(--app-header-top-offset);left:0;width:100%;max-width:100%;animation:slide-stuck-heading-in 250ms ease-out;background:var(--app-header-stucked-bg);box-shadow:var(--shadow-2);color:var(--app-header-stucked-text-color)}.heading-stuck-content{display:flex;max-width:var(--app-header-content-max-width);align-items:center;padding:var(--space-unit) var(--grid-margin);margin:0 auto;column-gap:calc(var(--space-unit) * 2)}.heading-stuck .heading-title>*,.heading-stuck .heading-title ::slotted([slot="stucked-title"]){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.heading-stuck-content z-button{margin-left:auto}.drawer-trigger{padding:0;border:0;margin:0;appearance:none;background:none;border-radius:0;color:inherit;cursor:pointer}.drawer-trigger z-icon{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);fill:currentcolor}.heading-container :is(.drawer-trigger,z-button.search-page-button){display:flex;height:calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight));align-items:center}.heading-container z-button.search-page-button{margin-left:auto}.drawer-content{display:flex;width:100%;flex:1 auto;flex-direction:column;row-gap:calc(var(--space-unit) * 2.5)}.drawer-content ::slotted(z-menu){width:100%}.drawer-close{--z-icon-width:var(--app-header-drawer-trigger-size);--z-icon-height:var(--app-header-drawer-trigger-size);padding:0;border:0;margin:var(--space-unit) 0 calc(var(--space-unit) * 2.5);appearance:none;background:transparent;border-radius:0;color:inherit;cursor:pointer;fill:currentcolor;font-size:inherit;outline:none}.drawer-close:focus-visible{box-shadow:var(--shadow-focus-primary)}.hero-container{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%}:host([overlay]) .heading-panel .drawer-trigger z-icon,:host([overlay]) .heading-panel .heading-container,:host([overlay]) .heading-panel .menu-container{color:var(--color-white);fill:var(--color-white)}:host([overlay]) .heading-panel .menu-container ::slotted(z-menu){--z-menu-label-color:var(--color-white)}:host([overlay]) .hero-container::after{position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;background:var(--color-black);content:"";opacity:0.5}.hero-container img,.hero-container ::slotted(*){position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:top center;-webkit-user-drag:none}@media (min-width: 768px){:host{--app-header-title-font-size:var(--app-header-typography-6-size);--app-header-title-lineheight:var(--app-header-typography-6-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-6-tracking)}.heading-panel{flex-flow:row wrap;align-items:center;padding-bottom:calc(var(--space-unit) * 2)}.heading-container{margin-right:auto}:host(:is([flow="offcanvas"],[menu-length="0"])) :is(.heading-container,.menu-container){width:auto}:host(:not([flow="offcanvas"])) .heading-subtitle{padding-left:0}.menu-container{flex:initial;align-items:center}:host([menu-length="0"]) .menu-container:not(:empty){height:calc(var(--app-header-title-font-size) * var(--app-header-title-lineheight))}:host(:not([flow="offcanvas"])) .menu-container{gap:var(--space-unit) calc(var(--space-unit) * 5)}:host(:not([flow="offcanvas"])) .heading-container .drawer-trigger{display:none}}@media (min-width: 1152px){:host{--app-header-title-font-size:var(--app-header-typography-7-size);--app-header-title-lineheight:var(--app-header-typography-7-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-7-tracking)}.heading-panel{justify-content:flex-start;padding-bottom:calc(var(--space-unit) * 3)}.heading-container,.menu-container{width:auto}:host([flow="stack"]) .heading-panel{flex-flow:column;align-items:flex-start}:host([flow="stack"]) .menu-container{width:100%}:host(:not([flow="offcanvas"],[menu-length="0"])) .heading-panel{row-gap:calc(var(--space-unit) * 3)}z-searchbar{min-width:calc(var(--space-unit) * 45);flex:initial}}@media (min-width: 1366px){:host{--app-header-title-font-size:var(--app-header-typography-9-size);--app-header-title-lineheight:var(--app-header-typography-9-lineheight);--app-header-title-letter-spacing:var(--app-header-typography-9-tracking)}}@keyframes slide-stuck-heading-in{0%{transform:translate3d(0, -100%, 0)}100%{transform:none}}';const _=class{constructor(e){t(this,e),this.clickOnNode=i(this,"clickOnNode",7),this.pathStyle=l.UNDERLINED,this.homepageVariant=h.ICON,this.maxNodesToShow=5,this.preventFollowUrl=!1,this.overflowMenuItemRows=0,this.truncateChar=30,this.hasOverflow=!1,this.popoverEllipsisOpen=!1,this.collapsedElements=[],this.currentIndex=0,this.truncatePosition=null}handleResize(){this.viewPortWidth=C(),this.viewPortWidth!==p.MOBILE&&this.wrapElement&&this.wrapElement.scrollWidth>this.wrapElement.clientWidth&&(this.hasOverflow=!0)}handlePropChange(){this.initializeBreadcrumb(this.viewPortWidth===p.MOBILE)}handleResizeUp(t,i){(t===p.MOBILE||i===p.MOBILE&&t===p.TABLET||i===p.MOBILE&&t===p.DESKTOP||i===p.MOBILE&&t===p.DESKTOP_WIDE||i===p.TABLET&&t===p.DESKTOP||i===p.TABLET&&t===p.DESKTOP_WIDE||i===p.DESKTOP&&t===p.DESKTOP_WIDE)&&this.initializeBreadcrumb(this.viewPortWidth===p.MOBILE)}componentWillLoad(){this.viewPortWidth=C(),this.initializeBreadcrumb(this.viewPortWidth===p.MOBILE)}componentWillRender(){this.viewPortWidth!==p.MOBILE&&this.hasOverflow&&(this.checkEllipsisOrOverflowMenu(),this.hasOverflow=!1)}componentDidRender(){this.collapsedElementsRef&&(this.anchorElements=Array.from(this.hostElement.shadowRoot.querySelectorAll("z-list-group a"))),this.viewPortWidth!==p.MOBILE&&this.wrapElement.scrollWidth>this.wrapElement.clientWidth&&(this.hasOverflow=!0)}initializeBreadcrumb(t){this.pathsList=t?this.getPathsItemsList().filter((t=>!!t.path)):this.getPathsItemsList(),this.totalLenght=this.pathsList.length,this.homepageNode=this.pathsList.shift(),this.pathListCopy=JSON.parse(JSON.stringify(this.pathsList)),this.collapsedElements=[],this.totalLenght>this.maxNodesToShow&&(this.collapsedElements=this.pathsList.splice(0,this.pathsList.length-2))}checkEllipsisOrOverflowMenu(){if(this.pathListCopy.length>0)for(let t=0;t<this.pathsList.length;t++)if(this.pathsList[t].text.length>this.truncateChar){if(null!==this.truncatePosition){if(this.truncatePosition>0)return this.pathListCopy.splice(0,this.truncatePosition).forEach((t=>{this.collapsedElements.push(t)})),this.pathsList.splice(0,this.truncatePosition),void(this.truncatePosition=0);if(0===this.truncatePosition){const t=this.pathListCopy.splice(0,this.truncatePosition+1);return this.collapsedElements.push(...t),this.pathsList.splice(0,this.truncatePosition+1),void(this.truncatePosition=null)}}if(t!==this.pathsList.length-1){const i=this.truncateWithEllipsis(this.pathsList[t].text,this.truncateChar);return this.currentEllipsisText=this.pathsList[t].text,this.pathsList[t].text=i,this.pathsList[t].hasTooltip=!0,void(this.truncatePosition=t)}}}truncateWithEllipsis(t,i){return t.length>i?t.substring(0,i-1)+"…":t}getPathsItemsList(){return this.paths?("string"==typeof this.paths?JSON.parse(this.paths):this.paths).map((t=>Object.assign(Object.assign({},t),{hasTooltip:!1}))):Array.from(this.hostElement.children).map((t=>({text:t.textContent,path:t.href,hasTooltip:!1})))}renderMobileBreadcrumb(){return e("nav",{"aria-label":"Breadcrumb",class:{underlined:this.pathStyle===l.UNDERLINED,semibold:this.pathStyle===l.SEMIBOLD}},e("ol",null,this.renderNode(this.pathsList[this.pathsList.length-1],!0)))}renderHomepageNode(t){return e("li",null,e("a",{class:{"homepage-icon":this.homepageVariant===h.ICON,"homepage-text":this.homepageVariant===h.TEXT},href:t.path,onClick:i=>this.handlePreventFollowUrl(i,t)},this.homepageVariant===h.ICON?e("z-icon",{name:"home",fill:"color-link-primary",height:16,width:16}):"Home"))}renderNode(t,i){return e("li",null,t.hasTooltip&&e("z-popover",{class:"full-path-tooltip","bind-to":this.triggerEllipsis,open:this.popoverEllipsisOpen,position:u.BOTTOM,closable:!1,showArrow:!0},e("span",{class:"tooltip-content"},this.currentEllipsisText)),e("a",{class:{"missing-path":!t.path,"text-ellipsis":i},ref:t=>this.triggerEllipsis=t,"aria-current":t.path?void 0:"page",href:t.path,onClick:i=>this.handlePreventFollowUrl(i,t),onMouseOver:()=>{t.hasTooltip&&(this.popoverEllipsisOpen=!0)},onMouseLeave:()=>{t.hasTooltip&&(this.popoverEllipsisOpen=!1)},innerHTML:i?`<z-icon fill="color-link-primary" name="chevron-left"></z-icon> ${t.text}`:t.text}))}renderBreadcrumb(){return e("nav",{ref:t=>this.wrapElement=t,"aria-label":"Breadcrumb",class:{underlined:this.pathStyle===l.UNDERLINED,semibold:this.pathStyle===l.SEMIBOLD}},e("ol",null,this.renderHomepageNode(this.homepageNode),this.collapsedElements.length?this.renderOverflowMenu():"",this.pathsList.map((t=>this.renderNode(t,!1)))))}togglePopover(){this.collapsedElementsRef.open||(this.collapsedElementsRef.open=!0)}handlePreventFollowUrl(t,i){this.preventFollowUrl&&(t.preventDefault(),this.clickOnNode.emit(i.path))}handleOverflowMenuAccessibility(t){const i=this.anchorElements.length;t.key!==d.TAB?(t.stopPropagation(),[d.ARROW_DOWN,d.ARROW_UP].includes(t.key)&&(t.preventDefault(),t.key===d.ARROW_DOWN&&(this.currentIndex=i===this.currentIndex+1?0:this.currentIndex+1),t.key===d.ARROW_UP&&(this.currentIndex=this.currentIndex<=0?i-1:this.currentIndex-1),this.anchorElements[this.currentIndex].focus()),t.key===d.ESC&&this.triggerButton.focus()):t.preventDefault()}renderOverflowMenu(){if(this.collapsedElements.length)return e("li",null,e("z-popover",{class:"hidden-paths-popover",ref:t=>this.collapsedElementsRef=t,"bind-to":this.triggerButton,position:u.BOTTOM_RIGHT,closable:!0,showArrow:!0},e("div",{class:"popover-content"},e("z-list",null,e("z-list-group",{dividerType:v.ELEMENT,size:b.SMALL},this.collapsedElements.map((t=>e("z-list-element",{clickable:!0},e("a",{class:"text-ellipsis",href:t.path,onClick:i=>this.handlePreventFollowUrl(i,t),onKeyDown:t=>this.handleOverflowMenuAccessibility(t)},t.text)))))))),e("button",{"aria-label":"Mostra più breadcrumb","aria-haspopup":"true",ref:t=>this.triggerButton=t,class:"dots",onClick:()=>{this.togglePopover()},onKeyDown:t=>{$(t,this.togglePopover.bind(this)),setTimeout((()=>{this.anchorElements[0].focus()}),100)}},"..."))}render(){return e(a,{style:{"--line-clamp":`${this.overflowMenuItemRows}`}},this.viewPortWidth===p.MOBILE?this.renderMobileBreadcrumb():this.renderBreadcrumb())}get hostElement(){return r(this)}static get watchers(){return{paths:["handlePropChange"],maxNodesToShow:["handlePropChange"],viewPortWidth:["handleResizeUp"]}}};_.style=':host{font-family:var(--font-family-sans);font-weight:var(--font-rg);--line-clamp-popover:0;--line-clamp-mobile:1}button{padding:0;border:none;margin:0;background-color:transparent}nav{display:flex;height:30px;align-items:center;padding-left:calc(var(--space-unit) / 2);overflow-x:hidden}li{display:flex;align-items:baseline}:host a:focus,:host button:focus{box-shadow:var(--shadow-focus-primary);outline:0}:host a{color:var(--color-link-primary);font-size:var(--font-size-2);text-decoration:none;white-space:nowrap}:host a.homepage-icon{display:list-item}:host a.homepage-text{display:initial}:host a.missing-path{color:var(--color-text01)}:host a.text-ellipsis{display:-webkit-box !important;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:var(--line-clamp-mobile);text-overflow:ellipsis;white-space:normal}:host ol{display:flex;padding:0;margin:0;list-style-type:none}:host ol>li:not(:last-child){margin-right:var(--space-unit)}nav.underlined>ol>li a:not(.missing-path),nav.underlined>ol>li button{text-decoration:underline}nav.semibold>ol>li a:not(.missing-path),nav.semibold>ol>li button{font-weight:var(--font-sb)}:host z-icon{margin-right:var(--space-unit);--z-icon-width:12px;--z-icon-height:12px}:host button.dots{display:inline-block;color:var(--color-link-primary);cursor:pointer}:host .popover-content{max-width:302px;padding:calc(var(--space-unit) / 2) var(--space-unit);text-align:left}:host .popover-content a{font-weight:var(--font-rg);text-decoration:none}:host .hidden-paths-popover{--z-popover-theme--surface:var(--color-surface02);--z-popover-padding:0}:host .full-path-tooltip{--z-popover-theme--surface:var(--color-surface05);--z-popover-theme--text:var(--color-text-inverse);--z-popover-padding:0}:host .tooltip-content{padding:0 var(--space-unit);font-size:var(--font-size-2)}@media (min-width: 768px){:host ol>li+li::before{display:inline-block;width:10px;height:10px;flex:1;color:var(--color-disabled03);content:"\\203A"}:host a.text-ellipsis{-webkit-line-clamp:var(--line-clamp-popover)}}';const L=class{constructor(i){t(this,i),this.ariaLabel="",this.disabled=!1,this.type=z.BUTTON,this.variant=n.PRIMARY,this.size=s.BIG}getAttributes(){return{id:this.htmlid,class:{"z-button--container":!0,"z-button--has-text":!!this.hostElement.textContent.trim()}}}render(){return this.href?e("a",Object.assign({},this.getAttributes(),{"aria-label":this.ariaLabel,href:this.href,target:this.target}),this.icon&&e("z-icon",{name:this.icon,width:16,height:16}),e("slot",null)):e("button",Object.assign({},this.getAttributes(),{"aria-label":this.ariaLabel,name:this.name,type:this.type,disabled:this.disabled}),this.icon&&e("z-icon",{name:this.icon,width:16,height:16}),e("slot",null))}get hostElement(){return r(this)}};L.style='.sc-z-button-h{display:inline-block;--z-icon-width:16px;--z-icon-height:16px;--z-icon-right-margin:0}[disabled].sc-z-button-h:not([disabled="false"]){pointer-events:none}.sc-z-button-h .z-button--container.sc-z-button{display:inline-flex;width:100%;box-sizing:border-box;align-items:center;justify-content:center;padding:0;border-width:var(--border-size-medium);border-style:solid;border-radius:var(--border-radius);cursor:pointer;fill:currentcolor;font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-sb);letter-spacing:0.3px;line-height:1;outline:none;text-decoration:none;text-transform:uppercase;white-space:nowrap}.sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button{min-width:calc(var(--space-unit) * 8);padding:0 calc(var(--space-unit) * 2)}.sc-z-button-h .z-button--container.z-button--has-text.sc-z-button z-icon.sc-z-button{--z-icon-right-margin:var(--space-unit)}[size="big"].sc-z-button-h .z-button--container.sc-z-button{min-width:44px;height:44px}[size="small"].sc-z-button-h .z-button--container.sc-z-button{min-width:36px;height:36px}[size="x-small"].sc-z-button-h .z-button--container.sc-z-button{min-width:32px;height:32px}[variant="primary"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-primary01);color:var(--color-text-inverse)}@media (hover: hover){[variant="primary"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-hover-primary);color:var(--color-text-inverse)}}[variant="primary"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-pressed-primary);box-shadow:var(--shadow-2);color:var(--color-text-inverse)}[variant="primary"][disabled].sc-z-button-h:not([disabled="false"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-disabled01);color:var(--color-disabled02)}[variant="secondary"].sc-z-button-h .z-button--container.sc-z-button{border-color:var(--color-primary01);background-color:var(--color-surface01);color:var(--color-primary01)}@media (hover: hover){[variant="secondary"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-hover-primary);background-color:var(--color-surface01);color:var(--color-hover-primary)}}[variant="secondary"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-pressed-primary);background-color:var(--color-surface01);box-shadow:var(--shadow-2);color:var(--color-pressed-primary)}[variant="secondary"][disabled].sc-z-button-h:not([disabled="false"]) .z-button--container.sc-z-button{border-color:var(--color-disabled01);background-color:var(--color-surface01);color:var(--color-disabled02)}[variant="tertiary"].sc-z-button-h .z-button--container.sc-z-button{border-color:transparent;background-color:transparent;color:var(--color-primary01)}@media (hover: hover){[variant="tertiary"].sc-z-button-h .z-button--container.sc-z-button:hover{border-color:var(--color-primary03);background-color:var(--color-primary03);color:var(--color-hover-primary)}}[variant="tertiary"].sc-z-button-h .z-button--container.sc-z-button:focus:focus-visible{border-color:var(--color-surface01);background-color:var(--color-surface01);color:var(--color-primary01)}[variant="tertiary"].sc-z-button-h .z-button--container.sc-z-button:active{border-color:var(--color-surface01);background-color:var(--color-surface01);box-shadow:var(--shadow-2);color:var(--color-primary01)}[variant="tertiary"][disabled].sc-z-button-h:not([disabled="false"]) .z-button--container.sc-z-button{border-color:transparent;background-color:transparent;color:var(--color-disabled02)}';const P=class{constructor(i){t(this,i),this.size=g.SMALL,this.color="gray200",this.orientation=f.HORIZONTAL}render(){return e(a,{class:`divider-${this.size} divider-${this.orientation}`,style:{backgroundColor:`var(--${this.color})`}})}};P.style=".sc-z-divider-h{display:block;padding:0;margin:0}.divider-horizontal.sc-z-divider-h{width:100%}.divider-vertical.sc-z-divider-h{height:100%}.divider-small.divider-horizontal.sc-z-divider-h{height:var(--border-size-small)}.divider-medium.divider-horizontal.sc-z-divider-h{height:var(--border-size-medium)}.divider-large.divider-horizontal.sc-z-divider-h{height:var(--border-size-large)}.divider-small.divider-vertical.sc-z-divider-h{width:var(--border-size-small)}.divider-medium.divider-vertical.sc-z-divider-h{width:var(--border-size-medium)}.divider-large.divider-vertical.sc-z-divider-h{width:var(--border-size-large)}";const A=class{constructor(i){t(this,i)}selectPathOrPolygon(t){return(null==t?void 0:t.startsWith("M"))?e("path",{d:M[this.name]}):e("polygon",{points:M[this.name]})}render(){return e(a,{"aria-hidden":"true"},e("svg",{viewBox:"0 0 1000 1000",width:this.width,height:this.height,id:this.iconid,fill:this.fill?`var(--${this.fill})`:""},this.selectPathOrPolygon(M[this.name])))}};A.style=":host{margin-right:var(--z-icon-right-margin, 0);margin-left:var(--z-icon-left-margin, 0);line-height:0;vertical-align:middle}:host svg:not([width]){width:var(--z-icon-width, 18px)}:host svg:not([height]){height:var(--z-icon-height, 18px)}";const R=class{constructor(e){t(this,e),this.inputChange=i(this,"inputChange",7),this.startTyping=i(this,"startTyping",7),this.stopTyping=i(this,"stopTyping",7),this.inputCheck=i(this,"inputCheck",7),this.htmlid=`id-${O()}`,this.ariaLabel="",this.disabled=!1,this.readonly=!1,this.required=!1,this.checked=!1,this.message=!0,this.labelPosition=m.RIGHT,this.hasclearicon=!0,this.size=s.BIG,this.isTyping=!1,this.passwordHidden=!0,this.typingtimeout=300}inputCheckListener(t){const i=t.detail;switch(this.type){case x.RADIO:i.type===x.RADIO&&i.name===this.name&&i.id!==this.htmlid&&(this.checked=!1)}}async isChecked(){switch(this.type){case x.CHECKBOX:case x.RADIO:return this.checked;default:return console.warn("`isChecked` method is only available for type `checkbox` and `radio`"),!1}}emitInputChange(t){let i;this.isTyping||this.emitStartTyping(),i=this.getValidity(this.type===x.TEXTAREA?"textarea":"input"),this.value=t,this.inputChange.emit({value:t,validity:i}),clearTimeout(this.timer),this.timer=setTimeout((()=>{this.emitStopTyping(this.value,i)}),this.typingtimeout)}emitStartTyping(){this.isTyping=!0,this.startTyping.emit()}emitStopTyping(t,i){this.isTyping=!1,this.stopTyping.emit({value:t,validity:i})}emitInputCheck(t){this.inputCheck.emit({id:this.htmlid,checked:t,type:this.type,name:this.name,value:this.value,validity:this.getValidity("input")})}getValidity(t){return this.hostElement.querySelector(t).validity}getTextAttributes(){return{id:this.htmlid,name:this.name,placeholder:this.placeholder,value:this.value,disabled:this.disabled,readonly:this.readonly,required:this.required,title:this.htmltitle,class:{[`input-${this.status}`]:!!this.status,filled:!!this.value},autocomplete:this.autocomplete,onInput:t=>this.emitInputChange(t.target.value)}}getNumberAttributes(t){if(t==x.NUMBER)return{min:this.min,max:this.max,step:this.step}}getPatternAttribute(t){if(t==x.PASSWORD||t==x.TEXT||t==x.TEL||t==x.SEARCH||t==x.URL||t==x.EMAIL)return{pattern:this.pattern}}renderInputText(t=x.TEXT){const i=this.ariaLabel?{"aria-label":this.ariaLabel}:{},a=Object.assign(Object.assign(Object.assign(Object.assign({},this.getTextAttributes()),this.getNumberAttributes(t)),this.getPatternAttribute(t)),i);return(this.icon||t===x.PASSWORD)&&Object.assign(a.class,{"has-icon":!0}),this.hasclearicon&&t!=x.NUMBER&&Object.assign(a.class,{"has-clear-icon":!0}),e("div",{class:"text-wrapper"},this.renderLabel(),e("div",null,e("input",Object.assign({type:t!==x.PASSWORD||this.passwordHidden?t:x.TEXT},a)),this.renderIcons()),this.renderMessage())}renderLabel(){if(this.label)return e("label",{class:"input-label body-5-sb",id:`${this.htmlid}_label`,htmlFor:this.htmlid},this.label)}renderIcons(){return e("span",{class:"icons-wrapper"},this.renderResetIcon(),this.renderIcon())}renderIcon(){return this.type===x.PASSWORD?this.renderShowHidePassword():this.icon?e("button",{type:"button",class:"icon-button input-icon",tabIndex:-1},e("z-icon",{name:this.icon,class:this.size})):void 0}renderResetIcon(){if(this.hasclearicon&&this.value&&!this.disabled&&!this.readonly&&this.type!=x.NUMBER)return e("button",{type:"button",class:"icon-button reset-icon","aria-label":"cancella il contenuto dell'input",onClick:()=>this.emitInputChange("")},e("z-icon",{name:"multiply",class:this.size}))}renderShowHidePassword(){return e("button",{type:"button",class:"icon-button toggle-password-icon",disabled:this.disabled,"aria-label":this.passwordHidden?"mostra password":"nascondi password",onClick:()=>this.passwordHidden=!this.passwordHidden},e("z-icon",{name:this.passwordHidden?"view-filled":"view-off-filled",class:this.size}))}renderMessage(){if(!1!==S(this.message))return e("z-input-message",{message:!0===S(this.message)?void 0:this.message,status:this.status,class:this.size})}renderTextarea(){const t=this.getTextAttributes(),i=this.ariaLabel?{"aria-label":this.ariaLabel}:{};return e("div",{class:"text-wrapper"},this.renderLabel(),e("div",{class:Object.assign(Object.assign({},t.class),{"textarea-wrapper":!0,readonly:t.readonly})},e("textarea",Object.assign({},t,i))),this.renderMessage())}handleCheck(t){this.checked=t.target.checked,this.emitInputCheck(this.checked)}renderCheckbox(){return e("div",{class:"checkbox-wrapper"},e("input",{id:this.htmlid,type:"checkbox",name:this.name,checked:this.checked,disabled:this.disabled,readonly:this.readonly,required:this.required,onChange:this.handleCheck.bind(this),value:this.value}),e("label",{htmlFor:this.htmlid,class:{"checkbox-label":!0,after:this.labelPosition===m.RIGHT,before:this.labelPosition===m.LEFT}},e("z-icon",{name:this.checked?"checkbox-checked":"checkbox","aria-hidden":"true",class:this.size}),this.label&&e("span",{innerHTML:this.label})))}renderRadio(){return e("div",{class:"radio-wrapper"},e("input",{id:this.htmlid,type:"radio",name:this.name,checked:this.checked,disabled:this.disabled,readonly:this.readonly,onChange:this.handleCheck.bind(this),value:this.value}),e("label",{htmlFor:this.htmlid,class:{"radio-label":!0,after:this.labelPosition===m.RIGHT,before:this.labelPosition===m.LEFT}},e("z-icon",{name:this.checked?"radio-button-checked":"radio-button","aria-hidden":"true",class:this.size}),this.label&&e("span",{innerHTML:this.label})))}render(){let t;switch(this.type){case x.TEXTAREA:t=this.renderTextarea();break;case x.CHECKBOX:t=this.renderCheckbox();break;case x.RADIO:t=this.renderRadio();break;default:t=this.renderInputText(this.type)}return e(a,null,t)}get hostElement(){return r(this)}};R.style='.sc-z-input-h{display:inline-block;width:inherit}input.sc-z-input::-ms-clear,input.sc-z-input::-ms-reveal{display:none}.sc-z-input-h input.sc-z-input::-ms-clear,.sc-z-input-h input.sc-z-input::-ms-reveal{display:none}input.sc-z-input,textarea.sc-z-input,.textarea-wrapper.sc-z-input{box-sizing:border-box;border:var(--border-size-small) solid var(--color-surface04);background:var(--color-input-field01);border-radius:var(--border-radius-small);color:var(--color-text01);fill:var(--color-icon02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg);outline:none}[size="small"].sc-z-input-h input.sc-z-input,[size="small"].sc-z-input-h textarea.sc-z-input,[size="small"].sc-z-input-h .textarea-wrapper.sc-z-input,[size="x-small"].sc-z-input-h input.sc-z-input,[size="x-small"].sc-z-input-h textarea.sc-z-input,[size="x-small"].sc-z-input-h .textarea-wrapper.sc-z-input{font-size:var(--font-size-2)}.cursor-select.sc-z-input-h input.sc-z-input{cursor:pointer}.sc-z-input-h:not(.active-select) input.sc-z-input:focus:focus-visible,.textarea-wrapper.sc-z-input:focus-within{box-shadow:var(--shadow-focus-primary)}input.sc-z-input:focus:focus-visible,textarea.sc-z-input:focus:focus-visible{color:var(--color-primary02)}.active-select.sc-z-input-h input.sc-z-input{border:var(--border-size-small) solid var(--blue500)}.cursor-select.sc-z-input-h input.sc-z-input:focus:focus-visible{box-shadow:var(--shadow-focus-primary)}.sc-z-input-h input[readonly].sc-z-input:focus:focus-visible{box-shadow:none}.filled.sc-z-input{border-color:var(--color-surface05)}.input-success.sc-z-input{border-color:var(--color-success01);background:var(--color-success-inverse);fill:var(--color-success01)}.input-error.sc-z-input{border-color:var(--color-error01);background:var(--color-error-inverse);fill:var(--color-error01)}.input-warning.sc-z-input{border-color:var(--color-warning01);background:var(--color-warning-inverse);fill:var(--color-warning01)}input.sc-z-input:hover,.textarea-wrapper.sc-z-input:hover{outline:var(--border-size-medium) solid var(--color-surface04);outline-offset:-2px}.sc-z-input-h:not(.active-select) input[readonly].sc-z-input,.readonly.sc-z-input{border-color:var(--color-disabled01);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled="false"]) input.sc-z-input,[disabled].sc-z-input-h:not([disabled="false"]) .textarea-wrapper.sc-z-input,[disabled].sc-z-input-h:not([disabled="false"]) z-icon.sc-z-input{border-color:var(--color-disabled01);box-shadow:none;color:var(--color-disabled02);fill:var(--color-disabled01);pointer-events:none}[disabled].sc-z-input-h:not([disabled="false"]) input.sc-z-input:hover{border-width:var(--border-size-small)}input.sc-z-input::placeholder,textarea.sc-z-input::placeholder{color:var(--color-text05)}.sc-z-input::-webkit-textarea-placeholder{color:var(--color-text05)}.sc-z-input:-ms-textarea-placeholder{color:var(--color-text05)}.sc-z-input::placeholder{color:var(--color-text05)}label.input-label.sc-z-input{display:block;padding-bottom:var(--space-unit);color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);text-align:left;text-transform:uppercase}[disabled].sc-z-input-h:not([disabled="false"]) label.input-label.sc-z-input{color:var(--color-disabled02)}.text-wrapper.sc-z-input>div.sc-z-input{position:relative;z-index:1;fill:var(--color-icon02)}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{width:100%;height:calc(var(--space-unit) * 5.5);box-sizing:border-box;padding:0 calc(var(--space-unit) * 1.5);margin:0}[size="small"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4.5)}[size="x-small"].sc-z-input-h .text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input{height:calc(var(--space-unit) * 4)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.sc-z-input,.text-wrapper.sc-z-input>div.sc-z-input>input.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 5.25)}.text-wrapper.sc-z-input>div.sc-z-input>input.has-icon.has-clear-icon.sc-z-input{padding-right:calc(var(--space-unit) * 8)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input{position:absolute;z-index:2;top:50%;right:calc(var(--space-unit) * 1.5);display:flex;pointer-events:none;transform:translateY(-50%)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input{padding:0;border:0;background:none;color:inherit;font:inherit;pointer-events:initial}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input+button.icon-button.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.reset-icon.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.toggle-password-icon.sc-z-input{cursor:pointer}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.sc-z-input{--z-icon-width:18px;--z-icon-height:18px;display:block}.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.small.sc-z-input,.text-wrapper.sc-z-input .icons-wrapper.sc-z-input>button.icon-button.sc-z-input>z-icon.x-small.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:hover,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:focus,.text-wrapper.sc-z-input>div.sc-z-input>input.sc-z-input:-webkit-autofill:active{background:var(--color-white) !important;background-clip:text !important;-webkit-transition-delay:99999s !important}.textarea-wrapper.sc-z-input{padding:calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}textarea.sc-z-input::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-track{background-color:transparent}textarea.sc-z-input::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}textarea.sc-z-input::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}textarea.sc-z-input{width:100%;min-height:132px;padding:0;border:none;margin:0;resize:none}.radio-wrapper.sc-z-input,.checkbox-wrapper.sc-z-input{position:relative;display:inline-flex;flex-direction:row;align-items:center;color:var(--color-text01);fill:var(--color-primary01);font-family:var(--font-family-sans)}.radio-wrapper.sc-z-input:hover,.checkbox-wrapper.sc-z-input:hover{color:var(--color-hover-primary);fill:currentcolor}.radio-wrapper.sc-z-input>input.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input{position:absolute;z-index:-1;opacity:0;pointer-events:none}.radio-wrapper.sc-z-input .radio-label.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{display:inline-flex;align-items:center;margin:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1;text-transform:inherit}.radio-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input input.sc-z-input:not(:disabled)+.checkbox-label.sc-z-input{cursor:pointer}.radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{cursor:pointer;fill:inherit}[size="small"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size="small"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:16px;--z-icon-height:16px}[size="small"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size="small"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-2)}[size="x-small"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input z-icon.sc-z-input,[size="x-small"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input z-icon.sc-z-input{--z-icon-width:14px;--z-icon-height:14px}[size="x-small"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.sc-z-input,[size="x-small"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.sc-z-input{font-size:var(--font-size-1)}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input{flex-direction:row}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input{flex-direction:row-reverse}.radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:var(--space-unit)}.radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,.checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:var(--space-unit)}[size="small"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size="small"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input,[size="x-small"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.after.sc-z-input>span.sc-z-input,[size="x-small"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.after.sc-z-input>span.sc-z-input{margin-left:calc(var(--space-unit) * 0.5)}[size="small"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size="small"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input,[size="x-small"].sc-z-input-h .radio-wrapper.sc-z-input .radio-label.before.sc-z-input>span.sc-z-input,[size="x-small"].sc-z-input-h .checkbox-wrapper.sc-z-input .checkbox-label.before.sc-z-input>span.sc-z-input{margin-right:calc(var(--space-unit) * 0.5)}.radio-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:focus:focus-visible+.checkbox-label.sc-z-input>z-icon.sc-z-input{border-radius:var(--border-radius-small);box-shadow:var(--shadow-focus-primary)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input{color:var(--color-disabled02)}.radio-wrapper.sc-z-input>input.sc-z-input:disabled+.radio-label.sc-z-input>z-icon.sc-z-input,.checkbox-wrapper.sc-z-input>input.sc-z-input:disabled+.checkbox-label.sc-z-input>z-icon.sc-z-input{cursor:default;fill:var(--color-disabled01)}';const B=class{constructor(i){t(this,i),this.statusIcons={success:"checkmark-circle",error:"multiply-circled",warning:"exclamation-circle"},this.statusRole={}}onMessageChange(){this.statusRole=this.message&&this.status?{role:"alert"}:{}}componentWillLoad(){this.onMessageChange()}render(){return e(a,Object.assign({},this.statusRole,{"aria-label":this.message}),this.statusIcons[this.status]&&this.message&&e("z-icon",{name:this.statusIcons[this.status]}),e("span",{innerHTML:this.message}))}static get watchers(){return{message:["onMessageChange"],status:["onMessageChange"]}}};B.style=':host{display:flex;min-height:calc(var(--space-unit) * 2.5);align-items:start;margin-top:var(--space-unit);color:var(--color-text05);fill:currentcolor;font-family:var(--font-family-sans);font-size:var(--font-size-2);letter-spacing:0.16px}:host(.small),:host(.x-small){margin-top:calc(var(--space-unit) * 0.5);font-size:var(--font-size-1)}:host([status="success"]){color:var(--color-text-success)}:host([status="error"]){color:var(--color-text-error)}:host([status="warning"]){color:var(--color-warning02)}:host(:focus){outline:none}:host>z-icon{--z-icon-width:calc(var(--space-unit) * 2);--z-icon-height:calc(var(--space-unit) * 2);--z-icon-right-margin:var(--space-unit);margin-top:calc(var(--space-unit) * 0.25)}:host(.small)>z-icon,:host(.x-small)>z-icon{--z-icon-width:14px;--z-icon-height:14px;--z-icon-right-margin:calc(var(--space-unit) * 0.5)}';const E=class{constructor(i){t(this,i),this.size=b.MEDIUM,this.listType=w.NONE}setChildrenSizeType(){const t=this.host.children;for(let i=0;i<t.length;i++)t[i].setAttribute("size",this.size),t[i].setAttribute("list-type",this.listType),t[i].setAttribute("list-element-position",(i+1).toString())}componentDidLoad(){this.setChildrenSizeType()}render(){return e(a,{role:"list"},e("slot",null))}get host(){return r(this)}};E.style=":host{display:flex;flex-direction:column;font-family:var(--font-family-sans);font-weight:var(--font-rg)}";const H=class{constructor(e){t(this,e),this.accessibleFocus=i(this,"accessibleFocus",7),this.clickItem=i(this,"clickItem",7),this.alignButton=y.LEFT,this.clickable=!1,this.dividerColor="color-surface03",this.dividerType=v.NONE,this.dividerSize=g.SMALL,this.expandable=!1,this.expandableStyle=k.ACCORDION,this.size=b.MEDIUM,this.color="none",this.disabled=!1,this.isContextualMenu=!1,this.listElementPosition="0",this.listType=w.NONE,this.showInnerContent=!1,this.openElementConfig={accordion:{open:"minus-circled",close:"plus-circled"},menu:{open:"chevron-up",close:"chevron-down"}},this.handleClick=this.handleClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}accessibleFocusHandler(t){this.listElementId===t.detail&&this.host.shadowRoot.getElementById(`z-list-element-id-${t.detail}`).focus()}handleClick(){this.clickItem.emit(this.listElementId),this.expandable&&(this.showInnerContent=!this.showInnerContent)}calculateClass(){return this.isContextualMenu?"container-contextual-menu":"container"}handleKeyDown(t){const i=t.code===d.ENTER;switch(t.code){case d.ARROW_DOWN:t.preventDefault(),this.accessibleFocus.emit(this.listElementId+1);break;case d.ARROW_UP:t.preventDefault(),this.accessibleFocus.emit(this.listElementId-1);break;case d.ENTER:t.preventDefault(),this.clickItem.emit(this.listElementId)}this.expandable&&i&&(this.showInnerContent=!this.showInnerContent)}renderExpandableButton(){return this.expandable?e("z-icon",{name:this.showInnerContent?this.openElementConfig[this.expandableStyle].open:this.openElementConfig[this.expandableStyle].close}):null}renderExpandedContent(){return this.expandable?e("div",{class:{"z-list-element-inner-container":!0,expanded:this.showInnerContent}},e("slot",{name:"inner-content"})):null}renderContent(){return this.listType===w.NONE?e("slot",null):this.listType===w.ORDERED?e("div",{class:"z-list-content-container"},e("div",null,this.listElementPosition,". "),e("slot",null)):this.listType===w.UNORDERED?e("div",{class:"z-list-content-container"},e("span",null,"• "),e("slot",null)):void 0}render(){return e(a,{role:"listitem","aria-expanded":this.expandable?this.showInnerContent:null,onClick:this.handleClick,onKeyDown:this.handleKeyDown,clickable:this.clickable&&!this.disabled,tabIndex:this.isContextualMenu?null:"0"},e("div",{class:`${this.calculateClass()}`,style:{color:`var(--${this.color})`},tabindex:this.isContextualMenu?"0":"-1",id:`z-list-element-id-${this.listElementId}`,part:"list-item-container"},e("div",{class:"z-list-element-container"},this.renderExpandableButton(),this.renderContent()),this.renderExpandedContent()),this.dividerType===v.ELEMENT&&e("z-divider",{color:this.dividerColor,size:this.dividerSize}))}get host(){return r(this)}};H.style=':host{outline:none}:host>.container,:host>.container-contextual-menu{--background-color-list-element:var(--bg-white);--background-hover-color-list-element:var(--color-surface02);--background-active-color-list-element:var(--color-surface02);display:flex;box-sizing:border-box;flex-direction:column;justify-content:center;font-family:var(--font-family-sans);font-weight:var(--font-rg);outline:none}:host([size="small"])>.container{min-height:calc(var(--space-unit) * 4);padding:calc(var(--space-unit) / 2) 0}:host([size="medium"])>.container{min-height:calc(var(--space-unit) * 5);padding:var(--space-unit) 0}:host([size="large"])>.container{min-height:calc(var(--space-unit) * 7);padding:calc(var(--space-unit) * 2) 0}:host([size="x-large"])>.container{min-height:calc(var(--space-unit) * 9);padding:calc(var(--space-unit) * 3) 0}:host([expandable])>.container,:host([expandable])>.container-contextual-menu,:host([clickable])>.container,:host([clickable])>.container-contextual-menu{cursor:pointer}:host([expandable]:hover)>.container,:host([expandable]:hover)>.container-contextual-menu,:host([clickable]:hover)>.container,:host([clickable]:hover)>.container-contextual-menu{background-color:var(--background-hover-color-list-element)}:host([expandable]:focus:focus-visible)>.container,:host([expandable]:focus:focus-visible)>.container-contextual-menu,:host([clickable]:focus:focus-visible)>.container,:host([clickable]:focus:focus-visible)>.container-contextual-menu{box-shadow:var(--shadow-focus-primary)}:host([clickable]:not([expandable]))>.container.clicked,:host([clickable]:not([expandable]))>.container-contextual-menu.clicked{box-shadow:var(--shadow-focus-primary)}:host([expandable]:active)>.container,:host([expandable]:active)>.container-contextual-menu,:host([clickable]:active)>.container,:host([clickable]:active)>.container-contextual-menu{background-color:var(--background-active-color-list-element)}:host([align-button="left"][expandable])>.container>.z-list-element-container,:host([align-button="left"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex}:host([align-button="right"][expandable])>.container>.z-list-element-container,:host([align-button="right"][expandable])>.container-contextual-menu>.z-list-element-container{display:flex;flex-direction:row-reverse;justify-content:space-between}:host([align-button="left"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button="left"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-right:var(--space-unit)}:host([align-button="right"][expandable])>.container>.z-list-element-container>z-icon,:host([align-button="right"][expandable])>.container-contextual-menu>.z-list-element-container>z-icon{margin-left:var(--space-unit)}:host>.container>.z-list-element-inner-container,:host>.container-contextual-menu>.z-list-element-inner-container{display:none}:host>.container>.z-list-element-inner-container.expanded,:host>.container-contextual-menu>.z-list-element-inner-container.expanded{display:block}:host([clickable]:hover)>.container-contextual-menu{background-color:var(--color-surface03)}.container-contextual-menu:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.z-list-content-container{display:flex;align-items:center}';const D=class{constructor(i){t(this,i),this.size=b.MEDIUM,this.dividerType=v.NONE,this.dividerSize=g.SMALL,this.dividerColor="gray200",this.listType=w.NONE}componentDidLoad(){const t=this.host.children;for(let i=0;i<t.length;i++)t.length-1>i&&(t[i].setAttribute("divider-type",this.dividerType),t[i].setAttribute("divider-size",this.dividerSize),t[i].setAttribute("divider-color",this.dividerColor)),t[i].setAttribute("size",this.size),t[i].setAttribute("list-type",this.listType),t[i].setAttribute("list-element-position",i.toString())}componentWillLoad(){this.hasHeader=!!this.host.querySelector('[slot="header-title"]')}render(){return e(a,{role:"group"},e("div",{class:{"z-list-group-header-container":!0,"has-header":this.hasHeader}},e("slot",{name:"header-title"}),this.dividerType===v.HEADER&&e("z-divider",{color:this.dividerColor,size:this.dividerSize})),e("slot",null))}get host(){return r(this)}};D.style=":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.z-list-group-header-container{color:var(--gray700);font-size:var(--font-size-2);font-weight:var(--font-sb) !important;letter-spacing:0.16px;line-height:1.4}:host>.z-list-group-header-container.has-header{padding-top:var(--space-unit);padding-bottom:var(--space-unit)}:host>.z-list-group-header-container.has-header>z-divider{margin-top:var(--space-unit)}";const F=class{constructor(e){t(this,e),this.canvasOpenStatusChanged=i(this,"canvasOpenStatusChanged",7),this.variant=o.PUSHCONTENT,this.open=!1,this.transitiondirection=c.LEFT,this.skipLoadAnimation=!1}onOpenChanged(){!this.open&&this.skipLoadAnimation&&(this.skipLoadAnimation=!1),this.open&&this.handlePageOverflow(),this.canvasOpenStatusChanged.emit(this.open)}handlePageOverflow(){document.body.style[this.variant===o.OVERLAY?"overflow-y":"overflow-x"]=this.open?"hidden":""}render(){return e(a,{class:{"skip-animation":this.skipLoadAnimation}},e("div",{role:"presentation",class:"canvas-container",onTransitionEnd:()=>this.handlePageOverflow()},e("div",{role:"presentation",class:"canvas-content"},e("slot",{name:"canvasContent"}))),this.variant==o.OVERLAY&&e("div",{class:"canvas-background","data-action":"canvasBackground",onClick:()=>this.open=!1}))}static get watchers(){return{open:["onOpenChanged"]}}};F.style='.sc-z-offcanvas-h{--z-offcanvas--container-width:375px;--z-offcanvas--top-space:0;min-width:100%;height:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg);visibility:hidden}.canvas-container.sc-z-offcanvas{display:flex;overflow:-moz-scrollbars-none;overflow:hidden;min-width:100%;height:100%;flex-direction:column;background:var(--color-surface01)}[variant="pushcontent"].sc-z-offcanvas-h{display:none}[open].sc-z-offcanvas-h{display:flex;visibility:visible}[variant="overlay"].sc-z-offcanvas-h{position:fixed;z-index:1000;top:var(--z-offcanvas--top-space);right:0;bottom:0;left:0;display:flex;height:calc(100% - var(--z-offcanvas--top-space))}[variant="overlay"][transitiondirection="left"].sc-z-offcanvas-h{justify-content:end}[variant="overlay"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas{z-index:1010}[variant="overlay"].sc-z-offcanvas-h .canvas-background.sc-z-offcanvas{position:absolute;left:0;width:100%;height:100%;background-color:var(--gray900);opacity:0.7}.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{overflow:auto;flex:1 auto;padding:0 calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) calc(var(--space-unit) * 2) 0;overflow-x:hidden}[variant="overlay"].sc-z-offcanvas-h>.canvas-container.sc-z-offcanvas>.canvas-content.sc-z-offcanvas{padding:0 calc(var(--space-unit) * 2) calc(var(--space-unit) * 2) calc(var(--space-unit) * 2);margin:calc(var(--space-unit) * 2) calc(var(--space-unit) / 2) 0 0}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-track{background-color:transparent}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.canvas-container.sc-z-offcanvas .canvas-content.sc-z-offcanvas{scrollbar-color:var(--color-primary01) transparent}@media only screen and (max-width: 768px){[open][transitiondirection="left"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-right 0.4s ease-out}[open][transitiondirection="right"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-left 0.4s ease-out}}@media only screen and (min-width: 768px){.sc-z-offcanvas-h{min-width:auto}.canvas-container.sc-z-offcanvas{width:auto;min-width:max(var(--z-offcanvas--container-width), 375px);max-width:max(var(--z-offcanvas--container-width), 375px);height:auto;min-height:calc(var(--space-unit) * 40)}.sc-z-offcanvas-h:not([variant="overlay"])[open]:not(.skip-animation){width:auto;animation:grow 0.4s ease-out}}@keyframes grow{from{width:0}to{width:max(var(--z-offcanvas--container-width), 375px)}}@keyframes enter-left{from{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes enter-right{from{transform:translateX(100%)}to{transform:translateX(0)}}[open][variant="overlay"][transitiondirection="left"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-right 0.4s ease-out}[open][transitiondirection="right"].sc-z-offcanvas-h:not(.skip-animation)>.canvas-container.sc-z-offcanvas{animation:enter-left 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant="overlay"][transitiondirection="right"]>.canvas-container.sc-z-offcanvas{transform:translateX(-100%);transition:visibility 0.4s ease-out, transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant="overlay"][transitiondirection="left"]>.canvas-container.sc-z-offcanvas{transform:translateX(100%);transition:visibility 0.4s ease-out, transform 0.4s ease-out}.sc-z-offcanvas-h:not([open])[variant="overlay"] .canvas-background.sc-z-offcanvas{transition:visibility 0.4s ease-out;visibility:hidden}';const N=document.documentElement;function W(t){return t.parentNode.host?t.parentNode.host:t.parentNode}function X(t,i){const e=t.getBoundingClientRect(),a=e.width,r=e.height;let s,n,o=0,c=0,l=t;for(;l&&l!=i;){if(c+=l.offsetLeft,l===document.body?o+=l.getBoundingClientRect().top+window.scrollY:o+=l.offsetTop,window.DOMMatrix){const t=window.getComputedStyle(l),i=new DOMMatrix(t.transform||t.webkitTransform);i&&(c+=i.m41,l!==document.body&&(o+=i.m42))}if(!l.offsetParent)break;l=l.offsetParent}return l===document.body?(s=window.innerWidth,n=window.innerHeight):(s=l.offsetWidth,n=l.offsetHeight),{top:o,right:s-c-e.width,bottom:n-o-e.height,left:c,width:a,height:r}}const K=class{constructor(e){t(this,e),this.positionChange=i(this,"positionChange",7),this.openChange=i(this,"openChange",7),this.position=u.AUTO,this.open=!1,this.showArrow=!1,this.center=!1,this.closable=!0}closePopoverWithKeyboard(t){this.closable&&t.key===d.ESC&&(this.open=!1)}handleOutsideClick(t){if(this.closable&&this.open&&!t.composedPath().includes(this.host)){const i=t.target;(this.bindTo instanceof HTMLElement?this.bindTo.contains(i):i.closest(this.bindTo))&&t.stopPropagation(),this.open=!1,this.positionChange.emit({position:this.currentPosition})}}validatePosition(t){t&&!Object.values(u).includes(t)&&(this.position=u.AUTO),this.currentPosition=this.position,this.positionChange.emit({position:this.currentPosition})}onOpen(){if(cancelAnimationFrame(this.animationFrameRequestId),this.open){const t=()=>{this.open&&(this.setPosition(),this.animationFrameRequestId=requestAnimationFrame(t))};t()}else this.host.hasAttribute("current-position")&&(this.host.removeAttribute("current-position"),this.currentPosition=void 0);this.openChange.emit({open:this.open})}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}setPosition(){let t;if(t="string"==typeof this.bindTo?this.host.ownerDocument.querySelector(this.bindTo):this.bindTo?this.bindTo:this.host.parentElement,!t)return;const i=function(t){let i=W(t);for(;i&&i!==N;){const{overflow:t,overflowX:e,overflowY:a}=window.getComputedStyle(i);if("hidden"===t||"hidden"===a||"hidden"===e)return i;if(i.scrollHeight>i.clientHeight&&"visible"!==t&&"visible"!==a||i.scrollWidth>i.clientWidth&&"visible"!==t&&"visible"!==e)return i;i=W(i)}return N}(t),e=i.getBoundingClientRect(),a=this.host.offsetParent,r=a?X(a,i):{top:0,right:0,bottom:0,left:0},s=X(t,i),n=s.top-i.scrollTop,o=e.height-(s.top+s.height)+i.scrollTop,c=s.left-i.scrollLeft,l=e.width-(s.left+s.width)+i.scrollLeft,h=Math.max(0,e.top+e.height-window.innerHeight),p=Math.max(0,e.left+e.width-window.innerWidth),d=Math.min(n,n+e.top),v=Math.min(o,o-h),b=Math.min(c,c+e.left),z=Math.min(l,l-p),g=d+v+s.height,f=b+z+s.width;let m=this.currentPosition;const x=[];this.position===u.AUTO&&(b/f>.6?x.push(u.LEFT):b/f<.4&&x.push(u.RIGHT),d/g>.9?x.unshift(u.TOP):d/g>.6?x.push(u.TOP):d/g<.1?x.unshift(u.BOTTOM):x.push(u.BOTTOM),m=x.join("_"));const w=this.host.style;w.position="absolute";const y=s.top-r.top,k=s.right-r.right,C=s.bottom-r.bottom,$=s.left-r.left,O=this.center?.5:0,S=this.center?.5:0;m===u.TOP||m===u.TOP_RIGHT?(w.top="auto",w.right="auto",w.bottom=`${C+s.height}px`,w.left=`${$+s.width*O}px`,w.maxHeight=`${d}px`,m===u.TOP_RIGHT&&(w.maxWidth=`${z+s.width*S}px`)):m===u.TOP_LEFT?(w.top="auto",w.right=`${k+s.width*O}px`,w.bottom=`${C+s.height}px`,w.left="auto",w.maxWidth=`${b}px`,w.maxHeight=`${d}px`):m===u.BOTTOM||m===u.BOTTOM_RIGHT?(w.top=`${y+s.height}px`,w.right="auto",w.bottom="auto",w.left=`${$+s.width*O}px`,w.maxHeight=`${v}px`,m===u.BOTTOM_RIGHT&&(w.maxWidth=`${z+s.width*S}px`)):m===u.BOTTOM_LEFT?(w.top=`${y+s.height}px`,w.right=`${k+s.width*O}px`,w.bottom="auto",w.left="auto",w.maxWidth=`${b}px`,w.maxHeight=`${v}px`):m===u.RIGHT||m===u.RIGHT_BOTTOM?(w.top=`${y+s.height*O}px`,w.right="auto",w.bottom="auto",w.left=`${$+s.width}px`,w.maxWidth=`${z}px`,w.maxHeight=`${v+s.height*S}px`):m===u.RIGHT_TOP?(w.top="auto",w.right="auto",w.bottom=`${C+s.height*O}px`,w.left=`${$+s.width}px`,w.maxWidth=`${z}px`,w.maxHeight=`${d+s.height*S}px`):m===u.LEFT||m===u.LEFT_BOTTOM?(w.top=`${y+s.height*O}px`,w.right=`${k+s.width}px`,w.bottom="auto",w.left="auto",w.maxWidth=`${b}px`,w.maxHeight=`${v+s.height*S}px`):m===u.LEFT_TOP&&(w.top="auto",w.right=`${k+s.width}px`,w.bottom=`${C+s.height*O}px`,w.left="auto",w.maxWidth=`${b}px`,w.maxHeight=`${d+s.height*S}px`),this.currentPosition=m||this.position,this.host.setAttribute("current-position",this.currentPosition)}componentWillLoad(){this.validatePosition(this.position),this.onOpen()}render(){return e("slot",null)}get host(){return r(this)}static get watchers(){return{position:["validatePosition"],open:["onOpen"]}}};K.style=':host{--z-popover-theme--surface:var(--color-surface01);--z-popover-theme--text:var(--color-text01);--z-popover-padding:0;--z-popover-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base));position:relative;display:none;min-width:calc(var(--space-unit) * 8);min-height:calc(var(--space-unit) * 4);align-items:center;justify-content:center;padding:var(--z-popover-padding);background:var(--z-popover-theme--surface);border-radius:var(--border-radius-small);color:var(--z-popover-theme--text);fill:currentcolor;filter:var(--z-popover-shadow-filter);font-family:var(--font-family-sans);text-align:center}:host([open][current-position]),:host([open="true"][current-position]){display:flex}:host([center][current-position="top"]),:host([center][current-position="bottom"]){transform:translateX(-50%)}:host([center][current-position="right"]),:host([center][current-position="left"]){transform:translateY(-50%)}:host([current-position^="top"]){margin:0 0 var(--space-unit)}:host([current-position^="bottom"]){margin:var(--space-unit) 0 0}:host([current-position^="left"]){margin:0 var(--space-unit) 0 0}:host([current-position^="right"]){margin:0 0 0 var(--space-unit)}:host([current-position])::before{--arrow-size:6px;--arrow-edge-offset:calc(100% - var(--space-unit) - (var(--arrow-size) / 2));--arrow-center-x-offset:calc(50% - (var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - (var(--arrow-size) / 2));position:absolute;display:block;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface);content:"";transform:rotate(45deg)}:host([show-arrow="false"])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^="top"])::before{top:var(--arrow-center-y-offset)}:host([current-position^="bottom"])::before{bottom:var(--arrow-center-y-offset)}:host([current-position="top"])::before,:host([current-position="bottom"])::before{right:var(--arrow-edge-offset)}:host([current-position="right"])::before,:host([current-position="left"])::before{bottom:var(--arrow-edge-offset)}:host([current-position="right"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left"])::before{left:var(--arrow-center-y-offset)}:host([current-position="top_right"])::before,:host([current-position="bottom_right"])::before{right:var(--arrow-edge-offset)}:host([current-position="top_left"])::before,:host([current-position="bottom_left"])::before{left:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="left_top"])::before{top:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="right_bottom"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left_top"])::before,:host([current-position="left_bottom"])::before{left:var(--arrow-center-y-offset)}:host([current-position="right_bottom"])::before,:host([current-position="left_bottom"])::before{bottom:var(--arrow-edge-offset)}:host([center][current-position="top"])::before,:host([center][current-position="bottom"])::before{right:auto;left:var(--arrow-center-x-offset)}:host([center][current-position="right"])::before,:host([center][current-position="left"])::before{top:var(--arrow-center-x-offset);bottom:auto}::slotted(*){overflow:auto;flex:1 auto}';const V=class{constructor(e){t(this,e),this.searchSubmit=i(this,"searchSubmit",7),this.searchTyping=i(this,"searchTyping",7),this.searchItemClick=i(this,"searchItemClick",7),this.htmlid=`searchbar-${O()}`,this.preventSubmit=!1,this.autocomplete=!1,this.autocompleteMinChars=3,this.resultsEllipsis=!0,this.searchHelperLabel="Cerca {searchString}",this.sortResultsItems=!1,this.showSearchButton=!1,this.searchButtonIconOnly=!1,this.size=s.BIG,this.variant=n.PRIMARY,this.searchString=this.value,this.currResultsCount=0,this.showResults=!1,this.resultsItemsList=null}emitSearchSubmit(){this.searchSubmit.emit(this.inputRef.value)}emitSearchTyping(t){this.searchTyping.emit(t)}emitSearchItemClick(t){this.searchItemClick.emit(t)}watchItems(){this.resultsItemsList=this.getResultsItemsList()}watchResultsCount(){this.currResultsCount=this.resultsCount}watchValue(){this.searchString=this.value}watchSearchString(){this.emitSearchTyping(this.searchString),this.searchString||(this.currResultsCount=this.resultsCount)}componentWillLoad(){this.resultsItemsList=this.getResultsItemsList(),this.currResultsCount=this.resultsCount}getResultsItemsList(){return"string"==typeof this.resultsItems?JSON.parse(this.resultsItems):this.resultsItems}getGroupedItems(t){const i={};return t.forEach((t=>{var e;const a=`${null==t?void 0:t.category}${null==t?void 0:t.subcategory}`;i[a]=null!==(e=i[a])&&void 0!==e?e:{category:null==t?void 0:t.category,subcategory:null==t?void 0:t.subcategory,items:[]},i[a].items.push(t)})),this.sortResultsItems?Object.keys(i).sort().reduce(((t,e)=>(t[e]=Object.assign(Object.assign({},i[e]),{items:i[e].items.sort(((t,i)=>{const e=t.label.toUpperCase(),a=i.label.toUpperCase();return e<a?-1:e>a?1:0}))}),t)),{}):i}checkResultsCount(t){return!this.currResultsCount||t<this.currResultsCount}handleStopTyping(t){t.stopPropagation(),this.searchString=t.detail.value}handleSubmit(){this.preventSubmit||this.emitSearchSubmit()}handleOutsideClick(t){const i=t.composedPath(),e=i.find((t=>"Z-SEARCHBAR"===t.nodeName));this.showResults=!(!e||e.htmlid!==this.htmlid||!i.find((t=>{var i;return"Z-INPUT"===(null==t?void 0:t.nodeName)||(null===(i=null==t?void 0:t.classList)||void 0===i?void 0:i.contains("results"))})))}renderInput(){return e("z-input",{ref:t=>{this.inputRef=t},message:!1,placeholder:this.placeholder,onStopTyping:t=>this.handleStopTyping(t),onKeyUp:t=>j(t,(()=>this.handleSubmit())),value:this.value,size:this.size})}renderButton(){if(!this.showSearchButton)return null;const t=this.searchButtonIconOnly?"":"CERCA",i=Object.assign({disabled:this.preventSubmit,variant:this.variant,size:this.size,onClick:()=>this.handleSubmit()},this.searchButtonIconOnly?{icon:"search"}:null);return e("z-button",Object.assign({},i),t)}renderResults(){return this.showResults&&this.autocomplete&&this.searchString&&!(this.searchString.length<this.autocompleteMinChars)&&this.resultsItemsList?e("div",{class:"results-wrapper"},e("div",{class:"results"},this.renderResultsList())):null}renderResultsList(){var t,i;return this.preventSubmit&&!(null===(t=this.resultsItemsList)||void 0===t?void 0:t.length)?e("span",{class:"item item-no-results"},"Non abbiamo trovato risultati per ",e("b",null,this.searchString),e("br",null),e("br",null),"Cosa puoi fare?",e("ul",null,e("li",null,"Verificare di aver scritto bene"),e("li",null,"Provare a cercare un'altra parola"),e("li",null,"Provare a cercare qualcosa di più generico"))):e("z-list",{role:"listbox",id:`list-${this.htmlid}`},this.renderSearchHelper(!!(null===(i=this.resultsItemsList)||void 0===i?void 0:i.length)),this.renderItems(),this.renderShowAllResults())}renderItems(){var t;if(!(null===(t=this.resultsItemsList)||void 0===t?void 0:t.length))return[];const i=this.getGroupedItems(this.resultsItemsList),a=[];let r=0;return Object.values(i).forEach(((t,i,s)=>{if(this.checkResultsCount(r)){const n=[];t.items.forEach(((t,e,a)=>{this.checkResultsCount(r)&&n.push(this.renderItem(t,e,!(i===s.length-1&&e===a.length-1))),r++})),n.length&&a.push(e("z-list-group",{"divider-type":v.ELEMENT},this.renderItemCategory(t),n))}})),a}renderItem(t,i,a){return e("z-list-element",{id:`list-item-${this.htmlid}-${i}`,role:"option",tabindex:0,dividerType:a?v.ELEMENT:void 0,clickable:!0,onClickItem:()=>this.emitSearchItemClick(t)},e("span",{class:{item:!0,ellipsis:this.resultsEllipsis,"has-category":!!t.category}},(null==t?void 0:t.icon)&&e("z-icon",{class:"item-icon",name:t.icon}),e("span",{class:"item-label",title:t.label,innerHTML:this.renderItemLabel(t.label)})))}renderItemLabel(t){return this.searchString?t.replace(new RegExp(this.searchString.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gmi"),(t=>`<mark>${t}</mark>`)):t}renderItemCategory(t){return(null==t?void 0:t.category)?e("span",{class:"category-heading",slot:"header-title"},e("span",{class:"category"},t.category),(null==t?void 0:t.subcategory)&&e("span",{class:"subcategory"},t.subcategory)):null}renderSearchHelper(t=!0){return this.autocomplete&&!this.preventSubmit&&this.searchString?e("z-list-element",{role:"option",tabindex:0,dividerType:t?v.ELEMENT:void 0,clickable:!0,id:`list-item-${this.htmlid}-search`,onClickItem:()=>this.emitSearchSubmit()},e("span",{class:"item item-search"},e("z-icon",{class:"search-icon",name:"left-magnifying-glass"}),e("span",{class:"item-label",innerHTML:this.searchHelperLabel.replace("{searchString}",`<mark>${this.searchString}</mark>`)}))):null}renderShowAllResults(){var t,i;return!this.currResultsCount||!this.searchString||!(null===(t=this.resultsItemsList)||void 0===t?void 0:t.length)||this.currResultsCount>=(null===(i=this.resultsItemsList)||void 0===i?void 0:i.length)?null:e("z-list-element",{role:"option",tabindex:0,clickable:!0,id:`list-item-${this.htmlid}-show-all`,onClickItem:()=>this.currResultsCount=0,color:"color-primary01"},e("div",{class:"item-show-all"},"Vedi tutti i risultati"))}render(){return e(a,{onFocus:()=>this.showResults=!0,onClick:t=>this.handleOutsideClick(t),class:{"has-submit":this.showSearchButton,"has-results":this.autocomplete}},e("div",{class:"input-container"},this.renderInput(),this.renderResults()),this.renderButton())}static get watchers(){return{resultsItems:["watchItems"],resultsCount:["watchResultsCount"],value:["watchValue"],searchString:["watchSearchString"]}}};V.style=':host{z-index:10;display:flex;column-gap:calc(var(--space-unit) * 2);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host,*{box-sizing:border-box}.input-container{position:relative;display:flex;width:100%;flex-direction:column}.results-wrapper{position:absolute;top:calc(100% - 1px);left:0;width:100%;padding:calc(var(--space-unit) / 4);border:var(--border-size-small) solid var(--color-surface03);border-top:none;background:var(--color-surface01)}.results{overflow:auto;max-height:var(--z-searchbar-results-height, 540px);padding:calc(var(--space-unit) / 2) calc(var(--space-unit) * 1.5);scrollbar-color:var(--color-primary01) transparent}.results::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.results::-webkit-scrollbar-track{background-color:transparent}.results::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.results .category-heading{display:block;font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:var(--font-size-3)}.results .category-heading>*{display:block}.results .category-heading>.category{color:var(--color-text05);font-style:italic}.results .category-heading>.subcategory{margin-top:var(--space-unit);color:var(--color-text01);text-transform:uppercase}.results z-list-element{display:block}.results .item{--z-icon-height:12px;--z-icon-width:12px;display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start;color:var(--color-text01);column-gap:calc(var(--space-unit) * 1.5);fill:var(--color-icon02);font-size:var(--font-size-2);line-height:var(--font-size-3)}.results .item.ellipsis>.item-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results .item>.item-label mark{background:var(--color-primary03)}.results .item.has-category{padding-left:calc(var(--space-unit) * 3)}.results .item.item-search{--z-icon-height:16px;--z-icon-width:16px}.results .item-show-all{text-align:center}.results .item-no-results{display:block;font-size:var(--font-size-2);font-style:italic;line-height:var(--font-size-5)}.results .item-no-results>ul{padding-left:calc(var(--space-unit) * 2);margin:var(--space-unit)}@media (min-width: 768px){.results .category-heading{font-size:var(--font-size-3);line-height:var(--font-size-6)}.results .item{font-size:var(--font-size-3);line-height:var(--font-size-6)}.results .item.item-search{--z-icon-height:18px;--z-icon-width:18px}.results .item.ellipsis>.item-label{height:24px}}@media (min-width: 1152px){.results .item{cursor:pointer}.results .item-no-results{cursor:default;font-size:var(--font-size-3);line-height:var(--font-size-6)}}:host([size="small"]) .results :is(.item,.category-heading),:host([size="x-small"]) .results :is(.item,.category-heading){font-size:var(--font-size-2)}:host([size="small"]) .results .item:not(.has-category),:host([size="x-small"]) .results .item:not(.has-category){--z-icon-height:16px;--z-icon-width:16px}:host([size="small"])::part(list-item-container){min-height:calc(var(--space-unit) * 4.5);padding:0}:host([size="x-small"])::part(list-item-container){min-height:calc(var(--space-unit) * 4);padding:0}';export{T as z_app_header,_ as z_breadcrumb,L as z_button,P as z_divider,A as z_icon,R as z_input,B as z_input_message,E as z_list,H as z_list_element,D as z_list_group,F as z_offcanvas,K as z_popover,V as z_searchbar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,g as o}from"./p-d17ebc2f.js";import{z as s,D as r}from"./p-
|
|
1
|
+
import{r as t,h as e,H as i,g as o}from"./p-d17ebc2f.js";import{z as s,D as r}from"./p-1cc1a418.js";const l=class{constructor(e){t(this,e),this.dividerPosition=s.BEFORE,this.uppercase=!0}componentWillRender(){this.hasSecondaryTitle=!!this.host.querySelector("[slot=secondary-title]")}render(){return e(i,null,e("slot",{name:"secondary-title"}),!this.hasSecondaryTitle&&this.dividerPosition===s.BEFORE&&e("z-divider",{size:r.LARGE,color:"z-section-title--divider-color"}),e("slot",{name:"primary-title"}),!this.hasSecondaryTitle&&this.dividerPosition===s.AFTER&&e("z-divider",{size:r.LARGE,color:"z-section-title--divider-color"}))}get host(){return o(this)}};l.style=':host{--z-section-title--divider-color:var(--red500);display:flex;width:fit-content;flex-direction:column;align-items:flex-start;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host,:host ::slotted(*){box-sizing:border-box}::slotted(*){margin:0}::slotted([slot="secondary-title"]){padding-bottom:calc(var(--space-unit) / 2);border-bottom:var(--border-size-large) solid var(--z-section-title--divider-color);font-size:var(--font-size-3);line-height:1.5rem;text-transform:uppercase}::slotted([slot="primary-title"]){font-size:var(--font-size-6);line-height:2rem}:host([uppercase]:not([uppercase="false"])) ::slotted([slot="primary-title"]){text-transform:uppercase}@media (min-width: 1152px){::slotted([slot="primary-title"]){font-size:var(--font-size-7);line-height:2.25rem}}';export{l as z_section_title}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as t}from"./p-d17ebc2f.js";import{P as e}from"./p-
|
|
1
|
+
import{r as o,h as t}from"./p-d17ebc2f.js";import{P as e}from"./p-1cc1a418.js";const r=class{constructor(t){o(this,t),this.position=e.AUTO,this.dark=!1,this.open=!1,this.closable=!0}onPopoverOpenChange(){this.open=this.popover.open}render(){return t("z-popover",{ref:o=>this.popover=o,bindTo:this.bindTo,open:this.open,position:this.position,closable:this.closable,center:!0,showArrow:!0},t("slot",null))}};r.style=":host{--z-tooltip-theme--surface:var(--color-surface01);--z-tooltip-theme--text:var(--color-text01);--z-tooltip-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base))}:host([dark]) z-popover{--z-popover-theme--surface:var(--color-surface05);--z-popover-theme--text:var(--color-text-inverse)}z-popover{--z-popover-padding:var(--space-unit);--z-popover-theme--surface:var(--z-tooltip-theme--surface);--z-popover-theme--text:var(--z-tooltip-theme--text);--z-popover-shadow-filter:var(--z-tooltip-shadow-filter)}";export{r as z_tooltip}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const s=767,a=1052,t=1365;export{t as d,s as m,a as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s,g as i}from"./p-d17ebc2f.js";import{e as l,g as r,m as c,i as a}from"./p-6b454593.js";import{r as n,b as o,d as h,a as p,e as d}from"./p-b1068026.js";import"./p-d69e14fb.js";const u=class{constructor(s){e(this,s),this.optionSelect=t(this,"optionSelect",7),this.resetSelect=t(this,"resetSelect",7),this.htmlid=`id-${n()}`,this.ariaLabel="",this.disabled=!1,this.readonly=!1,this.message=!0,this.autocomplete=!1,this.noresultslabel="Nessun risultato",this.isfixed=!1,this.size=l.BIG,this.isOpen=!1,this.selectedItem=null,this.itemsList=[],this.toggleSelectUl=this.toggleSelectUl.bind(this),this.selectItem=this.selectItem.bind(this),this.handleSelectFocus=this.handleSelectFocus.bind(this)}watchItems(){this.itemsList=this.getInitialItemsArray(),this.selectedItem=this.itemsList.find((e=>e.selected))}async getSelectedItem(){return this.selectedItem}async getValue(){return this.getSelectedValue()}async setValue(e){let t=[];"string"==typeof e?t.push(e):t=e,this.selectedItem=this.itemsList.find((e=>t.includes(e.id)))}emitOptionSelect(){this.optionSelect.emit({id:this.htmlid,selected:this.getSelectedValue()})}emitResetSelect(){this.resetSelect.emit({id:this.htmlid})}componentWillLoad(){this.watchItems()}componentWillRender(){this.filterItems(this.searchString)}getInitialItemsArray(){return"string"==typeof this.items?JSON.parse(this.items):this.items}mapSelectedItemToItemsArray(){return this.getInitialItemsArray().map((e=>{var t;return e.selected=e.id===(null===(t=this.selectedItem)||void 0===t?void 0:t.id),e}))}getSelectedValue(){var e;return null===(e=this.selectedItem)||void 0===e?void 0:e.id}filterItems(e){const t=this.mapSelectedItemToItemsArray();this.itemsList=(null==e?void 0:e.length)?t.filter((t=>t.name.toUpperCase().includes(e.toUpperCase()))).map((t=>{const s=t.name.toUpperCase().indexOf(e.toUpperCase()),i=s+e.length,l=t.name.substring(0,s)+`<strong>${t.name.substring(s,i)}</strong>`+t.name.substring(i,t.name.length);return t.name=l,t})):t}hasAutocomplete(){return!0===o(this.autocomplete)}handleInputChange(e){this.searchString=e.detail.value,this.isOpen||this.toggleSelectUl()}selectItem(e,t){e&&e.disabled||(this.itemsList=this.mapSelectedItemToItemsArray(),this.itemsList=this.itemsList.map((s=>(s.selected=!1,s.id===(null==e?void 0:e.id)&&(s.selected=t),s))),this.selectedItem=this.itemsList.find((e=>e.selected)),this.emitOptionSelect(),this.searchString&&(this.searchString=null))}arrowsSelectNav(e,t){const s=this.resetItem&&!!this.selectedItem;if(![r.ARROW_DOWN,r.ARROW_UP].includes(e.key))return;let i;e.preventDefault(),e.stopPropagation(),this.isOpen||this.toggleSelectUl(),this.resetItem&&(e.key===r.ARROW_DOWN?i=t+1===this.itemsList.length+1?+!s:t+1:e.key===r.ARROW_UP&&(i=t<=+!s?this.itemsList.length:t-1)),this.resetItem||(e.key===r.ARROW_DOWN?i=t+1===this.itemsList.length?0:t+1:e.key===r.ARROW_UP&&(i=t<=0?this.itemsList.length-1:t-1)),this.focusSelectItem(i)}focusSelectItem(e){const t=this.element.querySelector(`#${this.htmlid}_${e}`);t&&t.focus()}toggleSelectUl(e=!1){this.disabled||this.readonly||(this.isOpen?(document.removeEventListener("click",this.handleSelectFocus),document.removeEventListener("keyup",this.handleSelectFocus),e&&this.element.querySelector(`#${this.htmlid}_input`).focus()):(document.addEventListener("click",this.handleSelectFocus),document.addEventListener("keyup",this.handleSelectFocus)),this.isOpen=!this.isOpen)}handleInputClick(e){e.composedPath().find((e=>e.classList&&e.classList.contains("reset-icon")))?e.stopPropagation():this.toggleSelectUl()}handleSelectFocus(e){if(e instanceof KeyboardEvent&&e.key===r.ESC)return e.stopPropagation(),this.toggleSelectUl(!0);e instanceof KeyboardEvent&&e.key!==r.TAB&&e.key!==r.ENTER||h(d()).find((e=>"z-input"===e.nodeName.toLowerCase()&&e.id===`${this.htmlid}_input`))||this.toggleSelectUl(e instanceof MouseEvent)}scrollToLetter(e){const t=this.itemsList.find((t=>t.name.charAt(0)===e));t&&this.focusSelectItem(this.itemsList.indexOf(t))}renderInput(){return s("z-input",{class:{"active-select":this.isOpen,"cursor-select":!this.autocomplete},id:`${this.htmlid}_input`,htmlid:`${this.htmlid}_input`,placeholder:this.placeholder,value:!this.isOpen&&this.selectedItem?this.selectedItem.name.replace(/<[^>]+>/g,""):null,label:this.label,"aria-label":this.ariaLabel,icon:this.isOpen?"caret-up":"caret-down",hasclearicon:this.hasAutocomplete(),message:!1,disabled:this.disabled,readonly:this.readonly||!this.hasAutocomplete()&&this.isOpen,status:this.isOpen?void 0:this.status,autocomplete:"off",size:this.size,onClick:e=>{this.handleInputClick(e)},onKeyUp:e=>{13!==e.keyCode&&e.preventDefault(),p(e,this.toggleSelectUl)},onKeyDown:e=>this.arrowsSelectNav(e,this.selectedItem?this.itemsList.indexOf(this.selectedItem):this.resetItem?0:-1),onInputChange:e=>{this.handleInputChange(e)},onKeyPress:e=>{this.hasAutocomplete()||(e.preventDefault(),this.scrollToLetter(String.fromCharCode(e.keyCode)))}})}renderSelectUl(){var e;return s("div",{class:this.isOpen?"open":"closed",tabindex:"-1"},s("div",{class:{"ul-scroll-wrapper":!0,fixed:this.isfixed},tabindex:"-1"},s("z-list",{role:"listbox",tabindex:this.disabled||this.readonly||!this.isOpen?-1:0,id:this.htmlid,"aria-activedescendant":null===(e=this.selectedItem)||void 0===e?void 0:e.id,"aria-multiselectable":!1,size:this.listSizeType(),class:{disabled:this.disabled,readonly:this.readonly,filled:!!this.selectedItem,[`input-${this.status}`]:!this.isOpen&&!!this.status}},this.resetItem&&this.renderResetItem(),this.renderSelectUlItems())))}renderResetItem(){return s("z-list-element",{class:{hide:!this.selectedItem||!this.resetItem,"reset-item":!0,"reset-item-margin":!this.hasGroupItems},clickable:!0,disabled:!1,dividerType:c.ELEMENT,role:"option",tabindex:"0","aria-selected":"false",id:`${this.htmlid}_${this.resetItem?"0":"none"}`,size:this.listSizeType(),onClickItem:()=>{this.selectedItem=null,this.searchString=null,this.emitResetSelect()},onKeyDown:e=>this.arrowsSelectNav(e,0)},s("div",{class:"reset-item-content"},s("z-icon",{name:"multiply-circled"}),s("span",null,this.resetItem)))}renderItem(e,t,i){return s("z-list-element",{clickable:!e.disabled,disabled:e.disabled,dividerType:i?c.HEADER:c.ELEMENT,role:"option",tabindex:e.disabled||!this.isOpen?-1:0,"aria-selected":!!e.selected,id:`${this.htmlid}_${t}`,size:this.listSizeType(),onClickItem:()=>this.selectItem(e,!0),onKeyDown:e=>this.arrowsSelectNav(e,t)},s("span",{class:{selected:!!e.selected,"list-element-content":!0},innerHTML:e.name}))}listSizeType(){return this.size===l.SMALL||this.size===l.X_SMALL?a.SMALL:a.MEDIUM}renderSelectUlItems(){return this.itemsList.length?this.hasGroupItems?this.renderSelectGroupItems():this.itemsList.map(((e,t,s)=>this.renderItem(e,this.resetItem?t+1:t,s.length===t+1))):this.renderNoSearchResults()}renderSelectGroupItems(){const e=this.itemsList.reduce(((e,t,s,i)=>{var l;const{category:r}=t,c=this.renderItem(t,this.resetItem?s+1:s,i.length===s+1);return e[r]=null!==(l=e[r])&&void 0!==l?l:[],e[r].push(c),e}),{});return Object.entries(e).map((([e,t])=>s("z-list-group",{"divider-type":c.ELEMENT},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},e),t.map((e=>e)))))}renderNoSearchResults(){return s("z-list-element",{color:"blue500",class:"no-results",size:this.listSizeType()},s("z-icon",{name:"multiply-circle",fill:"blue500"}),this.noresultslabel)}renderMessage(){if(!1!==o(this.message))return s("z-input-message",{message:!0===o(this.message)?void 0:this.message,status:this.status,class:this.size})}render(){return s("div",{class:"select-wrapper"},this.renderInput(),this.renderSelectUl(),this.renderMessage())}get element(){return i(this)}static get watchers(){return{items:["watchItems"]}}};u.style='.sc-z-select-h{display:inline-block;width:inherit;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}[size="small"].sc-z-select-h,[size="x-small"].sc-z-select-h{font-size:var(--font-size-2)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;padding:calc(var(--space-unit) * 0.5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;background:var(--color-surface01);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.fixed.sc-z-select{position:static}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:calc(var(--space-unit) * 0.5);outline:none;scrollbar-color:var(--color-primary01) transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.sc-z-select{display:block;padding:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 1.5)}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.sc-z-select{padding:0 calc(var(--space-unit) * 1.5)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.selected.sc-z-select{font-weight:bold}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--gray800)}.reset-item.sc-z-select{color:var(--color-primary01);fill:var(--color-primary01)}.reset-item-content.sc-z-select{display:flex;align-items:center}.reset-item.reset-item-margin.sc-z-select .reset-item-content.sc-z-select{margin-left:calc(var(--space-unit))}.reset-item.sc-z-select .reset-item-content.sc-z-select>z-icon.sc-z-select{margin-right:var(--space-unit)}.reset-item.hide.sc-z-select{display:none}';export{u as z_select}
|
|
1
|
+
import{r as e,c as t,h as s,g as i}from"./p-d17ebc2f.js";import{e as l,g as r,m as c,i as a}from"./p-1cc1a418.js";import{r as n,b as o,d as h,h as p,e as d}from"./p-0397366d.js";import"./p-b497e33e.js";const u=class{constructor(s){e(this,s),this.optionSelect=t(this,"optionSelect",7),this.resetSelect=t(this,"resetSelect",7),this.htmlid=`id-${n()}`,this.ariaLabel="",this.disabled=!1,this.readonly=!1,this.message=!0,this.autocomplete=!1,this.noresultslabel="Nessun risultato",this.isfixed=!1,this.size=l.BIG,this.isOpen=!1,this.selectedItem=null,this.itemsList=[],this.toggleSelectUl=this.toggleSelectUl.bind(this),this.selectItem=this.selectItem.bind(this),this.handleSelectFocus=this.handleSelectFocus.bind(this)}watchItems(){this.itemsList=this.getInitialItemsArray(),this.selectedItem=this.itemsList.find((e=>e.selected))}async getSelectedItem(){return this.selectedItem}async getValue(){return this.getSelectedValue()}async setValue(e){let t=[];"string"==typeof e?t.push(e):t=e,this.selectedItem=this.itemsList.find((e=>t.includes(e.id)))}emitOptionSelect(){this.optionSelect.emit({id:this.htmlid,selected:this.getSelectedValue()})}emitResetSelect(){this.resetSelect.emit({id:this.htmlid})}componentWillLoad(){this.watchItems()}componentWillRender(){this.filterItems(this.searchString)}getInitialItemsArray(){return"string"==typeof this.items?JSON.parse(this.items):this.items}mapSelectedItemToItemsArray(){return this.getInitialItemsArray().map((e=>{var t;return e.selected=e.id===(null===(t=this.selectedItem)||void 0===t?void 0:t.id),e}))}getSelectedValue(){var e;return null===(e=this.selectedItem)||void 0===e?void 0:e.id}filterItems(e){const t=this.mapSelectedItemToItemsArray();this.itemsList=(null==e?void 0:e.length)?t.filter((t=>t.name.toUpperCase().includes(e.toUpperCase()))).map((t=>{const s=t.name.toUpperCase().indexOf(e.toUpperCase()),i=s+e.length,l=t.name.substring(0,s)+`<strong>${t.name.substring(s,i)}</strong>`+t.name.substring(i,t.name.length);return t.name=l,t})):t}hasAutocomplete(){return!0===o(this.autocomplete)}handleInputChange(e){this.searchString=e.detail.value,this.isOpen||this.toggleSelectUl()}selectItem(e,t){e&&e.disabled||(this.itemsList=this.mapSelectedItemToItemsArray(),this.itemsList=this.itemsList.map((s=>(s.selected=!1,s.id===(null==e?void 0:e.id)&&(s.selected=t),s))),this.selectedItem=this.itemsList.find((e=>e.selected)),this.emitOptionSelect(),this.searchString&&(this.searchString=null))}arrowsSelectNav(e,t){const s=this.resetItem&&!!this.selectedItem;if(![r.ARROW_DOWN,r.ARROW_UP].includes(e.key))return;let i;e.preventDefault(),e.stopPropagation(),this.isOpen||this.toggleSelectUl(),this.resetItem&&(e.key===r.ARROW_DOWN?i=t+1===this.itemsList.length+1?+!s:t+1:e.key===r.ARROW_UP&&(i=t<=+!s?this.itemsList.length:t-1)),this.resetItem||(e.key===r.ARROW_DOWN?i=t+1===this.itemsList.length?0:t+1:e.key===r.ARROW_UP&&(i=t<=0?this.itemsList.length-1:t-1)),this.focusSelectItem(i)}focusSelectItem(e){const t=this.element.querySelector(`#${this.htmlid}_${e}`);t&&t.focus()}toggleSelectUl(e=!1){this.disabled||this.readonly||(this.isOpen?(document.removeEventListener("click",this.handleSelectFocus),document.removeEventListener("keyup",this.handleSelectFocus),e&&this.element.querySelector(`#${this.htmlid}_input`).focus()):(document.addEventListener("click",this.handleSelectFocus),document.addEventListener("keyup",this.handleSelectFocus)),this.isOpen=!this.isOpen)}handleInputClick(e){e.composedPath().find((e=>e.classList&&e.classList.contains("reset-icon")))?e.stopPropagation():this.toggleSelectUl()}handleSelectFocus(e){if(e instanceof KeyboardEvent&&e.key===r.ESC)return e.stopPropagation(),this.toggleSelectUl(!0);e instanceof KeyboardEvent&&e.key!==r.TAB&&e.key!==r.ENTER||h(d()).find((e=>"z-input"===e.nodeName.toLowerCase()&&e.id===`${this.htmlid}_input`))||this.toggleSelectUl(e instanceof MouseEvent)}scrollToLetter(e){const t=this.itemsList.find((t=>t.name.charAt(0)===e));t&&this.focusSelectItem(this.itemsList.indexOf(t))}renderInput(){return s("z-input",{class:{"active-select":this.isOpen,"cursor-select":!this.autocomplete},id:`${this.htmlid}_input`,htmlid:`${this.htmlid}_input`,placeholder:this.placeholder,value:!this.isOpen&&this.selectedItem?this.selectedItem.name.replace(/<[^>]+>/g,""):null,label:this.label,"aria-label":this.ariaLabel,icon:this.isOpen?"caret-up":"caret-down",hasclearicon:this.hasAutocomplete(),message:!1,disabled:this.disabled,readonly:this.readonly||!this.hasAutocomplete()&&this.isOpen,status:this.isOpen?void 0:this.status,autocomplete:"off",size:this.size,onClick:e=>{this.handleInputClick(e)},onKeyUp:e=>{13!==e.keyCode&&e.preventDefault(),p(e,this.toggleSelectUl)},onKeyDown:e=>this.arrowsSelectNav(e,this.selectedItem?this.itemsList.indexOf(this.selectedItem):this.resetItem?0:-1),onInputChange:e=>{this.handleInputChange(e)},onKeyPress:e=>{this.hasAutocomplete()||(e.preventDefault(),this.scrollToLetter(String.fromCharCode(e.keyCode)))}})}renderSelectUl(){var e;return s("div",{class:this.isOpen?"open":"closed",tabindex:"-1"},s("div",{class:{"ul-scroll-wrapper":!0,fixed:this.isfixed},tabindex:"-1"},s("z-list",{role:"listbox",tabindex:this.disabled||this.readonly||!this.isOpen?-1:0,id:this.htmlid,"aria-activedescendant":null===(e=this.selectedItem)||void 0===e?void 0:e.id,"aria-multiselectable":!1,size:this.listSizeType(),class:{disabled:this.disabled,readonly:this.readonly,filled:!!this.selectedItem,[`input-${this.status}`]:!this.isOpen&&!!this.status}},this.resetItem&&this.renderResetItem(),this.renderSelectUlItems())))}renderResetItem(){return s("z-list-element",{class:{hide:!this.selectedItem||!this.resetItem,"reset-item":!0,"reset-item-margin":!this.hasGroupItems},clickable:!0,disabled:!1,dividerType:c.ELEMENT,role:"option",tabindex:"0","aria-selected":"false",id:`${this.htmlid}_${this.resetItem?"0":"none"}`,size:this.listSizeType(),onClickItem:()=>{this.selectedItem=null,this.searchString=null,this.emitResetSelect()},onKeyDown:e=>this.arrowsSelectNav(e,0)},s("div",{class:"reset-item-content"},s("z-icon",{name:"multiply-circled"}),s("span",null,this.resetItem)))}renderItem(e,t,i){return s("z-list-element",{clickable:!e.disabled,disabled:e.disabled,dividerType:i?c.HEADER:c.ELEMENT,role:"option",tabindex:e.disabled||!this.isOpen?-1:0,"aria-selected":!!e.selected,id:`${this.htmlid}_${t}`,size:this.listSizeType(),onClickItem:()=>this.selectItem(e,!0),onKeyDown:e=>this.arrowsSelectNav(e,t)},s("span",{class:{selected:!!e.selected,"list-element-content":!0},innerHTML:e.name}))}listSizeType(){return this.size===l.SMALL||this.size===l.X_SMALL?a.SMALL:a.MEDIUM}renderSelectUlItems(){return this.itemsList.length?this.hasGroupItems?this.renderSelectGroupItems():this.itemsList.map(((e,t,s)=>this.renderItem(e,this.resetItem?t+1:t,s.length===t+1))):this.renderNoSearchResults()}renderSelectGroupItems(){const e=this.itemsList.reduce(((e,t,s,i)=>{var l;const{category:r}=t,c=this.renderItem(t,this.resetItem?s+1:s,i.length===s+1);return e[r]=null!==(l=e[r])&&void 0!==l?l:[],e[r].push(c),e}),{});return Object.entries(e).map((([e,t])=>s("z-list-group",{"divider-type":c.ELEMENT},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},e),t.map((e=>e)))))}renderNoSearchResults(){return s("z-list-element",{color:"blue500",class:"no-results",size:this.listSizeType()},s("z-icon",{name:"multiply-circle",fill:"blue500"}),this.noresultslabel)}renderMessage(){if(!1!==o(this.message))return s("z-input-message",{message:!0===o(this.message)?void 0:this.message,status:this.status,class:this.size})}render(){return s("div",{class:"select-wrapper"},this.renderInput(),this.renderSelectUl(),this.renderMessage())}get element(){return i(this)}static get watchers(){return{items:["watchItems"]}}};u.style='.sc-z-select-h{display:inline-block;width:inherit;color:var(--color-text02);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}[size="small"].sc-z-select-h,[size="x-small"].sc-z-select-h{font-size:var(--font-size-2)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;padding:calc(var(--space-unit) * 0.5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;background:var(--color-surface01);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.fixed.sc-z-select{position:static}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:calc(var(--space-unit) * 0.5);outline:none;scrollbar-color:var(--color-primary01) transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.sc-z-select{display:block;padding:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 1.5)}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.sc-z-select{padding:0 calc(var(--space-unit) * 1.5)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-content.selected.sc-z-select{font-weight:bold}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--gray800)}.reset-item.sc-z-select{color:var(--color-primary01);fill:var(--color-primary01)}.reset-item-content.sc-z-select{display:flex;align-items:center}.reset-item.reset-item-margin.sc-z-select .reset-item-content.sc-z-select{margin-left:calc(var(--space-unit))}.reset-item.sc-z-select .reset-item-content.sc-z-select>z-icon.sc-z-select{margin-right:var(--space-unit)}.reset-item.hide.sc-z-select{display:none}';export{u as z_select}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as o}from"./p-d17ebc2f.js";import{P as n}from"./p-
|
|
1
|
+
import{r as e,c as t,h as i,H as o}from"./p-d17ebc2f.js";import{P as n}from"./p-1cc1a418.js";const l=class{constructor(i){e(this,i),this.clickContextualMenu=t(this,"clickContextualMenu",7),this.color="color-primary01",this.popoverPosition=n.BOTTOM_RIGHT}componentWillRender(){this.elements&&(this.jsonElements=JSON.parse(this.elements.replace(/"/g,'"')))}componentDidLoad(){this.popover.bindTo=this.triggerButton}showIcon(){return!this.jsonElements.some((e=>!e.icon))}togglePopover(){this.popover.open||(this.popover.open=!0)}render(){var e,t;return i(o,null,i("button",{ref:e=>this.triggerButton=e,"aria-label":(null===(e=this.popover)||void 0===e?void 0:e.open)?"chiudi menu contestuale":"apri menu contestuale",onClick:()=>this.togglePopover()},i("z-icon",{name:"contextual-menu",fill:this.color})),i("z-popover",{ref:e=>this.popover=e,position:this.popoverPosition},i("div",{class:"popover-content-container"},i("z-list",null,i("z-list-group",{"divider-type":"element"},null===(t=this.jsonElements)||void 0===t?void 0:t.map(((e,t)=>i("z-list-element",{clickable:!e.disabled,class:"my-z-list-element","align-button":"left","expandable-style":"accordion",color:e.disabled?"color-disabled03":this.color,isContextualMenu:!0,listElementId:t,onClickItem:e=>this.clickContextualMenu.emit(e.detail)},i("div",{class:e.disabled?"disabled-element-container":"element-container"},this.showIcon()&&i("div",{class:"element-icon"},i("z-icon",{name:e.icon,width:16,height:16})),i("div",{class:"element-text"},i("span",null,e.text)))))))))))}};l.style=":host{position:relative;display:flex;align-items:center;justify-content:center;font-family:var(--font-family-sans);font-weight:var(--font-rg)}button{width:100%;height:100%;padding:0;border:none;background:transparent;cursor:pointer}z-popover{overflow:hidden}.popover-content-container{position:relative;min-width:112px;max-width:280px;background-color:var(--color-surface02);box-shadow:var(--shadow-2);white-space:nowrap}.element-container:hover{color:var(--color-hover-primary);fill:var(--color-hover-primary)}.element-text{overflow:hidden;font-size:14px;text-overflow:ellipsis}.element-container,.disabled-element-container{display:flex;min-height:calc(var(--space-unit) * 4);box-sizing:border-box;align-items:center;padding:calc(var(--space-unit) / 2) var(--space-unit);fill:var(--color-disabled03);gap:var(--space-unit)}.element-container{fill:var(--color-primary01)}.element-icon{display:flex}";export{l as z_contextual_menu}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as i,g as e}from"./p-d17ebc2f.js";import{g as n}from"./p-6b454593.js";const a=class{constructor(i){t(this,i),this.fileDropped=o(this,"fileDropped",7)}fileDroppedHandler(t){this.fileDropped.emit(t)}renderOnDragOverMessage(){return i("div",{class:"dragover-container"},i("div",{class:"dragover-message"},i("span",{class:"body-2-sb"},"Rilascia i file in questa area per allegarli.")))}render(){return i("div",{tabIndex:0,ref:t=>this.dragDropContainer=t,class:"dragdrop",onDragOver:t=>{t.preventDefault(),this.dragDropContainer.classList.add("dragover")},onDragLeave:()=>{this.dragDropContainer.classList.remove("dragover")},onDrop:t=>{t.preventDefault(),t.dataTransfer.files.length&&(this.dragDropContainer.classList.remove("dragover"),this.fileDroppedHandler(t.dataTransfer.files))}},this.renderOnDragOverMessage(),i("slot",null))}};a.style=":host{margin-top:calc(var(--space-unit) * 3);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.dragdrop{position:relative;display:flex;height:228px;flex-direction:column;border-color:var(--color-surface04);background-color:var(--color-surface02);background-image:url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='2' ry='2' stroke='%23CACCCEFF' stroke-width='2' stroke-dasharray='15%2c 10%2c 14%2c 11' stroke-dashoffset='3' stroke-linecap='square'/%3e%3c/svg%3e\");border-radius:2px;color:var(--color-text01)}:host>.dragdrop.dragover *{pointer-events:none}:host>.dragdrop .dragover-container{position:absolute;z-index:10;top:0;left:0;display:none;width:100%;height:100%;background-color:var(--color-primary03);box-shadow:var(--shadow-focus-primary)}:host>.dragdrop .dragover-container .dragover-message{padding:10px 28px;background-color:var(--color-link-primary);color:var(--color-text04)}:host>.dragdrop.dragover .dragover-container{display:flex;align-items:center;justify-content:center}";var r=window.CustomEvent;function s(t,o){var i="on"+o.type.toLowerCase();return"function"==typeof t[i]&&t[i](o),t.dispatchEvent(o)}function d(t){for(;t;){if("dialog"===t.localName)return t;t=t.parentElement?t.parentElement:t.parentNode?t.parentNode.host:null}return null}function l(t){for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;t&&t.blur&&t!==document.body&&t.blur()}function c(t,o){for(var i=0;i<t.length;++i)if(t[i]===o)return!0;return!1}function h(t){return!(!t||!t.hasAttribute("method"))&&"dialog"===t.getAttribute("method").toLowerCase()}function u(t){var o=["button","input","keygen","select","textarea"].map((function(t){return t+":not([disabled])"}));o.push('[tabindex]:not([disabled]):not([tabindex=""])');var i=t.querySelector(o.join(", "));if(!i&&"attachShadow"in Element.prototype)for(var e=t.querySelectorAll("*"),n=0;n<e.length&&!(e[n].tagName&&e[n].shadowRoot&&(i=u(e[n].shadowRoot)));n++);return i}function m(t){return t.isConnected||document.body.contains(t)}function f(t){if(t.submitter)return t.submitter;var o=t.target;if(!(o instanceof HTMLFormElement))return null;var i=p.formSubmitter;if(!i){var e=t.target;i=("getRootNode"in e&&e.getRootNode()||document).activeElement}return i&&i.form===o?i:null}function v(t){if(!t.defaultPrevented){var o=t.target,i=p.imagemapUseValue,e=f(t);null===i&&e&&(i=e.value);var n=d(o);n&&"dialog"===(e&&e.getAttribute("formmethod")||o.getAttribute("method"))&&(t.preventDefault(),null!=i?n.close(i):n.close())}}function g(t){if(this.dialog_=t,this.replacedStyleTop_=!1,this.openAsModal_=!1,t.hasAttribute("role")||t.setAttribute("role","dialog"),t.show=this.show.bind(this),t.showModal=this.showModal.bind(this),t.close=this.close.bind(this),t.addEventListener("submit",v,!1),"returnValue"in t||(t.returnValue=""),"MutationObserver"in window)new MutationObserver(this.maybeHideModal.bind(this)).observe(t,{attributes:!0,attributeFilter:["open"]});else{var o,i=!1,e=function(){i?this.downgradeModal():this.maybeHideModal(),i=!1}.bind(this),n=function(n){if(n.target===t){var a="DOMNodeRemoved";i|=n.type.substr(0,a.length)===a,window.clearTimeout(o),o=window.setTimeout(e,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach((function(o){t.addEventListener(o,n)}))}Object.defineProperty(t,"open",{set:this.setOpen.bind(this),get:t.hasAttribute.bind(t,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}r&&"object"!=typeof r||((r=function(t,o){o=o||{};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,!!o.bubbles,!!o.cancelable,o.detail||null),i}).prototype=window.Event.prototype),g.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&m(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),p.dm.removeDialog(this))},setOpen:function(t){t?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(t){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var o=document.createElement("div");this.dialog_.insertBefore(o,this.dialog_.firstChild),o.tabIndex=-1,o.focus(),this.dialog_.removeChild(o)}var i=document.createEvent("MouseEvents");i.initMouseEvent(t.type,t.bubbles,t.cancelable,window,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget),this.dialog_.dispatchEvent(i),t.stopPropagation()},focus_:function(){var t=this.dialog_.querySelector("[autofocus]:not([disabled])");!t&&this.dialog_.tabIndex>=0&&(t=this.dialog_),t||(t=u(this.dialog_)),l(document.activeElement),t&&t.focus()},updateZIndex:function(t,o){if(t<o)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=t,this.backdrop_.style.zIndex=o},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!m(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!p.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");(function(t){for(;t&&t!==document.body;){var o=window.getComputedStyle(t),i=function(t,i){return!(void 0===o[t]||o[t]===i)};if(o.opacity<1||i("zIndex","auto")||i("transform","none")||i("mixBlendMode","normal")||i("filter","none")||i("perspective","none")||"isolate"===o.isolation||"fixed"===o.position||"touch"===o.webkitOverflowScrolling)return!0;t=t.parentElement}return!1})(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,p.needsCentering(this.dialog_)?(p.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(t){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),void 0!==t&&(this.dialog_.returnValue=t);var o=new r("close",{bubbles:!1,cancelable:!1});s(this.dialog_,o)}};var p={reposition:function(t){var o=document.body.scrollTop||document.documentElement.scrollTop,i=o+(window.innerHeight-t.offsetHeight)/2;t.style.top=Math.max(o,i)+"px"},isInlinePositionSetByStylesheet:function(t){for(var o=0;o<document.styleSheets.length;++o){var i=document.styleSheets[o],e=null;try{e=i.cssRules}catch(t){}if(e)for(var n=0;n<e.length;++n){var a=e[n],r=null;try{r=document.querySelectorAll(a.selectorText)}catch(t){}if(r&&c(r,t)){var s=a.style.getPropertyValue("top"),d=a.style.getPropertyValue("bottom");if(s&&"auto"!==s||d&&"auto"!==d)return!0}}}return!1},needsCentering:function(t){return!("absolute"!==window.getComputedStyle(t).position||"auto"!==t.style.top&&""!==t.style.top||"auto"!==t.style.bottom&&""!==t.style.bottom||p.isInlinePositionSetByStylesheet(t))},forceRegisterDialog:function(t){if((window.HTMLDialogElement||t.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",t),"dialog"!==t.localName)throw new Error("Failed to register dialog: The element is not a dialog.");new g(t)},registerDialog:function(t){t.showModal||p.forceRegisterDialog(t)},DialogManager:function(){this.pendingDialogStack=[];var t=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",function(o){this.forwardTab_=void 0,o.stopPropagation(),t([])}.bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver((function(o){var i=[];o.forEach((function(t){for(var o,e=0;o=t.removedNodes[e];++e)o instanceof Element&&("dialog"===o.localName&&i.push(o),i=i.concat(o.querySelectorAll("dialog")))})),i.length&&t(i)})))}};if(p.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},p.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},p.DialogManager.prototype.updateStacking=function(){for(var t,o=this.zIndexHigh_,i=0;t=this.pendingDialogStack[i];++i)t.updateZIndex(--o,--o),0===i&&(this.overlay.style.zIndex=--o);var e=this.pendingDialogStack[0];e?(e.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},p.DialogManager.prototype.containedByTopDialog_=function(t){for(;t=d(t);){for(var o,i=0;o=this.pendingDialogStack[i];++i)if(o.dialog===t)return 0===i;t=t.parentElement}return!1},p.DialogManager.prototype.handleFocus_=function(t){var o=t.composedPath?t.composedPath()[0]:t.target;if(!this.containedByTopDialog_(o)&&document.activeElement!==document.documentElement&&(t.preventDefault(),t.stopPropagation(),l(o),void 0!==this.forwardTab_)){var i=this.pendingDialogStack[0];return i.dialog.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?i.focus_():o!==document.documentElement&&document.documentElement.focus()),!1}},p.DialogManager.prototype.handleKey_=function(t){if(this.forwardTab_=void 0,27===t.keyCode){t.preventDefault(),t.stopPropagation();var o=new r("cancel",{bubbles:!1,cancelable:!0}),i=this.pendingDialogStack[0];i&&s(i.dialog,o)&&i.dialog.close()}else 9===t.keyCode&&(this.forwardTab_=!t.shiftKey)},p.DialogManager.prototype.checkDOM_=function(t){this.pendingDialogStack.slice().forEach((function(o){-1!==t.indexOf(o.dialog)?o.downgradeModal():o.maybeHideModal()}))},p.DialogManager.prototype.pushDialog=function(t){return!(this.pendingDialogStack.length>=(this.zIndexHigh_-this.zIndexLow_)/2-1||(1===this.pendingDialogStack.unshift(t)&&this.blockDocument(),this.updateStacking(),0))},p.DialogManager.prototype.removeDialog=function(t){var o=this.pendingDialogStack.indexOf(t);-1!==o&&(this.pendingDialogStack.splice(o,1),0===this.pendingDialogStack.length&&this.unblockDocument(),this.updateStacking())},p.dm=new p.DialogManager,p.formSubmitter=null,p.imagemapUseValue=null,void 0===window.HTMLDialogElement){var b=document.createElement("form");if(b.setAttribute("method","dialog"),"dialog"!==b.method){var w=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(w){var y=w.get;w.get=function(){return h(this)?"dialog":y.call(this)};var x=w.set;w.set=function(t){return"string"==typeof t&&"dialog"===t.toLowerCase()?this.setAttribute("method",t):x.call(this,t)},Object.defineProperty(HTMLFormElement.prototype,"method",w)}}document.addEventListener("click",(function(t){if(p.formSubmitter=null,p.imagemapUseValue=null,!t.defaultPrevented){var o=t.target;if("composedPath"in t&&(o=t.composedPath().shift()||o),o&&h(o.form)){if(!("submit"===o.type&&["button","input"].indexOf(o.localName)>-1)){if("input"!==o.localName||"image"!==o.type)return;p.imagemapUseValue=t.offsetX+","+t.offsetY}d(o)&&(p.formSubmitter=o)}}}),!1),document.addEventListener("submit",(function(t){var o=t.target;if(!d(o)){var i=f(t);"dialog"===(i&&i.getAttribute("formmethod")||o.getAttribute("method"))&&t.preventDefault()}}));var k=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){if(!h(this))return k.call(this);var t=d(this);t&&t.close()}}const M=':is(button, input, select, textarea, [contenteditable=""], [contenteditable="true"], a[href], [tabindex], summary):not([disabled], [disabled=""], [tabindex="-1"], [aria-hidden="true"], [hidden])',z=class{constructor(i){t(this,i),this.modalClose=o(this,"modalClose",7),this.modalHeaderActive=o(this,"modalHeaderActive",7),this.modalBackgroundClick=o(this,"modalBackgroundClick",7),this.closeButtonLabel="chiudi modale",this.alertdialog=!1,this.closable=!0}emitModalClose(){this.closable&&this.modalClose.emit({modalid:this.modalid})}emitModalHeaderActive(){this.modalHeaderActive.emit({modalid:this.modalid})}emitBackgroundClick(){this.closable&&this.modalBackgroundClick.emit({modalid:this.modalid})}componentDidLoad(){"function"!=typeof HTMLDialogElement?(p.registerDialog(this.dialog),this.dialog.setAttribute("open","true")):this.open()}async open(){var t;null===(t=this.dialog)||void 0===t||t.showModal()}async close(){var t;this.closable&&(null===(t=this.dialog)||void 0===t||t.close())}get focusableElements(){return[...Array.from(this.host.shadowRoot.querySelectorAll(M)),...Array.from(this.host.querySelectorAll(M))].filter((t=>"none"!==getComputedStyle(t).display))}handleKeyDown(t){if(t.code!==n.TAB)return;const o=this.focusableElements,i=this.host.shadowRoot.activeElement,e=this.host.ownerDocument.activeElement,a=o[0],r=o[o.length-1];!t.shiftKey||i!=a&&e!=a?t.shiftKey||i!=r&&e!=r||(t.preventDefault(),a.focus()):(t.preventDefault(),r.focus())}closeButtonSlot(){if(this.closable)return i("slot",{name:"modalCloseButton"},i("button",{"aria-label":this.closeButtonLabel,onClick:()=>this.close()},i("z-icon",{name:"multiply-circle-filled"})))}handleEscape(t){this.closable||t.preventDefault()}render(){return i("dialog",{"aria-labelledby":"modal-title","aria-describedby":"modal-content",role:this.alertdialog?"alertdialog":void 0,ref:t=>this.dialog=t,onClose:()=>this.emitModalClose(),onCancel:t=>this.handleEscape(t)},i("div",{class:"modal-container",id:this.modalid},i("header",{onClick:this.emitModalHeaderActive.bind(this)},i("div",null,this.modaltitle&&i("h1",{id:"modal-title"},this.modaltitle),this.modalsubtitle&&i("h2",{id:"modal-subtitle"},this.modalsubtitle)),this.closeButtonSlot()),i("div",{class:"modal-content",id:"modal-content"},i("slot",{name:"modalContent"}))),i("div",{class:"modal-background","data-action":"modalBackground","data-modal":this.modalid,onClick:()=>{this.emitBackgroundClick(),this.close()}}))}get host(){return e(this)}};z.style=":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>dialog{padding:0;border:none;margin:0}:host>dialog:modal{width:100%;max-width:100%;max-height:100%}:host>dialog::backdrop{display:none}:host>dialog+.backdrop{display:none}:host>dialog:not([open]){display:none}:host>dialog[open]{display:block}.modal-container{z-index:1010;display:flex;overflow:-moz-scrollbars-none;overflow:hidden;width:100%;height:100vh;flex-direction:column}.modal-container>header{display:flex;flex-flow:row nowrap;align-items:flex-start;justify-content:flex-start;padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 2);background:var(--color-surface02)}.modal-container>header button{padding:0;border:none;margin:0;margin-left:auto;background:transparent;cursor:pointer}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 2.5);--z-icon-height:calc(var(--space-unit) * 2.5);display:flex;fill:var(--color-icon01)}.modal-container>header>div{display:flex;width:100%;flex-direction:column;margin-right:calc(var(--space-unit) * 2)}.modal-container>header h1,.modal-container>header h2{padding:0;margin:0;color:var(--color-text01);font-weight:var(--font-rg)}.modal-container>header h1{font-size:var(--font-size-5);letter-spacing:0;line-height:1.4}.modal-container>header h2{font-size:var(--font-size-3);letter-spacing:0;line-height:1.5}.modal-container>header>div *:empty{display:none}.modal-container>header h1+h2{margin-top:calc(var(--space-unit) * 0.5)}.modal-container>.modal-content{overflow:auto;flex:1 auto;background:var(--color-surface01);overflow-x:hidden}.modal-container .modal-content::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.modal-container .modal-content::-webkit-scrollbar-track{background-color:transparent}.modal-container .modal-content::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.modal-container .modal-content::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.modal-container .modal-content{scrollbar-color:var(--color-primary01) transparent}@media only screen and (min-width: 768px){.modal-background{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--gray900);opacity:0.7}.modal-container{position:fixed;top:calc(var(--space-unit) * 6);left:50%;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));border-radius:var(--border-radius);transform:translateX(-50%)}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 3);--z-icon-height:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 768px) and (max-width: 1151px){.modal-container>header{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){.modal-container>header{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 4)}.modal-container>header h1{font-size:var(--font-size-6);letter-spacing:0;line-height:1.33}.modal-container>header h2{font-size:var(--font-size-4);letter-spacing:0;line-height:1.5}.modal-container>header h1+h2{margin-top:0}}";export{a as z_dragdrop_area,z as z_modal}
|
|
1
|
+
import{r as t,c as o,h as i,g as e}from"./p-d17ebc2f.js";import{g as n}from"./p-1cc1a418.js";const a=class{constructor(i){t(this,i),this.fileDropped=o(this,"fileDropped",7)}fileDroppedHandler(t){this.fileDropped.emit(t)}renderOnDragOverMessage(){return i("div",{class:"dragover-container"},i("div",{class:"dragover-message"},i("span",{class:"body-2-sb"},"Rilascia i file in questa area per allegarli.")))}render(){return i("div",{tabIndex:0,ref:t=>this.dragDropContainer=t,class:"dragdrop",onDragOver:t=>{t.preventDefault(),this.dragDropContainer.classList.add("dragover")},onDragLeave:()=>{this.dragDropContainer.classList.remove("dragover")},onDrop:t=>{t.preventDefault(),t.dataTransfer.files.length&&(this.dragDropContainer.classList.remove("dragover"),this.fileDroppedHandler(t.dataTransfer.files))}},this.renderOnDragOverMessage(),i("slot",null))}};a.style=":host{margin-top:calc(var(--space-unit) * 3);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.dragdrop{position:relative;display:flex;height:228px;flex-direction:column;border-color:var(--color-surface04);background-color:var(--color-surface02);background-image:url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='2' ry='2' stroke='%23CACCCEFF' stroke-width='2' stroke-dasharray='15%2c 10%2c 14%2c 11' stroke-dashoffset='3' stroke-linecap='square'/%3e%3c/svg%3e\");border-radius:2px;color:var(--color-text01)}:host>.dragdrop.dragover *{pointer-events:none}:host>.dragdrop .dragover-container{position:absolute;z-index:10;top:0;left:0;display:none;width:100%;height:100%;background-color:var(--color-primary03);box-shadow:var(--shadow-focus-primary)}:host>.dragdrop .dragover-container .dragover-message{padding:10px 28px;background-color:var(--color-link-primary);color:var(--color-text04)}:host>.dragdrop.dragover .dragover-container{display:flex;align-items:center;justify-content:center}";var r=window.CustomEvent;function s(t,o){var i="on"+o.type.toLowerCase();return"function"==typeof t[i]&&t[i](o),t.dispatchEvent(o)}function d(t){for(;t;){if("dialog"===t.localName)return t;t=t.parentElement?t.parentElement:t.parentNode?t.parentNode.host:null}return null}function l(t){for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;t&&t.blur&&t!==document.body&&t.blur()}function c(t,o){for(var i=0;i<t.length;++i)if(t[i]===o)return!0;return!1}function h(t){return!(!t||!t.hasAttribute("method"))&&"dialog"===t.getAttribute("method").toLowerCase()}function u(t){var o=["button","input","keygen","select","textarea"].map((function(t){return t+":not([disabled])"}));o.push('[tabindex]:not([disabled]):not([tabindex=""])');var i=t.querySelector(o.join(", "));if(!i&&"attachShadow"in Element.prototype)for(var e=t.querySelectorAll("*"),n=0;n<e.length&&!(e[n].tagName&&e[n].shadowRoot&&(i=u(e[n].shadowRoot)));n++);return i}function m(t){return t.isConnected||document.body.contains(t)}function f(t){if(t.submitter)return t.submitter;var o=t.target;if(!(o instanceof HTMLFormElement))return null;var i=p.formSubmitter;if(!i){var e=t.target;i=("getRootNode"in e&&e.getRootNode()||document).activeElement}return i&&i.form===o?i:null}function v(t){if(!t.defaultPrevented){var o=t.target,i=p.imagemapUseValue,e=f(t);null===i&&e&&(i=e.value);var n=d(o);n&&"dialog"===(e&&e.getAttribute("formmethod")||o.getAttribute("method"))&&(t.preventDefault(),null!=i?n.close(i):n.close())}}function g(t){if(this.dialog_=t,this.replacedStyleTop_=!1,this.openAsModal_=!1,t.hasAttribute("role")||t.setAttribute("role","dialog"),t.show=this.show.bind(this),t.showModal=this.showModal.bind(this),t.close=this.close.bind(this),t.addEventListener("submit",v,!1),"returnValue"in t||(t.returnValue=""),"MutationObserver"in window)new MutationObserver(this.maybeHideModal.bind(this)).observe(t,{attributes:!0,attributeFilter:["open"]});else{var o,i=!1,e=function(){i?this.downgradeModal():this.maybeHideModal(),i=!1}.bind(this),n=function(n){if(n.target===t){var a="DOMNodeRemoved";i|=n.type.substr(0,a.length)===a,window.clearTimeout(o),o=window.setTimeout(e,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach((function(o){t.addEventListener(o,n)}))}Object.defineProperty(t,"open",{set:this.setOpen.bind(this),get:t.hasAttribute.bind(t,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}r&&"object"!=typeof r||((r=function(t,o){o=o||{};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,!!o.bubbles,!!o.cancelable,o.detail||null),i}).prototype=window.Event.prototype),g.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&m(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),p.dm.removeDialog(this))},setOpen:function(t){t?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(t){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var o=document.createElement("div");this.dialog_.insertBefore(o,this.dialog_.firstChild),o.tabIndex=-1,o.focus(),this.dialog_.removeChild(o)}var i=document.createEvent("MouseEvents");i.initMouseEvent(t.type,t.bubbles,t.cancelable,window,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget),this.dialog_.dispatchEvent(i),t.stopPropagation()},focus_:function(){var t=this.dialog_.querySelector("[autofocus]:not([disabled])");!t&&this.dialog_.tabIndex>=0&&(t=this.dialog_),t||(t=u(this.dialog_)),l(document.activeElement),t&&t.focus()},updateZIndex:function(t,o){if(t<o)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=t,this.backdrop_.style.zIndex=o},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!m(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!p.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");(function(t){for(;t&&t!==document.body;){var o=window.getComputedStyle(t),i=function(t,i){return!(void 0===o[t]||o[t]===i)};if(o.opacity<1||i("zIndex","auto")||i("transform","none")||i("mixBlendMode","normal")||i("filter","none")||i("perspective","none")||"isolate"===o.isolation||"fixed"===o.position||"touch"===o.webkitOverflowScrolling)return!0;t=t.parentElement}return!1})(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,p.needsCentering(this.dialog_)?(p.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(t){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),void 0!==t&&(this.dialog_.returnValue=t);var o=new r("close",{bubbles:!1,cancelable:!1});s(this.dialog_,o)}};var p={reposition:function(t){var o=document.body.scrollTop||document.documentElement.scrollTop,i=o+(window.innerHeight-t.offsetHeight)/2;t.style.top=Math.max(o,i)+"px"},isInlinePositionSetByStylesheet:function(t){for(var o=0;o<document.styleSheets.length;++o){var i=document.styleSheets[o],e=null;try{e=i.cssRules}catch(t){}if(e)for(var n=0;n<e.length;++n){var a=e[n],r=null;try{r=document.querySelectorAll(a.selectorText)}catch(t){}if(r&&c(r,t)){var s=a.style.getPropertyValue("top"),d=a.style.getPropertyValue("bottom");if(s&&"auto"!==s||d&&"auto"!==d)return!0}}}return!1},needsCentering:function(t){return!("absolute"!==window.getComputedStyle(t).position||"auto"!==t.style.top&&""!==t.style.top||"auto"!==t.style.bottom&&""!==t.style.bottom||p.isInlinePositionSetByStylesheet(t))},forceRegisterDialog:function(t){if((window.HTMLDialogElement||t.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",t),"dialog"!==t.localName)throw new Error("Failed to register dialog: The element is not a dialog.");new g(t)},registerDialog:function(t){t.showModal||p.forceRegisterDialog(t)},DialogManager:function(){this.pendingDialogStack=[];var t=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",function(o){this.forwardTab_=void 0,o.stopPropagation(),t([])}.bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver((function(o){var i=[];o.forEach((function(t){for(var o,e=0;o=t.removedNodes[e];++e)o instanceof Element&&("dialog"===o.localName&&i.push(o),i=i.concat(o.querySelectorAll("dialog")))})),i.length&&t(i)})))}};if(p.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},p.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},p.DialogManager.prototype.updateStacking=function(){for(var t,o=this.zIndexHigh_,i=0;t=this.pendingDialogStack[i];++i)t.updateZIndex(--o,--o),0===i&&(this.overlay.style.zIndex=--o);var e=this.pendingDialogStack[0];e?(e.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},p.DialogManager.prototype.containedByTopDialog_=function(t){for(;t=d(t);){for(var o,i=0;o=this.pendingDialogStack[i];++i)if(o.dialog===t)return 0===i;t=t.parentElement}return!1},p.DialogManager.prototype.handleFocus_=function(t){var o=t.composedPath?t.composedPath()[0]:t.target;if(!this.containedByTopDialog_(o)&&document.activeElement!==document.documentElement&&(t.preventDefault(),t.stopPropagation(),l(o),void 0!==this.forwardTab_)){var i=this.pendingDialogStack[0];return i.dialog.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?i.focus_():o!==document.documentElement&&document.documentElement.focus()),!1}},p.DialogManager.prototype.handleKey_=function(t){if(this.forwardTab_=void 0,27===t.keyCode){t.preventDefault(),t.stopPropagation();var o=new r("cancel",{bubbles:!1,cancelable:!0}),i=this.pendingDialogStack[0];i&&s(i.dialog,o)&&i.dialog.close()}else 9===t.keyCode&&(this.forwardTab_=!t.shiftKey)},p.DialogManager.prototype.checkDOM_=function(t){this.pendingDialogStack.slice().forEach((function(o){-1!==t.indexOf(o.dialog)?o.downgradeModal():o.maybeHideModal()}))},p.DialogManager.prototype.pushDialog=function(t){return!(this.pendingDialogStack.length>=(this.zIndexHigh_-this.zIndexLow_)/2-1||(1===this.pendingDialogStack.unshift(t)&&this.blockDocument(),this.updateStacking(),0))},p.DialogManager.prototype.removeDialog=function(t){var o=this.pendingDialogStack.indexOf(t);-1!==o&&(this.pendingDialogStack.splice(o,1),0===this.pendingDialogStack.length&&this.unblockDocument(),this.updateStacking())},p.dm=new p.DialogManager,p.formSubmitter=null,p.imagemapUseValue=null,void 0===window.HTMLDialogElement){var b=document.createElement("form");if(b.setAttribute("method","dialog"),"dialog"!==b.method){var w=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(w){var y=w.get;w.get=function(){return h(this)?"dialog":y.call(this)};var x=w.set;w.set=function(t){return"string"==typeof t&&"dialog"===t.toLowerCase()?this.setAttribute("method",t):x.call(this,t)},Object.defineProperty(HTMLFormElement.prototype,"method",w)}}document.addEventListener("click",(function(t){if(p.formSubmitter=null,p.imagemapUseValue=null,!t.defaultPrevented){var o=t.target;if("composedPath"in t&&(o=t.composedPath().shift()||o),o&&h(o.form)){if(!("submit"===o.type&&["button","input"].indexOf(o.localName)>-1)){if("input"!==o.localName||"image"!==o.type)return;p.imagemapUseValue=t.offsetX+","+t.offsetY}d(o)&&(p.formSubmitter=o)}}}),!1),document.addEventListener("submit",(function(t){var o=t.target;if(!d(o)){var i=f(t);"dialog"===(i&&i.getAttribute("formmethod")||o.getAttribute("method"))&&t.preventDefault()}}));var k=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){if(!h(this))return k.call(this);var t=d(this);t&&t.close()}}const M=':is(button, input, select, textarea, [contenteditable=""], [contenteditable="true"], a[href], [tabindex], summary):not([disabled], [disabled=""], [tabindex="-1"], [aria-hidden="true"], [hidden])',z=class{constructor(i){t(this,i),this.modalClose=o(this,"modalClose",7),this.modalHeaderActive=o(this,"modalHeaderActive",7),this.modalBackgroundClick=o(this,"modalBackgroundClick",7),this.closeButtonLabel="chiudi modale",this.alertdialog=!1,this.closable=!0}emitModalClose(){this.closable&&this.modalClose.emit({modalid:this.modalid})}emitModalHeaderActive(){this.modalHeaderActive.emit({modalid:this.modalid})}emitBackgroundClick(){this.closable&&this.modalBackgroundClick.emit({modalid:this.modalid})}componentDidLoad(){"function"!=typeof HTMLDialogElement?(p.registerDialog(this.dialog),this.dialog.setAttribute("open","true")):this.open()}async open(){var t;null===(t=this.dialog)||void 0===t||t.showModal()}async close(){var t;this.closable&&(null===(t=this.dialog)||void 0===t||t.close())}get focusableElements(){return[...Array.from(this.host.shadowRoot.querySelectorAll(M)),...Array.from(this.host.querySelectorAll(M))].filter((t=>"none"!==getComputedStyle(t).display))}handleKeyDown(t){if(t.code!==n.TAB)return;const o=this.focusableElements,i=this.host.shadowRoot.activeElement,e=this.host.ownerDocument.activeElement,a=o[0],r=o[o.length-1];!t.shiftKey||i!=a&&e!=a?t.shiftKey||i!=r&&e!=r||(t.preventDefault(),a.focus()):(t.preventDefault(),r.focus())}closeButtonSlot(){if(this.closable)return i("slot",{name:"modalCloseButton"},i("button",{"aria-label":this.closeButtonLabel,onClick:()=>this.close()},i("z-icon",{name:"multiply-circle-filled"})))}handleEscape(t){this.closable||t.preventDefault()}render(){return i("dialog",{"aria-labelledby":"modal-title","aria-describedby":"modal-content",role:this.alertdialog?"alertdialog":void 0,ref:t=>this.dialog=t,onClose:()=>this.emitModalClose(),onCancel:t=>this.handleEscape(t)},i("div",{class:"modal-container",id:this.modalid},i("header",{onClick:this.emitModalHeaderActive.bind(this)},i("div",null,this.modaltitle&&i("h1",{id:"modal-title"},this.modaltitle),this.modalsubtitle&&i("h2",{id:"modal-subtitle"},this.modalsubtitle)),this.closeButtonSlot()),i("div",{class:"modal-content",id:"modal-content"},i("slot",{name:"modalContent"}))),i("div",{class:"modal-background","data-action":"modalBackground","data-modal":this.modalid,onClick:()=>{this.emitBackgroundClick(),this.close()}}))}get host(){return e(this)}};z.style=":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>dialog{padding:0;border:none;margin:0}:host>dialog:modal{width:100%;max-width:100%;max-height:100%}:host>dialog::backdrop{display:none}:host>dialog+.backdrop{display:none}:host>dialog:not([open]){display:none}:host>dialog[open]{display:block}.modal-container{z-index:1010;display:flex;overflow:-moz-scrollbars-none;overflow:hidden;width:100%;height:100vh;flex-direction:column}.modal-container>header{display:flex;flex-flow:row nowrap;align-items:flex-start;justify-content:flex-start;padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 2);background:var(--color-surface02)}.modal-container>header button{padding:0;border:none;margin:0;margin-left:auto;background:transparent;cursor:pointer}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 2.5);--z-icon-height:calc(var(--space-unit) * 2.5);display:flex;fill:var(--color-icon01)}.modal-container>header>div{display:flex;width:100%;flex-direction:column;margin-right:calc(var(--space-unit) * 2)}.modal-container>header h1,.modal-container>header h2{padding:0;margin:0;color:var(--color-text01);font-weight:var(--font-rg)}.modal-container>header h1{font-size:var(--font-size-5);letter-spacing:0;line-height:1.4}.modal-container>header h2{font-size:var(--font-size-3);letter-spacing:0;line-height:1.5}.modal-container>header>div *:empty{display:none}.modal-container>header h1+h2{margin-top:calc(var(--space-unit) * 0.5)}.modal-container>.modal-content{overflow:auto;flex:1 auto;background:var(--color-surface01);overflow-x:hidden}.modal-container .modal-content::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.modal-container .modal-content::-webkit-scrollbar-track{background-color:transparent}.modal-container .modal-content::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.modal-container .modal-content::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.modal-container .modal-content{scrollbar-color:var(--color-primary01) transparent}@media only screen and (min-width: 768px){.modal-background{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--gray900);opacity:0.7}.modal-container{position:fixed;top:calc(var(--space-unit) * 6);left:50%;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));border-radius:var(--border-radius);transform:translateX(-50%)}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 3);--z-icon-height:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 768px) and (max-width: 1151px){.modal-container>header{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){.modal-container>header{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 4)}.modal-container>header h1{font-size:var(--font-size-6);letter-spacing:0;line-height:1.33}.modal-container>header h2{font-size:var(--font-size-4);letter-spacing:0;line-height:1.5}.modal-container>header h1+h2{margin-top:0}}";export{a as z_dragdrop_area,z as z_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,g as i}from"./p-d17ebc2f.js";import{q as r}from"./p-
|
|
1
|
+
import{r as t,h as e,g as i}from"./p-d17ebc2f.js";import{q as r}from"./p-1cc1a418.js";import{f as s,g as o,h as n}from"./p-0397366d.js";import"./p-b497e33e.js";const a=class{constructor(e){t(this,e),this.currentSlide=0}watchData(){this.parseLinks()}componentWillLoad(){this.parseLinks(),this.setDevice(),window.addEventListener("resize",this.handleResize.bind(this))}componentDidRender(){this.setStyle()}handleResize(){this.setDevice(),this.setStyle()}parseLinks(){var t,e;switch(typeof this.data){case"string":{const i=null!==(t=s(this.data))&&void 0!==t?t:[];if(e=i,!Array.isArray(e)||!e.every((t=>"string"==typeof t)))throw new Error("Passed data is invalid");this.links=i;break}default:this.links=this.data}}setStyle(){const t=this.el.shadowRoot.querySelector("#slides");if(!t)return;const e=this.el.shadowRoot.querySelectorAll(".slide"),i=this.el.offsetWidth;t.style.width=i*this.links.length+"px",t.style.transform=`translate(-${i*this.currentSlide}px)`,e.forEach((t=>{t.querySelector("img").style.width=`${i}px`}))}setDevice(){this.device=o()}setCurrentSlide(t){this.currentSlide=t}getBulletDimension(){switch(this.device){case r.MOBILE:return 24;case r.TABLET:return 32;default:return 40}}renderSlides(t){return e("div",{id:"slides"},t.map(((t,i)=>e("div",{id:"slide"+i,class:`slide ${this.currentSlide!==i&&"hide"}`},e("img",{src:t})))))}renderScroll(t){let i=!1,r=this.currentSlide;return"left"===t?(i=0===this.currentSlide,r--):"right"===t&&(i=this.currentSlide===this.links.length-1,r++),e("z-icon",{class:`scroll ${t} ${i&&"disabled"}`,width:this.getBulletDimension(),height:this.getBulletDimension(),name:`chevron-${t}-circle`,onClick:()=>{!i&&this.setCurrentSlide(r)},onKeyUp:t=>!i&&n(t,(()=>{this.setCurrentSlide(r)})),tabindex:0,role:"button"})}renderSlideshowMain(){return e("main",null,this.renderScroll("left"),this.renderSlides(this.links),this.renderScroll("right"))}renderBullet(t){return e("a",{class:`bullet ${this.currentSlide===t&&"selected"}`,onClick:()=>this.setCurrentSlide(t),onKeyUp:e=>n(e,(()=>this.setCurrentSlide(t))),tabindex:0,role:"button"})}renderSlideshowFooter(){return e("footer",null,e("div",{class:"footer-left"},e("slot",{name:"footer-left"})),e("div",{class:"footer-center"},e("div",{class:"bullet-container"},Object.keys(this.links).map((t=>this.renderBullet(parseInt(t)))))),e("div",{class:"footer-right"},e("slot",{name:"footer-right"})))}render(){return this.links&&this.links.length?e("div",{id:this.slideshowid},this.renderSlideshowMain(),this.renderSlideshowFooter()):e("div",null)}get el(){return i(this)}static get watchers(){return{data:["watchData"]}}};a.style=':host{display:block;width:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{display:flex;width:inherit;flex-direction:column}main{position:relative;overflow:hidden;width:100%}main z-icon.scroll{position:absolute;z-index:10;top:50%;width:auto;margin:0 var(--space-unit);cursor:pointer;fill:var(--color-primary01);transition:0.6s ease}main .scroll.disabled{opacity:0.5;pointer-events:none}main .scroll.right{right:0}#slides{display:flex;flex-wrap:wrap;line-height:0px;overflow-y:hidden;transition:all 300ms}footer{display:grid;width:100%;height:56px;align-items:center;border-top:var(--border-base) solid var(--color-surface02);grid-template:2 / 2;grid-template-areas:"center center" "left right"}footer>div{width:100%;align-items:center}footer .footer-center{grid-area:center}footer .footer-left{grid-area:left}footer .footer-right{grid-area:right}footer .bullet-container{display:flex;min-height:60px;align-items:center;justify-content:center;margin:0 auto}footer .bullet-container .bullet{width:8px;height:8px;margin:var(--space-unit) 2px;background-color:var(--bg-neutral-150);border-radius:50%;pointer-events:none}footer .bullet-container .bullet.selected{background-color:var(--bg-neutral-400)}@media only screen and (min-width: 768px){footer{height:76px;border-top:var(--border-base) solid var(--color-surface02);grid-template:1 / 1fr 2fr 1fr;grid-template-areas:"left center right"}footer .bullet-container .bullet{width:10px;height:10px;margin:var(--space-unit) 3px}}@media only screen and (min-width: 1025px){main z-icon.scroll{margin:0 10px}footer .bullet-container .bullet{width:16px;height:16px;margin:var(--space-unit) calc(var(--space-unit) * 0.5);cursor:pointer;pointer-events:auto}}';export{a as z_slideshow}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as n}from"./p-d17ebc2f.js";import{x as a,q as r,D as o}from"./p-1cc1a418.js";import{g as l}from"./p-0397366d.js";import"./p-b497e33e.js";const c=class{constructor(e){t(this,e),this.fileInput=i(this,"fileInput",7),this.type=a.DEFAULT,this.files=[],this.inputAttributes={type:"file",id:"file-elem",multiple:!0}}removeFileListener(t){const i=this.files,e=i.find((i=>i.name===t.detail.fileName));if(e){const t=i.indexOf(e);t>=0&&(i.splice(t,1),this.files=[...i])}}fileDroppedListener(t){this.input.files=t.detail,this.fileInputHandler()}componentDidUpdate(){this.handleAccessibility(),this.invalidFiles.size&&this.errorModal.focus()}componentWillLoad(){this.invalidFiles=new Map}fileInputHandler(){this.input.files.length&&(this.invalidFiles=this.checkFiles(Array.from(this.input.files)))}async getFiles(){return this.files}getType(){return l()!==r.DESKTOP&&l()!==r.DESKTOP_WIDE?a.DEFAULT:this.type}handleAccessibility(){const t=this.el.querySelector("z-file:last-child z-chip button");this.files.length>0&&t?t.focus():this.getType()===a.DEFAULT?this.button.querySelector("button").focus():this.uploadLink.focus()}checkFiles(t){const i=new Map,e=`supera i ${this.fileMaxSize}MB`;return t.forEach((t=>{const s=t.size/1024/1024,n=this.acceptedFormat.split(",").some((i=>t.name.toLowerCase().endsWith(i.trim()))),a=s<=this.fileMaxSize;a&&n?this.files.find((i=>i.name===t.name))||(this.files.push(t),this.fileInput.emit(t),this.input.value=""):(i.set(t.name,[]),a||i.get(t.name).push(e),n||i.get(t.name).push(" ha un'estensione non prevista"))})),i}renderTitle(){return e("h2",{class:"heading-2-sb",id:"title"},this.mainTitle)}renderDescription(t){return e("span",{class:t},this.description)}renderAllowedFileExtensions(){let t="",i="";return this.acceptedFormat&&(t=` nei formati ${this.acceptedFormat.split(", ").map((t=>t.substring(1).toUpperCase())).join(", ")}`),this.fileMaxSize&&(i=` per un massimo di ${this.fileMaxSize}MB di peso`),e("span",{class:"body-3"},t||i?`Puoi allegare file${t}${i}.`:null)}renderFileSection(){return e("section",{class:"files-container "+(this.files.length?"":"hidden")},e("h4",{class:"heading-4-sb"},"File appena caricati"),e("div",{class:"files-wrapper"},e("slot",{name:"files"})),e("z-divider",{size:o.MEDIUM}))}renderInput(){return e("input",Object.assign({},this.inputAttributes,{onChange:()=>this.fileInputHandler(),accept:this.acceptedFormat,ref:t=>this.input=t}))}renderUploadButton(){return[this.renderInput(),e("z-button",{onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},id:"fileSelect",variant:this.buttonVariant,icon:"upload",ref:t=>this.button=t},"Allega")]}renderUploadLink(){return[this.renderInput(),e("span",{class:"body-1 upload-link-text"},"Trascinalo qui o"," ",e("span",{tabIndex:0,class:"body-1-sb upload-link",onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},ref:t=>this.uploadLink=t},"caricalo")," ","dal tuo computer")]}renderDefaultMode(){return[this.renderDescription("body-3-sb"),this.renderAllowedFileExtensions(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),e("z-dragdrop-area",null,e("div",{class:"text-container"},this.renderDescription("body-1"),this.renderUploadLink(),this.renderAllowedFileExtensions()))]}formatErrorString(t,i){var e,s;return`Il file ${t} ${null!==(e=i[0])&&void 0!==e?e:""}${i[0]&&i[1]?", ":""} ${null!==(s=i[1])&&void 0!==s?s:""} e non può quindi essere caricato.`}handleErrorModalContent(){return e("div",{slot:"modalContent"},e("div",{class:"modal-wrapper"},e("div",{class:"files"},Array.from(this.invalidFiles).map((([t,i])=>e("span",{class:"body-3"},this.formatErrorString(t,i)))))))}render(){return e(s,null,e("div",{tabIndex:0,class:`container ${this.getType()}`},this.renderTitle(),this.getType()==a.DEFAULT?this.renderDefaultMode():this.renderDragDropMode()),!!this.invalidFiles.size&&e("z-modal",{tabIndex:0,ref:t=>this.errorModal=t,modaltitle:"Attenzione",onModalClose:()=>this.invalidFiles=new Map,onModalBackgroundClick:()=>this.invalidFiles=new Map},this.handleErrorModalContent()))}get el(){return n(this)}};c.style=":host{color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.container{display:flex;flex-direction:column}:host .modal-wrapper{display:flex;align-items:center;justify-content:center}:host .modal-wrapper>.files-wrapper{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}:host .text-container{display:flex;flex-direction:column;margin:auto}:host .text-container .body-1{text-align:center}:host .text-container .upload-link{color:var(--color-link-primary);cursor:pointer}:host .text-container .upload-link-text{margin-bottom:var(--space-unit)}input#file-elem{display:none}#title{display:inline-block;margin-bottom:var(--space-unit)}:host>.container>z-button{display:inline-block;margin-top:calc(var(--space-unit) * 3)}:host>.container>.files-container.hidden{display:none}:host>.container>.files-container>.heading-4-sb{display:inline-block;margin:calc(var(--space-unit) * 3) 0}:host>.container>.files-container>.files-wrapper{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}:host>.container>.files-container>z-divider{margin-top:calc(var(--space-unit) * 3);margin-bottom:0}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}}";export{c as z_file_upload}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as o,H as i,g as e}from"./p-d17ebc2f.js";import{M as n}from"./p-
|
|
1
|
+
import{r as t,h as o,H as i,g as e}from"./p-d17ebc2f.js";import{M as n}from"./p-1cc1a418.js";const r=class{constructor(o){t(this,o),this.icon="informationsource",this.position=n.BOTTOM_RIGHT,this.open=!1,this.currentIndex=null}watchItems(){Array.from(this.el.children).forEach(((t,o)=>{this.currentIndex===o?t.setAttribute("data-current",""):t.removeAttribute("data-current")}))}openInfoBox(){this.currentIndex=0,this.open=!0}closeInfoBox(){this.open=!1}next(){this.currentIndex=this.currentIndex+1,this.currentIndex===this.el.children.length&&this.closeInfoBox()}render(){return o(i,{open:this.open},o("button",{class:"z-info-reveal-trigger",onClick:this.openInfoBox.bind(this)},this.label&&o("span",{class:"z-info-reveal-label"},this.label),o("z-icon",{name:this.icon})),this.open&&o("div",{class:"info-box",onClick:this.next.bind(this),tabIndex:0},o("slot",null),o("button",{class:"z-info-reveal-close",onClick:this.closeInfoBox.bind(this)},o("z-icon",{name:"close"}))))}get el(){return e(this)}static get watchers(){return{currentIndex:["watchItems"]}}};r.style=':host{--z-info-reveal-theme--surface:var(--color-black);--z-info-reveal-theme--text:var(--color-white);--z-info-reveal-shadow:var(--shadow-2);--z-info-reveal-max-width:375px;position:relative;display:flex;width:fit-content;background-color:var(--z-info-reveal-theme--surface);color:var(--z-info-reveal-theme--text);font-size:var(--font-size-3);font-weight:var(--font-rg);letter-spacing:0;line-height:1.5}button{padding:0;border:none;background-color:transparent;border-radius:0;color:inherit;cursor:pointer;fill:currentcolor;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit}z-icon{--z-icon-width:calc(var(--space-unit) * 3);--z-icon-height:calc(var(--space-unit) * 3);display:flex}.z-info-reveal-trigger{display:flex;width:fit-content;height:100%;align-items:center;padding:calc(var(--space-unit) / 2);box-shadow:var(--z-info-reveal-shadow);column-gap:calc(var(--space-unit) / 2)}:host([position="top_left"]) .z-info-reveal-trigger,:host([position="bottom_left"]) .z-info-reveal-trigger{flex-direction:row-reverse}:host([open]) .z-info-reveal-trigger{box-shadow:none}.info-box{position:absolute;display:flex;max-width:var(--z-info-reveal-max-width);padding:calc(var(--space-unit) / 2);background-color:var(--z-info-reveal-theme--surface);box-shadow:var(--z-info-reveal-shadow);column-gap:calc(var(--space-unit) / 2);cursor:pointer}:host([position="bottom_left"]) .info-box,:host([position="bottom_right"]) .info-box{bottom:0}:host([position="top_right"]) .info-box,:host([position="bottom_right"]) .info-box{right:0}:host([position="top_left"]) .info-box,:host([position="bottom_left"]) .info-box{left:0;flex-direction:row-reverse}::slotted(*){display:none;width:max-content}::slotted([data-current]){display:block}:host([position="top_left"]) .z-info-reveal-close,:host([position="top_right"]) .z-info-reveal-close{align-self:flex-start}:host([position="bottom_left"]) .z-info-reveal-close,:host([position="bottom_right"]) .z-info-reveal-close{align-self:flex-end}';export{r as z_info_reveal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as o}from"./p-d17ebc2f.js";import{U as r,V as n,d as a,B as l}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as o}from"./p-d17ebc2f.js";import{U as r,V as n,d as a,B as l}from"./p-1cc1a418.js";const c=class{constructor(i){t(this,i),this.indexChange=s(this,"indexChange",7),this.single=!1,this.ghostLoadingHeight=100,this.current=0,this.scrollingTo=null}onIndexChange(){this.indexChange.emit({currentItem:this.current})}onSingleModeChange(){this.single&&!this.intersectionObserver&&this.setIntersectionObserver()}setIntersectionObserver(){this.intersectionObserver=new window.IntersectionObserver((t=>{const s=t.find((t=>t.isIntersecting));if(!s)return;const i=this.items.findIndex((t=>t===s.target));this.highlightedIndicator=i,null!==this.scrollingTo&&i!==this.scrollingTo||(this.scrollingTo=null,this.current=i)}),{root:this.itemsContainer,threshold:.5}),this.items.forEach((t=>this.intersectionObserver.observe(t)))}onPrev(){if(this.single)return void this.goTo(Math.max(0,this.current-1));const t=this.itemsContainer;t&&t.scrollBy({left:-t.clientWidth/2,behavior:"smooth"})}onNext(){if(this.single)return void this.goTo(Math.min(this.current+1,this.items.length-1));const t=this.itemsContainer;t&&t.scrollBy({left:t.clientWidth/2,behavior:"smooth"})}checkNavigationValidity(){this.single&&(this.canNavigatePrev=this.current>1,this.canNavigateNext=this.current<this.items.length-1),this.canNavigatePrev=this.itemsContainer.scrollLeft>0,this.canNavigateNext=this.itemsContainer.scrollLeft<this.itemsContainer.scrollWidth-this.itemsContainer.clientWidth}canShowFooter(){return this.arrowsPosition===r.BOTTOM||this.progressMode===n.DOTS||this.progressMode===n.NUMBERS}goTo(t){this.current!==t&&(this.scrollingTo=t,this.itemsContainer.scroll({left:this.items[t].offsetLeft,behavior:"smooth"}))}componentDidLoad(){this.itemsContainer=this.hostElement.querySelector(".z-carousel-items-container"),this.itemsContainer&&(this.items=Array.from(this.itemsContainer.querySelectorAll("li")),this.single&&this.setIntersectionObserver(),this.itemsContainer.addEventListener("scroll",this.checkNavigationValidity.bind(this),{passive:!0}),this.checkNavigationValidity())}render(){return this.isLoading?i(e,null,this.label&&i("div",{class:"heading-4 z-carousel-title"},this.label),i("div",{style:{height:`${this.ghostLoadingHeight}px`}},i("z-ghost-loading",null),i("div",{class:"loading-items-container"},i("slot",null)))):i(e,null,i("div",{class:"z-carousel-container"},this.label&&i("div",{class:"heading-4 z-carousel-title"},this.label),i("div",{class:"z-carousel-wrapper"},this.arrowsPosition===r.OVER&&i("z-button",{size:a.SMALL,"data-direction":"prev",icon:"chevron-left",onClick:this.onPrev.bind(this),disabled:!this.canNavigatePrev}),i("ul",{class:"z-carousel-items-container"},i("slot",null)),this.arrowsPosition===r.OVER&&i("z-button",{size:a.SMALL,"data-direction":"next",icon:"chevron-right",onClick:this.onNext.bind(this),disabled:!this.canNavigateNext}))),this.canShowFooter()&&i("div",{class:"z-carousel-footer"},this.arrowsPosition===r.BOTTOM&&i("z-button",{size:a.SMALL,variant:l.TERTIARY,icon:"arrow-simple-left-filled",onClick:this.onPrev.bind(this),disabled:!this.canNavigatePrev}),this.progressMode===n.DOTS&&this.single&&this.items&&i("div",{class:"dots-progress"},this.items.map(((t,s)=>i("button",{type:"button",class:{current:this.highlightedIndicator===s},onClick:()=>this.goTo(s)},i("z-icon",{name:this.highlightedIndicator===s?"white-circle-filled":"black-circle-filled"}))))),this.progressMode===n.NUMBERS&&this.single&&this.items&&i("div",{class:"numbers-progress interactive-3"},i("span",{class:"current"},this.current+1),i("span",null,"di"),i("span",null,this.items.length)),this.arrowsPosition===r.BOTTOM&&i("z-button",{size:a.SMALL,variant:l.TERTIARY,icon:"arrow-simple-right-filled",onClick:this.onNext.bind(this),disabled:!this.canNavigateNext})))}get hostElement(){return o(this)}static get watchers(){return{current:["onIndexChange"],single:["onSingleModeChange"]}}};c.style='z-carousel{font-family:var(--font-family-sans);font-weight:var(--font-rg);--z-carousel-gutter:0}z-carousel[single],z-carousel[single="true"]{display:flex;flex-direction:column;align-items:center;justify-content:center}z-carousel[single="true"] .z-carousel-container,z-carousel[single] .z-carousel-container{width:fit-content;max-width:100%}z-carousel .loading-items-container{display:none}z-carousel .z-carousel-container{display:flex;flex-direction:column}z-carousel .z-carousel-wrapper{position:relative}z-carousel .z-carousel-title{margin-bottom:var(--space-unit);color:var(--gray800)}z-carousel .z-carousel-items-container{display:flex;max-width:100%;flex-direction:row;margin:0;list-style:none;-ms-overflow-style:none;overflow-x:scroll;padding-inline-start:0;scroll-snap-type:x mandatory;scrollbar-width:none;}z-carousel .z-carousel-items-container::-webkit-scrollbar{display:none}z-carousel .z-carousel-items-container>*:not(:last-child){margin-right:var(--z-carousel-gutter)}z-carousel[single="true"] .z-carousel-items-container>*:not(:last-child),z-carousel[single] .z-carousel-items-container>*:not(:last-child){margin-right:0}z-carousel .z-carousel-items-container>li{scroll-snap-align:center}z-button[data-direction]{--z-icon-width:32px;--z-icon-height:32px;position:absolute;bottom:50%;transform:translateY(50%)}z-button[data-direction="next"]{right:0}z-carousel .z-carousel-footer{display:flex;flex-direction:row;align-items:center;justify-content:center;margin-top:var(--space-unit)}z-carousel .z-carousel-footer .numbers-progress,z-carousel .z-carousel-footer .dots-progress{display:flex;align-items:center;justify-content:center}z-carousel .z-carousel-footer .dots-progress button{display:flex;align-items:center;padding:0;border:none;margin:0;background-color:transparent}z-carousel .z-carousel-footer .dots-progress button:not(.current){cursor:pointer}z-carousel .z-carousel-footer .numbers-progress{margin:0 calc(var(--space-unit) / 2);column-gap:calc(var(--space-unit) / 2)}z-carousel .z-carousel-footer .numbers-progress .current{font-weight:var(--font-sb)}z-carousel .z-carousel-footer .dots-progress button.current z-icon{fill:var(--gray800)}z-carousel .z-carousel-footer .dots-progress button:not(.current) z-icon{fill:var(--gray200)}';export{c as z_carousel}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as a,g as o}from"./p-d17ebc2f.js";import{j as e,S as r,B as n,d as l,P as c}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i,H as a,g as o}from"./p-d17ebc2f.js";import{j as e,S as r,B as n,d as l,P as c}from"./p-1cc1a418.js";import{d as p}from"./p-0397366d.js";import"./p-b497e33e.js";const d=class{constructor(i){t(this,i),this.sort=s(this,"sort",7),this.padding=e.MEDIUM,this.defaultSortDirection=r.ASC,this.sortDirection=r.NONE,this.emitOnSort=this.emitOnSort.bind(this)}emitOnSort(){this.sort.emit({columnId:this.columnId,sortDirection:this.sortDirection})}handleSort(){this.sortable&&(this.sortDirection=(()=>{switch(this.sortDirection){case r.ASC:return r.DESC;case r.DESC:return r.ASC;case r.NONE:return this.defaultSortDirection;default:return r.NONE}})(),this.emitOnSort())}handleMenuClick(){this.popover.open=!this.popover.open}handleOutsideClick(t){!p(t.target).find((t=>"z-popover"===t.nodeName.toLowerCase()))&&this.popover&&(this.popover.open=!1)}handleClickHeaders(t){const s=t.target,i=p(s).find((t=>"z-table-header"===t.nodeName.toLowerCase()));this.sortable&&i&&i.attributes.getNamedItem("column-id").value!==this.columnId&&(s.parentNode.sortable||s.sortable)&&(this.sortDirection=r.NONE)}componentWillRender(){this.host.setAttribute("role","columnheader")}render(){return i(a,{class:{sortable:this.sortable},onClick:()=>this.handleSort()},i("div",{class:"container"},i("slot",null),this.sortable&&this.sortDirection!==r.NONE&&i("z-icon",{name:this.sortDirection===r.ASC?"arrow-up":"arrow-down",class:"arrow"})),this.showButton&&i("div",{class:"popover-container"},i("z-button",{ref:t=>this.triggerButton=t,class:"contextual-popover-button",icon:"contextual-menu",variant:n.TERTIARY,size:l.X_SMALL,onClick:()=>this.handleMenuClick()}),i("z-popover",{ref:t=>this.popover=t,position:c.BOTTOM,center:!0,bindTo:this.triggerButton},i("div",null,i("slot",{name:"contextual-menu"})))))}get host(){return o(this)}};d.style=':host{position:relative;display:table-cell;border-bottom:var(--border-size-medium) solid var(--gray200);background-color:var(--gray50);font-family:var(--dashboard-font);font-weight:var(--font-sb);text-align:start}.container{display:flex;align-items:flex-end}:host(.sortable){cursor:pointer}:host([padding="x-small"]){padding:calc(var(--space-unit) * 0.5)}:host([padding="small"]){padding:calc(var(--space-unit))}:host([padding="medium"]){padding:calc(var(--space-unit) * 2)}:host([padding="large"]){padding:calc(var(--space-unit) * 2.5)}:host([padding="special"]){padding:0}.arrow{padding-left:var(--space-unit);opacity:1}.popover-container{position:absolute;top:var(--space-unit);right:var(--space-unit);display:none}.popover-container z-popover{--z-popover-theme--surface:var(--gray200);position:relative;z-index:1}.popover-container.visible{display:block}:host(:hover) .popover-container{display:block}';export{d as z_table_header}
|