@zanichelli/albe-web-components 13.2.0-rc1 → 13.2.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/web-components-library.cjs.js +1 -1
  4. package/dist/cjs/z-app-header_12.cjs.entry.js +16 -12
  5. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  6. package/dist/cjs/z-carousel.cjs.entry.js +3 -2
  7. package/dist/cjs/z-carousel.cjs.entry.js.map +1 -1
  8. package/dist/cjs/z-combobox.cjs.entry.js +38 -145
  9. package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
  10. package/dist/cjs/z-file-upload.cjs.entry.js +25 -14
  11. package/dist/cjs/z-file-upload.cjs.entry.js.map +1 -1
  12. package/dist/cjs/z-popover.cjs.entry.js +3 -3
  13. package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
  14. package/dist/cjs/z-table.cjs.entry.js +3 -2
  15. package/dist/cjs/z-table.cjs.entry.js.map +1 -1
  16. package/dist/collection/components/file-upload/z-file-upload/index.js +63 -13
  17. package/dist/collection/components/file-upload/z-file-upload/index.js.map +1 -1
  18. package/dist/collection/components/file-upload/z-file-upload/styles.css +12 -0
  19. package/dist/collection/components/icons/icons.js +10 -0
  20. package/dist/collection/components/icons/icons.js.map +1 -1
  21. package/dist/collection/components/inputs/z-combobox/index.js +41 -149
  22. package/dist/collection/components/inputs/z-combobox/index.js.map +1 -1
  23. package/dist/collection/components/inputs/z-combobox/index.spec.js +155 -185
  24. package/dist/collection/components/inputs/z-combobox/index.spec.js.map +1 -1
  25. package/dist/collection/components/inputs/z-combobox/styles.css +10 -10
  26. package/dist/collection/components/inputs/z-input/index.js +5 -41
  27. package/dist/collection/components/inputs/z-input/index.js.map +1 -1
  28. package/dist/collection/components/list/z-list-element/index.js +1 -20
  29. package/dist/collection/components/list/z-list-element/index.js.map +1 -1
  30. package/dist/collection/components/table/z-table/index.js +3 -2
  31. package/dist/collection/components/table/z-table/index.js.map +1 -1
  32. package/dist/collection/components/z-carousel/index.js +3 -1
  33. package/dist/collection/components/z-carousel/index.js.map +1 -1
  34. package/dist/collection/components/z-carousel/styles.css +3 -0
  35. package/dist/collection/components/z-popover/index.js +4 -4
  36. package/dist/collection/components/z-popover/index.js.map +1 -1
  37. package/dist/components/icons.js +10 -0
  38. package/dist/components/icons.js.map +1 -1
  39. package/dist/components/index10.js +5 -11
  40. package/dist/components/index10.js.map +1 -1
  41. package/dist/components/index13.js +1 -3
  42. package/dist/components/index13.js.map +1 -1
  43. package/dist/components/index25.js +3 -3
  44. package/dist/components/index25.js.map +1 -1
  45. package/dist/components/z-carousel.js +3 -2
  46. package/dist/components/z-carousel.js.map +1 -1
  47. package/dist/components/z-combobox.js +49 -163
  48. package/dist/components/z-combobox.js.map +1 -1
  49. package/dist/components/z-file-upload.js +28 -15
  50. package/dist/components/z-file-upload.js.map +1 -1
  51. package/dist/components/z-table.js +3 -2
  52. package/dist/components/z-table.js.map +1 -1
  53. package/dist/esm/loader.js +1 -1
  54. package/dist/esm/web-components-library.js +1 -1
  55. package/dist/esm/z-app-header_12.entry.js +16 -12
  56. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  57. package/dist/esm/z-carousel.entry.js +3 -2
  58. package/dist/esm/z-carousel.entry.js.map +1 -1
  59. package/dist/esm/z-combobox.entry.js +40 -147
  60. package/dist/esm/z-combobox.entry.js.map +1 -1
  61. package/dist/esm/z-file-upload.entry.js +25 -14
  62. package/dist/esm/z-file-upload.entry.js.map +1 -1
  63. package/dist/esm/z-popover.entry.js +3 -3
  64. package/dist/esm/z-popover.entry.js.map +1 -1
  65. package/dist/esm/z-table.entry.js +3 -2
  66. package/dist/esm/z-table.entry.js.map +1 -1
  67. package/dist/types/components/file-upload/z-file-upload/index.d.ts +5 -0
  68. package/dist/types/components/icons/icons.d.ts +20 -0
  69. package/dist/types/components/inputs/z-combobox/index.d.ts +1 -14
  70. package/dist/types/components/inputs/z-input/index.d.ts +0 -5
  71. package/dist/types/components/list/z-list-element/index.d.ts +0 -2
  72. package/dist/types/components/z-carousel/index.d.ts +1 -0
  73. package/dist/types/components/z-popover/index.d.ts +1 -0
  74. package/dist/types/components.d.ts +18 -23
  75. package/dist/web-components-library/{p-158b6dda.entry.js → p-3796ca7c.entry.js} +2 -2
  76. package/dist/web-components-library/p-3796ca7c.entry.js.map +1 -0
  77. package/dist/web-components-library/p-9b52dea5.entry.js +2 -0
  78. package/dist/web-components-library/p-9b52dea5.entry.js.map +1 -0
  79. package/dist/web-components-library/p-aa0f32d7.entry.js +2 -0
  80. package/dist/web-components-library/p-aa0f32d7.entry.js.map +1 -0
  81. package/dist/web-components-library/p-ba8e67ee.entry.js +2 -0
  82. package/dist/web-components-library/p-ba8e67ee.entry.js.map +1 -0
  83. package/dist/web-components-library/p-ed1a5ee3.entry.js +2 -0
  84. package/dist/web-components-library/p-ed1a5ee3.entry.js.map +1 -0
  85. package/{www/build/p-2637ab23.entry.js → dist/web-components-library/p-f7607ce7.entry.js} +2 -2
  86. package/dist/web-components-library/p-f7607ce7.entry.js.map +1 -0
  87. package/dist/web-components-library/web-components-library.esm.js +1 -1
  88. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  89. package/package.json +1 -1
  90. package/www/build/{p-158b6dda.entry.js → p-3796ca7c.entry.js} +2 -2
  91. package/www/build/p-3796ca7c.entry.js.map +1 -0
  92. package/www/build/p-9b52dea5.entry.js +2 -0
  93. package/www/build/p-9b52dea5.entry.js.map +1 -0
  94. package/www/build/p-aa0f32d7.entry.js +2 -0
  95. package/www/build/p-aa0f32d7.entry.js.map +1 -0
  96. package/www/build/p-ba8e67ee.entry.js +2 -0
  97. package/www/build/p-ba8e67ee.entry.js.map +1 -0
  98. package/www/build/p-ddd9a0ea.js +2 -0
  99. package/www/build/p-ed1a5ee3.entry.js +2 -0
  100. package/www/build/p-ed1a5ee3.entry.js.map +1 -0
  101. package/{dist/web-components-library/p-2637ab23.entry.js → www/build/p-f7607ce7.entry.js} +2 -2
  102. package/www/build/p-f7607ce7.entry.js.map +1 -0
  103. package/www/build/web-components-library.esm.js +1 -1
  104. package/www/build/web-components-library.esm.js.map +1 -1
  105. package/www/index.html +1 -1
  106. package/dist/web-components-library/p-158b6dda.entry.js.map +0 -1
  107. package/dist/web-components-library/p-2637ab23.entry.js.map +0 -1
  108. package/dist/web-components-library/p-2b2cb566.entry.js +0 -2
  109. package/dist/web-components-library/p-2b2cb566.entry.js.map +0 -1
  110. package/dist/web-components-library/p-2df884ef.entry.js +0 -2
  111. package/dist/web-components-library/p-2df884ef.entry.js.map +0 -1
  112. package/dist/web-components-library/p-5023f7d5.entry.js +0 -2
  113. package/dist/web-components-library/p-5023f7d5.entry.js.map +0 -1
  114. package/dist/web-components-library/p-93cb103f.entry.js +0 -2
  115. package/dist/web-components-library/p-93cb103f.entry.js.map +0 -1
  116. package/www/build/p-158b6dda.entry.js.map +0 -1
  117. package/www/build/p-2637ab23.entry.js.map +0 -1
  118. package/www/build/p-2b2cb566.entry.js +0 -2
  119. package/www/build/p-2b2cb566.entry.js.map +0 -1
  120. package/www/build/p-2df884ef.entry.js +0 -2
  121. package/www/build/p-2df884ef.entry.js.map +0 -1
  122. package/www/build/p-32cd9d9b.js +0 -2
  123. package/www/build/p-5023f7d5.entry.js +0 -2
  124. package/www/build/p-5023f7d5.entry.js.map +0 -1
  125. package/www/build/p-93cb103f.entry.js +0 -2
  126. package/www/build/p-93cb103f.entry.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as e,g as s}from"./p-10bb4f4b.js";import{I as r,e as o,g as a,l as n,i as h}from"./p-025f494e.js";import{a as d}from"./p-955da62e.js";import"./p-2c886e8b.js";const l=':host{display:block;font-family:var(--font-family-sans)}:host>div.fixed{position:relative}:host>div>.header{position:relative;z-index:10;display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--color-surface04);margin:0;background-color:var(--color-input-field01);border-radius:var(--border-radius-small);cursor:pointer}:host([size="small"])>div>.header{min-height:34px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header{min-height:30px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header p.body-3{padding:calc(var(--space-unit) * 0.5) 0}:host>div>.header:hover{outline:var(--border-size-medium) solid var(--color-surface04);outline-offset:-2px}:host>div.open>div.header:focus:focus-visible{box-shadow:none}:host>div>div.header:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host>div>.header>p.body-3{padding:var(--space-unit) 0;margin:0;color:var(--color-text01)}:host>div>.header>p.body-3>span{font-weight:var(--font-sb)}:host>div>.header>z-icon{fill:var(--color-icon02);transform:rotate(360deg);transition:all 200ms linear}:host>div>.header>z-icon.small,:host>div>.header>z-icon.x-small{--z-icon-width:16px;--z-icon-height:16px}:host>div.open>.header{border:var(--border-size-small) solid var(--color-primary01);border-radius:var(--border-radius-small) var(--border-radius-small) 0 0}:host>div.disabled{pointer-events:none}:host>div.disabled .header{border-color:var(--color-disabled01);fill:var(--color-disabled01)}:host>div.disabled .header>p.body-3{color:var(--color-disabled02)}:host>div.disabled .header>z-icon:last-child{fill:var(--color-disabled01)}:host>div.open>.header>z-icon{fill:var(--color-icon02);transform:rotate(180deg);transition:all 200ms linear}:host>div.open>div.open-combo-data{position:relative;z-index:12;padding:var(--space-unit) calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--gray200);border-top:0;background-color:var(--color-input-field01);border-radius:0}:host>div.open>div.open-combo-data>div>div{overflow:auto;max-height:235px;padding:0;scrollbar-color:var(--color-primary01) transparent}:host>div.open>div.open-combo-data>z-input{width:100%;margin-bottom:calc(var(--space-unit) * 2)}:host>div.open>div.open-combo-data>div>div>ul{max-height:235px;padding:0 3px;margin:0}::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01)}:host>div.open>z-input{position:relative;z-index:1;width:238px;margin:0 calc(var(--space-unit) * 2);color:var(--color-primary01)}:host>div.open>div.open-combo-data>div>div.search{overflow:hidden;max-height:auto;margin-top:0;box-shadow:1px 1px 4px 2px rgb(217 222 227 / 50%)}:host>div.open>div.open-combo-data>div>div.search>ul{overflow:auto;max-height:180px;padding:var(--space-unit) calc(var(--space-unit) * 2);scrollbar-color:var(--color-primary01) transparent}:host>div.open>div.open-combo-data>div>div.search>div{display:flex;justify-content:center}:host>div.open>div.open-combo-data>div>div.search>div>a{display:inline-block;height:44px;color:var(--color-primary01);cursor:pointer;font-size:14px;font-weight:var(--font-sb);line-height:44px;text-align:center;text-transform:uppercase}:host>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border-bottom:var(--border-size-small) solid var(--gray800);margin-bottom:var(--space-unit);text-align:left}:host([size="small"])>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5)}:host([size="x-small"])>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:var(--space-unit) calc(var(--space-unit) * 0.5)}';const c=l;const p=class{watchItems(){this.itemsList=typeof this.items==="string"?JSON.parse(this.items):this.items;this.selectedCounter=this.itemsList.filter((t=>t.checked)).length;this.updateRenderItemsList()}watchSearchValue(){this.filterItems(this.searchValue);const t=this.element.shadowRoot.querySelector(`.${this.getCheckboxClass()} input`);if(t){t.setAttribute("tabindex","0")}}getFocusedItemHandler(t){this.focusedItemId=t.detail}emitComboboxChange(){this.comboboxChange.emit({id:this.inputid,items:this.itemsList})}constructor(e){t(this,e);this.comboboxChange=i(this,"comboboxChange",7);this.itemsList=[];this.inputType=r.TEXT;this.inputid=undefined;this.items=undefined;this.label=undefined;this.disabled=false;this.hassearch=false;this.searchlabel=undefined;this.searchplaceholder=undefined;this.searchtitle=undefined;this.noresultslabel="Nessun risultato";this.isopen=false;this.isfixed=false;this.closesearchtext="Chiudi";this.hascheckall=false;this.checkalltext="Seleziona tutti";this.uncheckalltext="Deseleziona tutti";this.maxcheckableitems=0;this.hasgroupitems=undefined;this.size=o.BIG;this.searchValue=undefined;this.selectedCounter=undefined;this.renderItemsList=[];this.focusedItemId=undefined;this.toggleComboBox=this.toggleComboBox.bind(this);this.closeFilterItems=this.closeFilterItems.bind(this)}componentWillLoad(){this.watchItems()}componentWillRender(){this.selectedCounter=this.itemsList.filter((t=>t.checked)).length}getControlToListSize(){let t;switch(this.size){case o.BIG:t=h.LARGE;break;case o.SMALL:t=h.SMALL;break;case o.X_SMALL:t=h.SMALL;break;default:t=h.MEDIUM}return t}getItemId(t){return`combo-checkbox-${this.inputid}-${t.id}`}getCheckboxClass(){return`combo-item-checkbox-input-${this.inputid}`}getCheckAllId(){return`combo-checkbox-${this.inputid}-check-all`}hasCheckAllDisabled(){return this.maxcheckableitems&&this.maxcheckableitems<this.itemsList.length}resetInputTabIndex(){this.element.shadowRoot.querySelectorAll(`.${this.getCheckboxClass()} input`).forEach((function(t){t.setAttribute("tabindex","-1")}))}setInputTabIndex(t,i){if(i===0){if(!this.hascheckall||this.hascheckall&&this.searchValue||this.hascheckall&&this.hasCheckAllDisabled()){return 0}}return t===this.focusedItemId?0:-1}handleSelectArrowsNavigation(t,i){let e=i;this.resetInputTabIndex();this.focusComboboxItem(e);const s=[a.ARROW_DOWN,a.ARROW_UP];if(!s.includes(t.key)||!this.isopen){return}t.preventDefault();t.stopPropagation();const r=this.hascheckall&&!this.hasCheckAllDisabled()&&!this.searchValue?-1:0;const o=this.renderItemsList.length-1;if(t.key===a.ARROW_DOWN){e=e===o?r:i+1}else if(t.key===a.ARROW_UP){if(this.hascheckall&&!this.searchValue){e=e<0?o:i-1}else{e=e===0?o:i-1}}this.resetInputTabIndex();this.focusComboboxItem(e)}handleHeaderKeyboardEvent(t){if(t.key===a.SPACE){t.preventDefault()}if(t.key===a.ARROW_DOWN&&!this.isopen||t.key===a.ARROW_UP&&this.isopen){this.toggleComboBox()}}focusComboboxItem(t){let i;if(t<0){i=this.element.shadowRoot.querySelector(`#${this.getCheckAllId()}`)}else{const e=this.renderItemsList[t];if(!e){return}i=this.element.shadowRoot.querySelector(`#${this.getItemId(e)}`)}if(i){i.setAttribute("tabindex","0");i.focus()}}updateRenderItemsList(){if(this.searchValue){this.filterItems(this.searchValue)}else{this.resetRenderItemsList()}}resetRenderItemsList(){const t=[];this.itemsList.forEach((i=>{t.push(Object.assign({},i))}));this.renderItemsList=t}filterItems(t){if(!t){return this.closeFilterItems()}this.resetRenderItemsList();this.renderItemsList=this.renderItemsList.filter((i=>{const e=i.name.toUpperCase().indexOf(t.toUpperCase());const s=e+t.length;const r=i.name.substring(0,e)+"<strong>"+i.name.substring(e,s)+"</strong>"+i.name.substring(s,i.name.length);i.name=r;return e>=0}))}checkAll(t=true){this.itemsList=this.itemsList.map((i=>Object.assign(Object.assign({},i),{checked:t})));this.resetRenderItemsList();this.emitComboboxChange()}closeFilterItems(){this.searchValue="";this.resetRenderItemsList()}toggleComboBox(){this.isopen=!this.isopen;this.focusedItemId=""}renderHeader(){return e("div",{class:"header",onClick:()=>this.toggleComboBox(),onKeyDown:t=>{this.handleHeaderKeyboardEvent(t)},onKeyUp:t=>d(t,this.toggleComboBox),role:"button",tabindex:0,"aria-expanded":this.isopen?"true":"false"},e("p",{class:"body-3"},this.label,e("span",null,this.selectedCounter>0&&` (${this.selectedCounter})`)),e("z-icon",{name:"caret-down",class:this.size}))}renderContent(){if(!this.isopen){return}return e("div",{class:"open-combo-data"},this.hassearch&&this.renderSearchInput(),!this.hassearch?e("span",Object.assign({},this.getComboboxA11yAttributes())):null,e("div",{role:"listbox","aria-multiselectable":true,id:`${this.inputid}_list`,"aria-owns":`${this.hascheckall?`${this.getCheckAllId()} `:``}${this.itemsList.map((t=>this.getItemId(t))).join(" ")}`},this.hascheckall&&this.renderCheckAll(),this.renderItems()))}renderItems(){return e("div",{class:this.searchValue&&"search"},this.renderList(this.renderItemsList),this.searchValue&&this.renderCloseButton())}renderItem(t,i,s){return e("z-list-element",{id:t.id,htmlTabindex:null,dividerType:i!==s-1?n.ELEMENT:n.NONE,size:this.getControlToListSize()},e("z-input",{innerTabIndex:this.setInputTabIndex(t.id,i),type:r.CHECKBOX,checked:t.checked,htmlid:this.getItemId(t),label:t.name,class:this.getCheckboxClass(),disabled:!t.checked&&this.maxcheckableitems&&this.maxcheckableitems===this.selectedCounter,size:this.size===o.X_SMALL?o.SMALL:this.size,role:"option","aria-selected":t.checked?"true":"false",onKeyDown:t=>this.handleSelectArrowsNavigation(t,i),onInputCheck:i=>{this.itemsList=this.itemsList.map((e=>{if(t.id===e.id){e.checked=i.detail.checked}return e}));this.updateRenderItemsList();this.emitComboboxChange()}}))}renderList(t){if(!t){return}if(!t.length&&this.searchValue){return this.renderNoSearchResults()}if(this.hasgroupitems){return this.renderGroups(t)}return e("ul",{role:"none"},t.map(((i,e)=>this.renderItem(i,e,t.length))))}renderGroups(t){const i=t.reduce(((i,e,s)=>{var r;const{category:o}=e;const a=this.renderItem(e,s,t.length);i[o]=(r=i[o])!==null&&r!==void 0?r:[];i[o].push(a);return i}),{});const s=Object.entries(i).map((([t,i])=>e("z-list-group",{"divider-type":n.ELEMENT},e("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},t),i.map((t=>t)))));return e("ul",{role:"none"},s)}renderNoSearchResults(){return e("ul",{role:"none"},e("z-myz-list-item",{id:"no-results",text:this.noresultslabel,listitemid:"no-results",icon:"multiply-circle",class:this.size}))}renderCloseButton(){return e("div",null,e("a",{onClick:()=>this.closeFilterItems(),onKeyUp:t=>d(t,this.closeFilterItems),role:"button",tabindex:0},this.closesearchtext))}getComboboxA11yAttributes(){return{role:"combobox","aria-expanded":this.isopen?"true":"false","aria-activedescendant":this.isopen?this.focusedItemId:"","aria-controls":`${this.inputid}_list`}}renderSearchInput(){return e("z-input",Object.assign({htmlid:`${this.inputid}_search`,label:this.searchlabel,placeholder:this.searchplaceholder,htmltitle:this.searchtitle,type:this.inputType,value:this.searchValue,message:false,size:this.size,"aria-autocomplete":"list"},this.getComboboxA11yAttributes(),{onKeyUp:t=>{if(t.key===a.ESC){this.closeFilterItems()}},onInputChange:t=>{this.searchValue=t.detail.value}}))}renderCheckAll(){if(this.searchValue){return}const t=this.selectedCounter===this.itemsList.length;return e("div",{class:"check-all-wrapper"},e("z-input",{type:r.CHECKBOX,checked:t,htmlid:this.getCheckAllId(),class:this.getCheckboxClass(),label:t?this.uncheckalltext:this.checkalltext,disabled:this.hasCheckAllDisabled(),size:this.size===o.X_SMALL?o.SMALL:this.size,role:"option","aria-selected":t?"true":"false",onKeyDown:t=>this.handleSelectArrowsNavigation(t,-1),onInputCheck:t=>{this.checkAll(t.detail.checked)}}))}render(){return e("div",{key:"c12854ede2b8c8c8301ff18831e51f974ae00a3d","data-action":`combo-${this.inputid}`,class:{open:this.isopen,fixed:this.isfixed,disabled:this.disabled},id:this.inputid},this.renderHeader(),!this.disabled&&this.renderContent())}get element(){return s(this)}static get watchers(){return{items:["watchItems"],searchValue:["watchSearchValue"]}}};p.style=c;export{p as z_combobox};
2
- //# sourceMappingURL=p-2df884ef.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stylesCss","ZComboboxStyle0","ZCombobox","watchItems","this","itemsList","items","JSON","parse","selectedCounter","filter","item","checked","length","updateRenderItemsList","watchSearchValue","filterItems","searchValue","elem","element","shadowRoot","querySelector","getCheckboxClass","setAttribute","getFocusedItemHandler","e","focusedItemId","detail","emitComboboxChange","comboboxChange","emit","id","inputid","constructor","hostRef","inputType","InputType","TEXT","ControlSize","BIG","toggleComboBox","bind","closeFilterItems","componentWillLoad","componentWillRender","getControlToListSize","size","ListSize","LARGE","SMALL","X_SMALL","MEDIUM","getItemId","getCheckAllId","hasCheckAllDisabled","maxcheckableitems","resetInputTabIndex","querySelectorAll","forEach","setInputTabIndex","itemId","index","hascheckall","handleSelectArrowsNavigation","key","focusComboboxItem","arrows","KeyboardCode","ARROW_DOWN","ARROW_UP","includes","isopen","preventDefault","stopPropagation","firstCheckbox","itemsLentgh","renderItemsList","handleHeaderKeyboardEvent","ev","SPACE","focusElem","focus","resetRenderItemsList","push","Object","assign","value","start","name","toUpperCase","indexOf","end","newName","substring","checkAll","map","renderHeader","h","class","onClick","onKeyDown","onKeyUp","handleKeyboardSubmit","role","tabindex","label","renderContent","hassearch","renderSearchInput","getComboboxA11yAttributes","join","renderCheckAll","renderItems","renderList","renderCloseButton","renderItem","htmlTabindex","dividerType","ListDividerType","ELEMENT","NONE","innerTabIndex","type","CHECKBOX","htmlid","disabled","onInputCheck","i","renderNoSearchResults","hasgroupitems","renderGroups","newData","reduce","group","category","zListItem","_a","listGroups","entries","slot","text","noresultslabel","listitemid","icon","closesearchtext","searchlabel","placeholder","searchplaceholder","htmltitle","searchtitle","message","ESC","onInputChange","allChecked","uncheckalltext","checkalltext","render","open","fixed","isfixed"],"sources":["src/components/inputs/z-combobox/styles.css?tag=z-combobox&encapsulation=shadow","src/components/inputs/z-combobox/index.tsx"],"sourcesContent":[":host {\n display: block;\n font-family: var(--font-family-sans);\n}\n\n:host > div.fixed {\n position: relative;\n}\n\n:host > div > .header {\n position: relative;\n z-index: 10;\n display: flex;\n min-height: 42px;\n align-items: center;\n justify-content: space-between;\n padding: 0 calc(var(--space-unit) * 1.5);\n border: var(--border-size-small) solid var(--color-surface04);\n margin: 0;\n background-color: var(--color-input-field01);\n border-radius: var(--border-radius-small);\n cursor: pointer;\n}\n\n:host([size=\"small\"]) > div > .header {\n min-height: 34px;\n font-size: var(--font-size-2);\n}\n\n:host([size=\"x-small\"]) > div > .header {\n min-height: 30px;\n font-size: var(--font-size-2);\n}\n\n:host([size=\"x-small\"]) > div > .header p.body-3 {\n padding: calc(var(--space-unit) * 0.5) 0;\n}\n\n:host > div > .header:hover {\n outline: var(--border-size-medium) solid var(--color-surface04);\n outline-offset: -2px;\n}\n\n:host > div.open > div.header:focus:focus-visible {\n box-shadow: none;\n}\n\n:host > div > div.header:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n:host > div > .header > p.body-3 {\n padding: var(--space-unit) 0;\n margin: 0;\n color: var(--color-text01);\n}\n\n:host > div > .header > p.body-3 > span {\n font-weight: var(--font-sb);\n}\n\n:host > div > .header > z-icon {\n fill: var(--color-icon02);\n transform: rotate(360deg);\n transition: all 200ms linear;\n}\n\n:host > div > .header > z-icon.small,\n:host > div > .header > z-icon.x-small {\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n}\n\n:host > div.open > .header {\n border: var(--border-size-small) solid var(--color-primary01);\n border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;\n}\n\n:host > div.disabled {\n pointer-events: none;\n}\n\n:host > div.disabled .header {\n border-color: var(--color-disabled01);\n fill: var(--color-disabled01);\n}\n\n:host > div.disabled .header > p.body-3 {\n color: var(--color-disabled02);\n}\n\n:host > div.disabled .header > z-icon:last-child {\n fill: var(--color-disabled01);\n}\n\n:host > div.open > .header > z-icon {\n fill: var(--color-icon02);\n transform: rotate(180deg);\n transition: all 200ms linear;\n}\n\n:host > div.open > div.open-combo-data {\n position: relative;\n z-index: 12;\n padding: var(--space-unit) calc(var(--space-unit) * 2);\n border: var(--border-size-small) solid var(--gray200);\n border-top: 0;\n background-color: var(--color-input-field01);\n border-radius: 0;\n}\n\n:host > div.open > div.open-combo-data > div > div {\n overflow: auto;\n max-height: 235px;\n padding: 0;\n scrollbar-color: var(--color-primary01) transparent;\n}\n\n:host > div.open > div.open-combo-data > z-input {\n width: 100%;\n margin-bottom: calc(var(--space-unit) * 2);\n}\n\n:host > div.open > div.open-combo-data > div > div > ul {\n max-height: 235px;\n padding: 0 3px; /* needed for checkbox focus shadow */\n margin: 0;\n}\n\n::-webkit-scrollbar {\n width: 10px;\n background: linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);\n border-radius: var(--border-radius);\n}\n\n::-webkit-scrollbar-thumb {\n width: 10px;\n background-color: var(--color-primary01);\n}\n\n:host > div.open > z-input {\n position: relative;\n z-index: 1;\n width: 238px;\n margin: 0 calc(var(--space-unit) * 2);\n color: var(--color-primary01);\n}\n\n:host > div.open > div.open-combo-data > div > div.search {\n overflow: hidden;\n max-height: auto;\n margin-top: 0;\n box-shadow: 1px 1px 4px 2px rgb(217 222 227 / 50%);\n}\n\n:host > div.open > div.open-combo-data > div > div.search > ul {\n overflow: auto;\n max-height: 180px;\n padding: var(--space-unit) calc(var(--space-unit) * 2);\n scrollbar-color: var(--color-primary01) transparent;\n}\n\n:host > div.open > div.open-combo-data > div > div.search > div {\n display: flex;\n justify-content: center;\n}\n\n:host > div.open > div.open-combo-data > div > div.search > div > a {\n display: inline-block;\n height: 44px;\n color: var(--color-primary01);\n cursor: pointer;\n font-size: 14px;\n font-weight: var(--font-sb);\n line-height: 44px;\n text-align: center;\n text-transform: uppercase;\n}\n\n:host > div.open > div.open-combo-data > div > div.check-all-wrapper {\n padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);\n border-bottom: var(--border-size-small) solid var(--gray800);\n margin-bottom: var(--space-unit);\n text-align: left;\n}\n\n:host([size=\"small\"]) > div.open > div.open-combo-data > div > div.check-all-wrapper {\n padding: calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5);\n}\n\n:host([size=\"x-small\"]) > div.open > div.open-combo-data > div > div.check-all-wrapper {\n padding: var(--space-unit) calc(var(--space-unit) * 0.5);\n}\n","import {Component, Prop, h, State, Listen, Watch, Event, Element, EventEmitter} from \"@stencil/core\";\nimport {ComboItem, InputType, ListDividerType, ControlSize, KeyboardCode, ListSize} from \"../../../beans\";\nimport {ZInput} from \"../z-input\";\nimport {handleKeyboardSubmit} from \"../../../utils/utils\";\nimport {ZMyzListItem} from \"../../../snowflakes/myz/list/z-myz-list-item\";\n\n@Component({\n tag: \"z-combobox\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZCombobox {\n @Element() element: HTMLZComboboxElement;\n\n /** input unique id */\n @Prop()\n inputid: string;\n\n /** list items array */\n @Prop()\n items: ComboItem[] | string;\n\n /** label text */\n @Prop()\n label: string;\n\n /** the combobox is disabled */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** show search input flag (optional) */\n @Prop()\n hassearch?: boolean = false;\n\n /** search input label text (optional) */\n @Prop()\n searchlabel?: string;\n\n /** search input placeholder text (optional) */\n @Prop()\n searchplaceholder?: string;\n\n /** search input title text (optional) */\n @Prop()\n searchtitle?: string;\n\n /** no result text message */\n @Prop()\n noresultslabel?: string = \"Nessun risultato\";\n\n /** toggle combo list opening flag */\n @Prop({mutable: true})\n isopen = false;\n\n /** fixed style flag */\n @Prop()\n isfixed = false;\n\n /** close combobox list text */\n @Prop()\n closesearchtext?: string = \"Chiudi\";\n\n /** show \"check all\" checkbox (optional) */\n @Prop()\n hascheckall?: boolean = false;\n\n /** check all label (optional) */\n @Prop()\n checkalltext?: string = \"Seleziona tutti\";\n\n /** uncheck all label (optional) */\n @Prop()\n uncheckalltext?: string = \"Deseleziona tutti\";\n\n /** max number of checkable items (0 = unlimited) */\n @Prop()\n maxcheckableitems = 0;\n\n /** group items by category */\n @Prop()\n hasgroupitems?: boolean;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop()\n size?: ControlSize = ControlSize.BIG;\n\n @State()\n searchValue: string;\n\n @State()\n selectedCounter: number;\n\n @State()\n renderItemsList: ComboItem[] = []; // used for render only\n\n @State()\n focusedItemId: string;\n\n private itemsList: ComboItem[] = [];\n\n private inputType: InputType = InputType.TEXT;\n\n @Watch(\"items\")\n watchItems(): void {\n this.itemsList = typeof this.items === \"string\" ? JSON.parse(this.items) : this.items;\n this.selectedCounter = this.itemsList.filter((item) => item.checked).length;\n this.updateRenderItemsList();\n }\n\n @Watch(\"searchValue\")\n watchSearchValue(): void {\n this.filterItems(this.searchValue);\n const elem = this.element.shadowRoot.querySelector(`.${this.getCheckboxClass()} input`);\n if (elem) {\n elem.setAttribute(\"tabindex\", \"0\");\n }\n }\n\n @Listen(\"ariaDescendantFocus\")\n getFocusedItemHandler(e: CustomEvent): void {\n this.focusedItemId = e.detail;\n }\n\n /** Emitted when value is checked/unchecked. Returns id, items. */\n @Event()\n comboboxChange: EventEmitter;\n\n private emitComboboxChange(): void {\n this.comboboxChange.emit({id: this.inputid, items: this.itemsList});\n }\n\n constructor() {\n this.toggleComboBox = this.toggleComboBox.bind(this);\n this.closeFilterItems = this.closeFilterItems.bind(this);\n }\n\n componentWillLoad(): void {\n this.watchItems();\n }\n\n componentWillRender(): void {\n this.selectedCounter = this.itemsList.filter((item) => item.checked).length;\n }\n\n private getControlToListSize(): ListSize {\n let size;\n switch (this.size) {\n case ControlSize.BIG:\n size = ListSize.LARGE;\n break;\n case ControlSize.SMALL:\n size = ListSize.SMALL;\n break;\n case ControlSize.X_SMALL:\n size = ListSize.SMALL;\n break;\n default:\n size = ListSize.MEDIUM;\n }\n\n return size;\n }\n\n private getItemId(item: ComboItem): string {\n return `combo-checkbox-${this.inputid}-${item.id}`;\n }\n\n private getCheckboxClass(): string {\n return `combo-item-checkbox-input-${this.inputid}`;\n }\n\n private getCheckAllId(): string {\n return `combo-checkbox-${this.inputid}-check-all`;\n }\n\n private hasCheckAllDisabled(): boolean {\n return this.maxcheckableitems && this.maxcheckableitems < this.itemsList.length;\n }\n\n private resetInputTabIndex(): void {\n this.element.shadowRoot.querySelectorAll(`.${this.getCheckboxClass()} input`).forEach(function (item) {\n item.setAttribute(\"tabindex\", \"-1\");\n });\n }\n\n private setInputTabIndex(itemId, index): number {\n if (index === 0) {\n if (\n !this.hascheckall ||\n (this.hascheckall && this.searchValue) ||\n (this.hascheckall && this.hasCheckAllDisabled())\n ) {\n return 0;\n }\n }\n\n return itemId === this.focusedItemId ? 0 : -1;\n }\n\n private handleSelectArrowsNavigation(e: KeyboardEvent, key: number): void {\n let index = key;\n\n this.resetInputTabIndex();\n this.focusComboboxItem(index);\n\n const arrows = [KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP];\n if (!arrows.includes(e.key as KeyboardCode) || !this.isopen) {\n return;\n }\n\n e.preventDefault();\n e.stopPropagation();\n const firstCheckbox = this.hascheckall && !this.hasCheckAllDisabled() && !this.searchValue ? -1 : 0;\n const itemsLentgh = this.renderItemsList.length - 1;\n\n if (e.key === KeyboardCode.ARROW_DOWN) {\n index = index === itemsLentgh ? firstCheckbox : key + 1;\n } else if (e.key === KeyboardCode.ARROW_UP) {\n if (this.hascheckall && !this.searchValue) {\n index = index < 0 ? itemsLentgh : key - 1;\n } else {\n index = index === 0 ? itemsLentgh : key - 1;\n }\n }\n\n this.resetInputTabIndex();\n this.focusComboboxItem(index);\n }\n\n private handleHeaderKeyboardEvent(ev: KeyboardEvent): void {\n if (ev.key === KeyboardCode.SPACE) {\n ev.preventDefault();\n }\n if ((ev.key === KeyboardCode.ARROW_DOWN && !this.isopen) || (ev.key === KeyboardCode.ARROW_UP && this.isopen)) {\n this.toggleComboBox();\n }\n }\n\n private focusComboboxItem(index: number): void {\n let focusElem: HTMLElement;\n\n if (index < 0) {\n focusElem = this.element.shadowRoot.querySelector(`#${this.getCheckAllId()}`);\n } else {\n const item = this.renderItemsList[index];\n\n if (!item) {\n return;\n }\n\n focusElem = this.element.shadowRoot.querySelector(`#${this.getItemId(item)}`);\n }\n\n if (focusElem) {\n focusElem.setAttribute(\"tabindex\", \"0\");\n focusElem.focus();\n }\n }\n\n private updateRenderItemsList(): void {\n if (this.searchValue) {\n this.filterItems(this.searchValue);\n } else {\n this.resetRenderItemsList();\n }\n }\n\n private resetRenderItemsList(): void {\n const renderItemsList = [];\n this.itemsList.forEach((item: ComboItem) => {\n renderItemsList.push({...item});\n });\n this.renderItemsList = renderItemsList;\n }\n\n private filterItems(value: string): void {\n if (!value) {\n return this.closeFilterItems();\n }\n\n this.resetRenderItemsList();\n this.renderItemsList = this.renderItemsList.filter((item) => {\n const start = item.name.toUpperCase().indexOf(value.toUpperCase());\n const end = start + value.length;\n const newName =\n item.name.substring(0, start) +\n \"<strong>\" +\n item.name.substring(start, end) +\n \"</strong>\" +\n item.name.substring(end, item.name.length);\n\n item.name = newName;\n\n return start >= 0;\n });\n }\n\n private checkAll(checked = true): void {\n this.itemsList = this.itemsList.map((item: ComboItem) => ({\n ...item,\n checked: checked,\n }));\n this.resetRenderItemsList();\n this.emitComboboxChange();\n }\n\n private closeFilterItems(): void {\n this.searchValue = \"\";\n this.resetRenderItemsList();\n }\n\n private toggleComboBox(): void {\n this.isopen = !this.isopen;\n this.focusedItemId = \"\";\n }\n\n private renderHeader(): HTMLDivElement {\n return (\n <div\n class=\"header\"\n onClick={() => this.toggleComboBox()}\n onKeyDown={(ev: KeyboardEvent) => {\n this.handleHeaderKeyboardEvent(ev);\n }}\n onKeyUp={(ev: KeyboardEvent) => handleKeyboardSubmit(ev, this.toggleComboBox)}\n role=\"button\"\n tabindex={0}\n aria-expanded={this.isopen ? \"true\" : \"false\"}\n >\n <p class=\"body-3\">\n {this.label}\n <span>{this.selectedCounter > 0 && ` (${this.selectedCounter})`}</span>\n </p>\n <z-icon\n name=\"caret-down\"\n class={this.size}\n />\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n if (!this.isopen) {\n return;\n }\n\n return (\n <div class=\"open-combo-data\">\n {this.hassearch && this.renderSearchInput()}\n {!this.hassearch ? <span {...this.getComboboxA11yAttributes()} /> : null}\n <div\n role=\"listbox\"\n aria-multiselectable={true}\n id={`${this.inputid}_list`}\n aria-owns={`${this.hascheckall ? `${this.getCheckAllId()} ` : ``}${this.itemsList\n .map((item) => this.getItemId(item))\n .join(\" \")}`}\n >\n {this.hascheckall && this.renderCheckAll()}\n {this.renderItems()}\n </div>\n </div>\n );\n }\n\n private renderItems(): HTMLDivElement {\n return (\n <div class={this.searchValue && \"search\"}>\n {this.renderList(this.renderItemsList)}\n {this.searchValue && this.renderCloseButton()}\n </div>\n );\n }\n\n private renderItem(item: ComboItem, index: number, length: number): ZMyzListItem {\n return (\n <z-list-element\n id={item.id}\n htmlTabindex={null}\n dividerType={index !== length - 1 ? ListDividerType.ELEMENT : ListDividerType.NONE}\n size={this.getControlToListSize()}\n >\n <z-input\n innerTabIndex={this.setInputTabIndex(item.id, index)}\n type={InputType.CHECKBOX}\n checked={item.checked}\n htmlid={this.getItemId(item)}\n label={item.name}\n class={this.getCheckboxClass()}\n disabled={!item.checked && this.maxcheckableitems && this.maxcheckableitems === this.selectedCounter}\n size={this.size === ControlSize.X_SMALL ? ControlSize.SMALL : this.size}\n role=\"option\"\n aria-selected={item.checked ? \"true\" : \"false\"}\n onKeyDown={(e: KeyboardEvent) => this.handleSelectArrowsNavigation(e, index)}\n onInputCheck={(e: CustomEvent) => {\n this.itemsList = this.itemsList.map((i: ComboItem) => {\n if (item.id === i.id) {\n i.checked = e.detail.checked;\n }\n\n return i;\n });\n this.updateRenderItemsList();\n this.emitComboboxChange();\n }}\n />\n </z-list-element>\n );\n }\n\n private renderList(items: ComboItem[]): HTMLUListElement {\n if (!items) {\n return;\n }\n if (!items.length && this.searchValue) {\n return this.renderNoSearchResults();\n }\n\n if (this.hasgroupitems) {\n return this.renderGroups(items);\n }\n\n return (\n <ul role=\"none\">\n {items.map((item, i) => {\n return this.renderItem(item, i, items.length);\n })}\n </ul>\n );\n }\n\n private renderGroups(items: ComboItem[]): HTMLUListElement {\n const newData = items.reduce((group, item, index) => {\n const {category} = item;\n const zListItem = this.renderItem(item, index, items.length);\n\n group[category] = group[category] ?? [];\n group[category].push(zListItem);\n\n return group;\n }, {});\n\n const listGroups = Object.entries(newData as {[key: string]: HTMLZListElementElement[]}).map(([key, value]) => {\n return (\n <z-list-group divider-type={ListDividerType.ELEMENT}>\n <span\n class=\"body-3-sb z-list-group-title\"\n slot=\"header-title\"\n >\n {key}\n </span>\n {value.map((item) => item)}\n </z-list-group>\n );\n });\n\n return <ul role=\"none\">{listGroups}</ul>;\n }\n\n private renderNoSearchResults(): HTMLUListElement {\n return (\n <ul role=\"none\">\n <z-myz-list-item\n id=\"no-results\"\n text={this.noresultslabel}\n listitemid=\"no-results\"\n icon=\"multiply-circle\"\n class={this.size}\n />\n </ul>\n );\n }\n\n private renderCloseButton(): HTMLDivElement {\n return (\n <div>\n <a\n onClick={() => this.closeFilterItems()}\n onKeyUp={(e: KeyboardEvent) => handleKeyboardSubmit(e, this.closeFilterItems)}\n role=\"button\"\n tabindex={0}\n >\n {this.closesearchtext}\n </a>\n </div>\n );\n }\n\n private getComboboxA11yAttributes(): Record<string, unknown> {\n return {\n \"role\": \"combobox\",\n \"aria-expanded\": this.isopen ? \"true\" : \"false\",\n \"aria-activedescendant\": this.isopen ? this.focusedItemId : \"\",\n \"aria-controls\": `${this.inputid}_list`,\n };\n }\n\n private renderSearchInput(): ZInput {\n return (\n <z-input\n htmlid={`${this.inputid}_search`}\n label={this.searchlabel}\n placeholder={this.searchplaceholder}\n htmltitle={this.searchtitle}\n type={this.inputType}\n value={this.searchValue}\n message={false}\n size={this.size}\n aria-autocomplete=\"list\"\n {...this.getComboboxA11yAttributes()}\n onKeyUp={(e: KeyboardEvent) => {\n if (e.key === KeyboardCode.ESC) {\n this.closeFilterItems();\n }\n }}\n onInputChange={(e: CustomEvent) => {\n this.searchValue = e.detail.value;\n }}\n />\n );\n }\n\n private renderCheckAll(): HTMLDivElement {\n if (this.searchValue) {\n return;\n }\n\n const allChecked = this.selectedCounter === this.itemsList.length;\n\n return (\n <div class=\"check-all-wrapper\">\n <z-input\n type={InputType.CHECKBOX}\n checked={allChecked}\n htmlid={this.getCheckAllId()}\n class={this.getCheckboxClass()}\n label={allChecked ? this.uncheckalltext : this.checkalltext}\n disabled={this.hasCheckAllDisabled()}\n size={this.size === ControlSize.X_SMALL ? ControlSize.SMALL : this.size}\n role=\"option\"\n aria-selected={allChecked ? \"true\" : \"false\"}\n onKeyDown={(e: KeyboardEvent) => this.handleSelectArrowsNavigation(e, -1)}\n onInputCheck={(e: CustomEvent) => {\n this.checkAll(e.detail.checked);\n }}\n />\n </div>\n );\n }\n\n render(): HTMLDivElement {\n return (\n <div\n data-action={`combo-${this.inputid}`}\n class={{open: this.isopen, fixed: this.isfixed, disabled: this.disabled}}\n id={this.inputid}\n >\n {this.renderHeader()}\n {!this.disabled && this.renderContent()}\n </div>\n );\n }\n}\n"],"mappings":"qLAAA,MAAMA,EAAY,i2HAClB,MAAAC,EAAeD,E,MCUFE,EAAS,MA4FpB,UAAAC,GACEC,KAAKC,iBAAmBD,KAAKE,QAAU,SAAWC,KAAKC,MAAMJ,KAAKE,OAASF,KAAKE,MAChFF,KAAKK,gBAAkBL,KAAKC,UAAUK,QAAQC,GAASA,EAAKC,UAASC,OACrET,KAAKU,uB,CAIP,gBAAAC,GACEX,KAAKY,YAAYZ,KAAKa,aACtB,MAAMC,EAAOd,KAAKe,QAAQC,WAAWC,cAAc,IAAIjB,KAAKkB,4BAC5D,GAAIJ,EAAM,CACRA,EAAKK,aAAa,WAAY,I,EAKlC,qBAAAC,CAAsBC,GACpBrB,KAAKsB,cAAgBD,EAAEE,M,CAOjB,kBAAAC,GACNxB,KAAKyB,eAAeC,KAAK,CAACC,GAAI3B,KAAK4B,QAAS1B,MAAOF,KAAKC,W,CAG1D,WAAA4B,CAAAC,G,yDAjCQ9B,KAAAC,UAAyB,GAEzBD,KAAA+B,UAAuBC,EAAUC,K,+EAxEpB,M,eAIC,M,2GAgBI,mB,YAIjB,M,aAIC,M,qBAIiB,S,iBAIH,M,kBAIA,kB,oBAIE,oB,uBAIN,E,uCAQCC,EAAYC,I,+EASF,G,6BAuC7BnC,KAAKoC,eAAiBpC,KAAKoC,eAAeC,KAAKrC,MAC/CA,KAAKsC,iBAAmBtC,KAAKsC,iBAAiBD,KAAKrC,K,CAGrD,iBAAAuC,GACEvC,KAAKD,Y,CAGP,mBAAAyC,GACExC,KAAKK,gBAAkBL,KAAKC,UAAUK,QAAQC,GAASA,EAAKC,UAASC,M,CAG/D,oBAAAgC,G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AAYzH,KAAKsG,gB"}
@@ -1,2 +0,0 @@
1
- import{p as e,H as a,b as t}from"./p-10bb4f4b.js";export{s as setNonce}from"./p-10bb4f4b.js";const i=()=>{{o(a.prototype)}const t=import.meta.url;const i={};if(t!==""){i.resourcesUrl=new URL(".",t).href}return e(i)};const o=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const i=this.childNodes;if(e){for(let e=0;e<i.length;e++){if(i[e].nodeType!==2){t.appendChild(i[e].cloneNode(true))}}}return t}};i().then((e=>t(JSON.parse('[["p-2b2cb566",[[1,"z-app-header",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"resultsEllipsis":[4,"results-ellipsis"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[1028,"skip-load-animation"]},null,{"open":["onOpenChanged"]}],[6,"z-tag",{"icon":[1],"expandable":[4]}],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-element",{"alignButton":[513,"align-button"],"clickable":[516],"dividerColor":[1,"divider-color"],"dividerType":[1,"divider-type"],"dividerSize":[1,"divider-size"],"expandable":[516],"expandableStyle":[1,"expandable-style"],"listElementId":[514,"list-element-id"],"size":[513],"color":[513],"disabled":[516],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"role":[513],"htmlTabindex":[2,"html-tabindex"],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"]}],[2,"z-input",{"htmlid":[1],"type":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"ariaExpanded":[1,"aria-expanded"],"ariaControls":[1,"aria-controls"],"ariaAutocomplete":[1,"aria-autocomplete"],"ariaActivedescendant":[1,"aria-activedescendant"],"value":[1025],"disabled":[516],"readonly":[4],"required":[4],"checked":[1028],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"labelPosition":[1,"label-position"],"autocomplete":[1],"role":[1],"hasclearicon":[4],"icon":[1],"min":[2],"minlength":[2],"max":[2],"maxlength":[2],"step":[2],"pattern":[1],"size":[513],"innerTabIndex":[2,"inner-tab-index"],"isTyping":[32],"passwordHidden":[32],"isChecked":[64]},[[4,"inputCheck","inputCheckListener"]]],[6,"z-button",{"ariaLabel":[513,"aria-label"],"role":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"size":[513]}],[1,"z-input-message",{"message":[1],"status":[513],"statusRole":[32]},null,{"message":["onMessageChange"],"status":["onMessageChange"]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[1,"z-icon",{"name":[1],"height":[2],"width":[2],"iconid":[1],"fill":[1]}]]],["p-2df884ef",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"],"searchValue":["watchSearchValue"]}]]],["p-a7e61213",[[2,"z-select",{"htmlid":[1],"items":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"readonly":[4],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"autocomplete":[4],"noresultslabel":[1],"hasGroupItems":[4,"has-group-items"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"]}]]],["p-34541d7c",[[1,"z-breadcrumb",{"pathStyle":[513,"path-style"],"homepageVariant":[1,"homepage-variant"],"maxNodesToShow":[2,"max-nodes-to-show"],"preventFollowUrl":[4,"prevent-follow-url"],"overflowMenuItemRows":[2,"overflow-menu-item-rows"],"truncateChar":[2,"truncate-char"],"viewPortWidth":[32],"hasOverflow":[32],"popoverEllipsisOpen":[32]},[[9,"resize","handleResize"]],{"maxNodesToShow":["handlePropChange"],"viewPortWidth":["handleResizeUp"]}]]],["p-942e5126",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-5023f7d5",[[1,"z-file-upload",{"type":[513],"buttonVariant":[1,"button-variant"],"acceptedFormat":[1,"accepted-format"],"fileMaxSize":[2,"file-max-size"],"mainTitle":[1,"main-title"],"description":[1],"uploadBtnLabel":[1,"upload-btn-label"],"dragAndDropLabel":[1,"drag-and-drop-label"],"files":[32],"invalidFiles":[32],"getFiles":[64]},[[0,"removeFile","removeFileListener"],[0,"fileDropped","fileDroppedListener"]]]]],["p-95104b91",[[1,"z-messages-pocket",{"pocketid":[1],"messages":[2],"status":[1025]},[[16,"pocketToggle","handlePocketToggle"]]]]],["p-67450112",[[0,"z-pagination",{"label":[1],"navArrows":[4,"nav-arrows"],"totalPages":[2,"total-pages"],"skip":[2],"edges":[4],"split":[2],"visiblePages":[2,"visible-pages"],"currentPage":[1026,"current-page"],"goToPage":[4,"go-to-page"],"_visiblePages":[32],"isMobile":[32],"goToPageValue":[32]},[[9,"resize","onResize"]],{"_visiblePages":["setPagesContainerWidth"],"visiblePages":["setVisiblePages"],"currentPage":["onPageChanged"],"split":["onSplitChanged"]}]]],["p-93cb103f",[[1,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[516],"arrowsPosition":[513,"arrows-position"],"progressMode":[1,"progress-mode"],"fixedArrows":[516,"fixed-arrows"],"ghostLoadingHeight":[2,"ghost-loading-height"],"infinite":[4],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},null,{"current":["onIndexChange"],"single":["onSingleModeChange"],"infinite":["onInfiniteModeChange"]}]]],["p-0d799f83",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"flatpickrPosition":[32],"inputError":[32]},[[18,"keydown","handleKeyDown"]],{"mode":["setupPickers"]}]]],["p-54681ece",[[2,"z-file",{"fileNumber":[2,"file-number"],"fileName":[1,"file-name"],"allowPopover":[32],"popoverVisible":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]]],["p-fe6f5926",[[0,"z-range-picker",{"rangePickerId":[1,"range-picker-id"],"firstAriaLabel":[1,"first-aria-label"],"firstLabel":[1,"first-label"],"secondAriaLabel":[1,"second-aria-label"],"secondLabel":[1,"second-label"],"mode":[1],"firstPickerReadOnly":[4,"first-picker-read-only"],"lastPickerReadOnly":[4,"last-picker-read-only"],"firstPickerPlaceholder":[1,"first-picker-placeholder"],"lastPickerPlaceholder":[1,"last-picker-placeholder"],"flatpickrPosition":[32],"activeInput":[32],"firstInputError":[32],"lastInputError":[32]},[[18,"click","handleClick"],[18,"keyup","handleKeyDown"]],{"firstPickerReadOnly":["setupFirstPickersReadOnly"],"lastPickerReadOnly":["setupLastPickersReadOnly"],"mode":["setupPickers"]}]]],["p-1e4befc7",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-9b50a99a",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-acfde9fa",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"collapsed":[32]}]]],["p-05b39597",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-a53ab86e",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-5d67d311",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-6edd5dbe",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-49407985",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]},null,{"isDisabled":["onDisabledChange"]}]]],["p-f9ddfc93",[[1,"z-book-card",{"variant":[1],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"ribbon":[1],"ribbonIcon":[1,"ribbon-icon"],"ribbonInteractive":[4,"ribbon-interactive"],"borderless":[4],"fallbackCover":[1,"fallback-cover"],"operaTitleTag":[1,"opera-title-tag"],"isMobile":[32],"hasResources":[32],"showResources":[32]}]]],["p-d973f170",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-2f2f460a",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-0681692a",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-5eb0a064",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"open":[32],"currentIndex":[32]},null,{"currentIndex":["watchItems"]}]]],["p-d1f8ca38",[[1,"z-link",{"htmlid":[1],"href":[1],"target":[1],"htmltabindex":[2],"isdisabled":[4],"isactive":[4],"iswhite":[4],"textcolor":[1],"icon":[1],"big":[516],"iconposition":[1],"underline":[4],"iconSize":[32]}]]],["p-7c5b1265",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-a9d42b98",[[1,"z-menu-section",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-00d7315a",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-60e11155",[[4,"z-navigation-tabs",{"ariaLabel":[1,"aria-label"],"orientation":[513],"size":[513],"selectedTab":[1026,"selected-tab"],"canNavigate":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},[[0,"click","handleTabClick"],[0,"focusin","onTabFocusIn"],[0,"keydown","navigateThroughTabs"],[0,"focusout","onTabFocusOut"]],{"canNavigate":["checkScrollEnabled"],"selectedTab":["onTabSelected"]}]]],["p-f0653be6",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-9f979c92",[[6,"z-panel-elem",{"elemid":[1],"imgurl":[1],"imgalt":[1],"linkicon":[1],"linklabel":[1],"url":[1],"target":[1],"isdisabled":[4],"descrSlotName":[1,"descr-slot-name"]}]]],["p-dbc437d8",[[1,"z-pocket-message"]]],["p-8d81a5c8",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-c49ca2a9",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-b574f1be",[[1,"z-toast-notification",{"heading":[1],"message":[1],"closebutton":[4],"autoclose":[2],"pauseonfocusloss":[4],"type":[1],"isdraggable":[4],"draggablepercentage":[2],"transition":[1],"percentage":[32]},null,{"isdraggable":["watchPropIsdraggable"],"autoclose":["watchPropAutoclose"],"pauseonfocusloss":["watchPropPauseonfocusloss"]}]]],["p-303663a9",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-5bb776c9",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-38dd5e41",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-dd3cc9a7",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-bc956e60",[[4,"z-aria-alert",{"mode":[1]}]]],["p-21735a65",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-b57362ef",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-3c87d5e2",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-04755b76",[[1,"z-myz-card-footer",{"titolo":[1],"autori":[1],"isbn":[1],"faded":[4],"cardtype":[1],"opened":[4],"customContent":[4,"custom-content"],"isOpen":[32],"allowTooltipAuthors":[32]},[[0,"toggleClick","handleToggle"]]]]],["p-120a809e",[[1,"z-myz-card-footer-sections"]]],["p-996c1471",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-24ab494d",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-9f47cebe",[[1,"z-stepper"]]],["p-4691b59a",[[1,"z-stepper-item",{"index":[2],"href":[1],"pressed":[4],"disabled":[4]}]]],["p-158b6dda",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-1de0e2a1",[[1,"z-tbody"]]],["p-13a93aef",[[1,"z-tfoot",{"sticky":[516]}]]],["p-f088324c",[[1,"z-thead",{"sticky":[516]}]]],["p-c2110712",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-4c40561d",[[1,"z-visually-hidden"]]],["p-b3c92412",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-b670ffa5",[[1,"z-alert",{"type":[1]}]]],["p-d251f105",[[1,"z-ghost-loading"]]],["p-52fa5f80",[[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]],[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"]}]]],["p-a8901c35",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-239fb968",[[1,"z-pocket",{"pocketid":[1],"status":[1025],"open":[64],"close":[64]},[[0,"pocketHeaderClick","handlePocketHeaderClick"],[0,"pocketHeaderPan","handlePocketHeaderPan"]],{"status":["watchStatusHandler"]}],[1,"z-pocket-body",{"pocketid":[1],"status":[1025]},[[16,"pocketToggle","handlePocketToggle"]]],[1,"z-pocket-header",{"pocketid":[1]}]]],["p-d92765b6",[[1,"z-myz-card",{"faded":[4],"cardtype":[1],"ispressed":[4],"ishighlighted":[4]}],[1,"z-myz-card-body"],[1,"z-myz-card-cover",{"img":[1],"titolo":[1],"faded":[4],"defaultimg":[1]}],[1,"z-myz-card-header",{"titolo":[1],"faded":[4],"cardtype":[1],"allowTooltip":[32]}]]],["p-2637ab23",[[1,"z-popover",{"position":[513],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]],{"position":["validatePosition"],"open":["onOpen"]}]]]]'),e)));
2
- //# sourceMappingURL=web-components-library.esm.js.map
@@ -1,2 +0,0 @@
1
- import{r as i,c as t,h as e,a as n,g as s}from"./p-10bb4f4b.js";import{w as a,p as r,D as o}from"./p-025f494e.js";import{g as l}from"./p-955da62e.js";import"./p-2c886e8b.js";const c=':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;padding:calc(var(--space-unit) * 2)}: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:calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);font-size:calc(var(--space-unit) * 3);font-weight:var(--font-sb)}: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;font-size:calc(var(--space-unit) * 2);font-weight:var(--font-sb)}:host([type="dragdrop"])>.container>.files-container>.heading-4-sb{margin-top:0;margin-bottom:calc(var(--space-unit) * 3)}: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}:host([type="dragdrop"])>.container>.files-container>z-divider{margin:calc(var(--space-unit) * 3) 0}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}:host .modal-wrapper{padding:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){:host .modal-wrapper{padding:calc(var(--space-unit) * 4)}}';const d=c;const p=class{constructor(e){i(this,e);this.fileInput=t(this,"fileInput",7);this.inputAttributes={type:"file",id:"file-elem",multiple:true};this.type=a.DEFAULT;this.buttonVariant=undefined;this.acceptedFormat=undefined;this.fileMaxSize=undefined;this.mainTitle=undefined;this.description=undefined;this.files=[];this.uploadBtnLabel="allega";this.dragAndDropLabel="Rilascia i file in questa area per allegarli.";this.invalidFiles=undefined}removeFileListener(i){const t=this.files;const e=t.find((t=>t.name===i.detail.fileName));if(e){const i=t.indexOf(e);if(i>=0){t.splice(i,1);this.files=[...t]}}}fileDroppedListener(i){this.input.files=i.detail;this.fileInputHandler()}componentDidUpdate(){this.handleAccessibility();this.invalidFiles.size&&this.errorModal.focus()}componentWillLoad(){this.invalidFiles=new Map}fileInputHandler(){if(this.input.files.length){this.invalidFiles=this.checkFiles(Array.from(this.input.files))}}async getFiles(){return this.files}getType(){if(l()!==r.DESKTOP&&l()!==r.DESKTOP_WIDE){return a.DEFAULT}return this.type}handleAccessibility(){const i=this.el.querySelector("z-file:last-child z-chip button");if(this.files.length>0&&i){i.focus()}else{this.getType()===a.DEFAULT?this.button.querySelector("button").focus():this.uploadLink.focus()}}checkFiles(i){const t=new Map;const e=`supera il limite di ${this.fileMaxSize}MB`;const n=" ha un'estensione non prevista";i.forEach((i=>{const s=i.size/1024/1024;const a=this.acceptedFormat.split(",").some((t=>i.name.toLowerCase().endsWith(t.trim())));const r=s<=this.fileMaxSize;if(r&&a){if(!this.files.find((t=>t.name===i.name))){this.files.push(i);this.fileInput.emit(i);this.input.value=""}return}t.set(i.name,[]);if(!r){t.get(i.name).push(e)}if(!a){t.get(i.name).push(n)}}));return t}renderTitle(){return e("span",{id:"title"},this.mainTitle)}renderDescription(i){return e("span",{class:i},this.description)}renderAllowedFileExtensions(){let i="";let t="";if(this.acceptedFormat){const t=this.acceptedFormat.split(", ").map((i=>i.substring(1).toUpperCase())).join(", ");i=` nei formati ${t}`}if(this.fileMaxSize){t=` per un massimo di ${this.fileMaxSize}MB di peso`}const n=`Puoi allegare file${i}${t}.`;return e("span",{class:"body-3"},i||t?n:null)}renderFileSection(){return e("section",{class:`files-container ${!this.files.length?"hidden":""}`},e("span",{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:i=>this.input=i}))}renderUploadButton(){return[this.renderInput(),e("z-button",{onClick:()=>this.input.click(),onKeyPress:i=>{if(i.code=="Space"||i.code=="Enter"){i.preventDefault();this.input.click()}},id:"fileSelect",variant:this.buttonVariant,icon:"upload",ref:i=>this.button=i},this.uploadBtnLabel)]}renderUploadLink(){return[this.renderInput(),e("span",{class:"body-1 upload-link-text"},"Trascina o"," ",e("span",{tabIndex:0,class:"body-1-sb upload-link",onClick:()=>this.input.click(),onKeyPress:i=>{if(i.code=="Space"||i.code=="Enter"){i.preventDefault();this.input.click()}},ref:i=>this.uploadLink=i},"carica")," ","dal tuo computer")]}renderDefaultMode(){return[this.renderDescription("body-3-sb"),this.renderAllowedFileExtensions(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),e("z-dragdrop-area",{"drag-and-drop-label":this.dragAndDropLabel},e("div",{class:"text-container"},this.renderDescription("body-1"),this.renderUploadLink(),this.renderAllowedFileExtensions()))]}formatErrorString(i,t){var e,n;const s=t[0]&&t[1]?", ed ":"";return`Il file ${i} ${(e=t[0])!==null&&e!==void 0?e:""}${s}${(n=t[1])!==null&&n!==void 0?n:""}.`}handleErrorModalContent(){return e("div",{slot:"modalContent"},e("div",{class:"modal-wrapper"},e("div",{class:"files"},Array.from(this.invalidFiles).map((([i,t])=>e("span",{class:"body-3"},this.formatErrorString(i,t)))))))}render(){return e(n,{key:"b098b42d074787675ee266cc25746d479c202c5b"},e("div",{key:"642c0c1c5e470dcbb57ce9975fd89ca138c196f4",tabIndex:0,class:`container ${this.getType()}`},this.mainTitle&&this.renderTitle(),this.getType()==a.DEFAULT?this.renderDefaultMode():this.renderDragDropMode()),!!this.invalidFiles.size&&e("z-modal",{modalid:`file-upload-${this.type}-error-modal`,tabIndex:0,ref:i=>this.errorModal=i,modaltitle:"Attenzione",onModalClose:()=>this.invalidFiles=new Map,onModalBackgroundClick:()=>this.invalidFiles=new Map},this.handleErrorModalContent()))}get el(){return s(this)}};p.style=d;export{p as z_file_upload};
2
- //# sourceMappingURL=p-5023f7d5.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stylesCss","ZFileUploadStyle0","ZFileUpload","this","inputAttributes","type","id","multiple","ZFileUploadType","DEFAULT","removeFileListener","e","files","file","find","name","detail","fileName","index","indexOf","splice","fileDroppedListener","input","fileInputHandler","componentDidUpdate","handleAccessibility","invalidFiles","size","errorModal","focus","componentWillLoad","Map","length","checkFiles","Array","from","getFiles","getType","getDevice","Device","DESKTOP","DESKTOP_WIDE","lastFile","el","querySelector","button","uploadLink","errors","sizeErrorString","fileMaxSize","formatErrorString","forEach","fileSize","fileFormatOk","acceptedFormat","split","some","ext","toLowerCase","endsWith","trim","fileSizeOk","f","push","fileInput","emit","value","set","get","renderTitle","h","mainTitle","renderDescription","cssClass","class","description","renderAllowedFileExtensions","fileFormatString","fileWeightString","fileFormat","map","string","substring","toUpperCase","join","finalString","renderFileSection","DividerSize","MEDIUM","renderInput","Object","assign","onChange","accept","ref","val","renderUploadButton","onClick","click","onKeyPress","code","preventDefault","variant","buttonVariant","icon","uploadBtnLabel","renderUploadLink","tabIndex","renderDefaultMode","renderDragDropMode","dragAndDropLabel","key","bothErrors","_a","_b","handleErrorModalContent","slot","render","Host","modalid","modaltitle","onModalClose","onModalBackgroundClick"],"sources":["src/components/file-upload/z-file-upload/styles.css?tag=z-file-upload&encapsulation=shadow","src/components/file-upload/z-file-upload/index.tsx"],"sourcesContent":[":host {\n color: var(--color-text01);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n:host > .container {\n display: flex;\n flex-direction: column;\n}\n\n:host .modal-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: calc(var(--space-unit) * 2);\n}\n\n:host .modal-wrapper > .files-wrapper {\n display: flex;\n flex-direction: column;\n margin: calc(var(--space-unit) * 4);\n gap: var(--space-unit);\n}\n\n:host .text-container {\n display: flex;\n flex-direction: column;\n margin: auto;\n}\n\n:host .text-container .body-1 {\n text-align: center;\n}\n\n:host .text-container .upload-link {\n color: var(--color-link-primary);\n cursor: pointer;\n}\n\n:host .text-container .upload-link-text {\n margin-bottom: var(--space-unit);\n}\n\ninput#file-elem {\n display: none;\n}\n\n#title {\n display: inline-block;\n margin: calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);\n font-size: calc(var(--space-unit) * 3);\n font-weight: var(--font-sb);\n}\n\n:host > .container > z-button {\n display: inline-block;\n margin-top: calc(var(--space-unit) * 3);\n}\n\n:host > .container > .files-container.hidden {\n display: none;\n}\n\n:host > .container > .files-container > .heading-4-sb {\n display: inline-block;\n margin: calc(var(--space-unit) * 3) 0;\n font-size: calc(var(--space-unit) * 2);\n font-weight: var(--font-sb);\n}\n\n:host([type=\"dragdrop\"]) > .container > .files-container > .heading-4-sb {\n margin-top: 0;\n margin-bottom: calc(var(--space-unit) * 3);\n}\n\n:host > .container > .files-container > .files-wrapper {\n display: flex;\n flex-wrap: wrap;\n column-gap: calc(var(--space-unit) * 2);\n row-gap: calc(var(--space-unit) * 2);\n}\n\n:host > .container > .files-container > z-divider {\n margin-top: calc(var(--space-unit) * 3);\n margin-bottom: 0;\n}\n\n:host([type=\"dragdrop\"]) > .container > .files-container > z-divider {\n margin: calc(var(--space-unit) * 3) 0;\n}\n\n/* Tablet breakpoint */\n@media only screen and (min-width: 768px) {\n :host > .container > z-button {\n align-self: flex-start;\n }\n\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 3);\n }\n}\n\n@media only screen and (min-width: 1152px) {\n :host .modal-wrapper {\n padding: calc(var(--space-unit) * 4);\n }\n}\n","import {Component, Prop, h, EventEmitter, Event, State, Listen, Element, Host, Method} from \"@stencil/core\";\nimport {ButtonVariant, Device, DividerSize, ZFileUploadType} from \"../../../beans\";\nimport {getDevice} from \"../../../utils/utils\";\n\n@Component({\n tag: \"z-file-upload\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZFileUpload {\n /** Prop indicating the file upload type - can be default or dragdrop */\n @Prop({reflect: true})\n type: ZFileUploadType = ZFileUploadType.DEFAULT;\n\n /** Prop indicating the button variant*/\n @Prop()\n buttonVariant?: ButtonVariant;\n\n /** Prop indicating the accepted file type: ex \".pdf, .doc, .jpg\" */\n @Prop()\n acceptedFormat?: string;\n\n /** Max file dimension in Megabyte */\n @Prop()\n fileMaxSize?: number;\n\n /** Title */\n @Prop()\n mainTitle?: string;\n\n /** Description */\n @Prop()\n description?: string;\n\n /** Files added by the user */\n @State()\n files: File[] = [];\n\n /** upoload button label */\n @Prop()\n uploadBtnLabel?: string = \"allega\";\n\n /** drag & drop button label */\n @Prop()\n dragAndDropLabel?: string = \"Rilascia i file in questa area per allegarli.\";\n\n /** List of files not allowed to be uploaded */\n @State()\n invalidFiles: Map<string, string[]>;\n\n @Element() el: HTMLZFileUploadElement;\n\n private input: HTMLInputElement;\n\n private button: HTMLZButtonElement;\n\n private errorModal: HTMLZModalElement;\n\n private uploadLink: HTMLSpanElement;\n\n private inputAttributes = {\n type: \"file\",\n id: \"file-elem\",\n multiple: true,\n };\n\n /** Listen removeFile event sent from z-file component */\n @Listen(\"removeFile\")\n removeFileListener(e: CustomEvent): void {\n const files = this.files;\n const file = files.find((file) => file.name === e.detail.fileName);\n if (file) {\n const index = files.indexOf(file);\n if (index >= 0) {\n files.splice(index, 1);\n this.files = [...files];\n }\n }\n }\n\n /** Listen fileDropped event sent from z-dragdrop-area component */\n @Listen(\"fileDropped\")\n fileDroppedListener(e: CustomEvent): void {\n this.input.files = e.detail;\n this.fileInputHandler();\n }\n\n componentDidUpdate(): void {\n this.handleAccessibility();\n this.invalidFiles.size && this.errorModal.focus();\n }\n\n componentWillLoad(): void {\n this.invalidFiles = new Map<string, string[]>();\n }\n\n /** Emitted when user select one or more files */\n @Event()\n fileInput: EventEmitter;\n\n private fileInputHandler(): void {\n if (this.input.files.length) {\n this.invalidFiles = this.checkFiles(Array.from(this.input.files));\n }\n }\n\n /** get array of uploaded files */\n @Method()\n async getFiles(): Promise<File[]> {\n return this.files;\n }\n\n private getType(): ZFileUploadType {\n if (getDevice() !== Device.DESKTOP && getDevice() !== Device.DESKTOP_WIDE) {\n return ZFileUploadType.DEFAULT;\n }\n\n return this.type;\n }\n\n private handleAccessibility(): void {\n const lastFile = this.el.querySelector(\"z-file:last-child z-chip button\");\n if (this.files.length > 0 && lastFile) {\n (lastFile as HTMLElement).focus();\n } else {\n this.getType() === ZFileUploadType.DEFAULT\n ? this.button.querySelector(\"button\").focus()\n : this.uploadLink.focus();\n }\n }\n\n private checkFiles(files: File[]): Map<string, string[]> {\n const errors = new Map<string, string[]>();\n const sizeErrorString = `supera il limite di ${this.fileMaxSize}MB`;\n const formatErrorString = \" ha un'estensione non prevista\";\n files.forEach((file: File) => {\n const fileSize = file.size / 1024 / 1024;\n const fileFormatOk = this.acceptedFormat\n .split(\",\")\n .some((ext: string) => file.name.toLowerCase().endsWith(ext.trim()));\n const fileSizeOk = fileSize <= this.fileMaxSize;\n if (fileSizeOk && fileFormatOk) {\n if (!this.files.find((f) => f.name === file.name)) {\n this.files.push(file);\n this.fileInput.emit(file);\n this.input.value = \"\";\n }\n\n return;\n }\n errors.set(file.name, []);\n if (!fileSizeOk) {\n errors.get(file.name).push(sizeErrorString);\n }\n if (!fileFormatOk) {\n errors.get(file.name).push(formatErrorString);\n }\n });\n\n return errors;\n }\n\n private renderTitle(): HTMLElement {\n return <span id=\"title\">{this.mainTitle}</span>;\n }\n\n private renderDescription(cssClass): HTMLElement {\n return <span class={cssClass}>{this.description}</span>;\n }\n\n private renderAllowedFileExtensions(): HTMLElement {\n let fileFormatString = \"\";\n let fileWeightString = \"\";\n\n if (this.acceptedFormat) {\n const fileFormat = this.acceptedFormat\n .split(\", \")\n .map((string) => string.substring(1).toUpperCase())\n .join(\", \");\n fileFormatString = ` nei formati ${fileFormat}`;\n }\n\n if (this.fileMaxSize) {\n fileWeightString = ` per un massimo di ${this.fileMaxSize}MB di peso`;\n }\n\n const finalString = `Puoi allegare file${fileFormatString}${fileWeightString}.`;\n\n return <span class=\"body-3\">{fileFormatString || fileWeightString ? finalString : null}</span>;\n }\n\n private renderFileSection(): HTMLElement {\n return (\n <section class={`files-container ${!this.files.length ? \"hidden\" : \"\"}`}>\n <span class=\"heading-4-sb\">File appena caricati</span>\n <div class=\"files-wrapper\">\n <slot name=\"files\" />\n </div>\n <z-divider size={DividerSize.MEDIUM} />\n </section>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n {...this.inputAttributes}\n onChange={() => this.fileInputHandler()}\n accept={this.acceptedFormat}\n ref={(val) => (this.input = val)}\n />\n );\n }\n\n private renderUploadButton(): unknown[] {\n return [\n this.renderInput(),\n <z-button\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n id=\"fileSelect\"\n variant={this.buttonVariant}\n icon=\"upload\"\n ref={(val) => (this.button = val)}\n >\n {this.uploadBtnLabel}\n </z-button>,\n ];\n }\n\n private renderUploadLink(): unknown[] {\n return [\n this.renderInput(),\n <span class=\"body-1 upload-link-text\">\n Trascina o{\" \"}\n <span\n tabIndex={0}\n class=\"body-1-sb upload-link\"\n onClick={() => this.input.click()}\n onKeyPress={(e) => {\n if (e.code == \"Space\" || e.code == \"Enter\") {\n e.preventDefault();\n this.input.click();\n }\n }}\n ref={(val) => (this.uploadLink = val)}\n >\n carica\n </span>{\" \"}\n dal tuo computer\n </span>,\n ];\n }\n\n private renderDefaultMode(): unknown[] {\n return [\n this.renderDescription(\"body-3-sb\"),\n this.renderAllowedFileExtensions(),\n this.renderFileSection(),\n this.renderUploadButton(),\n ];\n }\n\n private renderDragDropMode(): unknown[] {\n return [\n this.renderFileSection(),\n <z-dragdrop-area drag-and-drop-label={this.dragAndDropLabel}>\n <div class=\"text-container\">\n {this.renderDescription(\"body-1\")}\n {this.renderUploadLink()}\n {this.renderAllowedFileExtensions()}\n </div>\n </z-dragdrop-area>,\n ];\n }\n\n private formatErrorString(key, value): string {\n const bothErrors = value[0] && value[1] ? \", ed \" : \"\";\n\n return `Il file ${key} ${value[0] ?? \"\"}${bothErrors}${value[1] ?? \"\"}.`;\n }\n\n private handleErrorModalContent(): HTMLDivElement {\n return (\n <div slot=\"modalContent\">\n <div class=\"modal-wrapper\">\n <div class=\"files\">\n {Array.from(this.invalidFiles).map(([key, value]) => {\n return <span class=\"body-3\">{this.formatErrorString(key, value)}</span>;\n })}\n </div>\n </div>\n </div>\n );\n }\n\n render(): HTMLZFileUploadElement {\n return (\n <Host>\n <div\n tabIndex={0}\n class={`container ${this.getType()}`}\n >\n {this.mainTitle && this.renderTitle()}\n {this.getType() == ZFileUploadType.DEFAULT ? this.renderDefaultMode() : this.renderDragDropMode()}\n </div>\n {!!this.invalidFiles.size && (\n <z-modal\n modalid={`file-upload-${this.type}-error-modal`}\n tabIndex={0}\n ref={(val) => (this.errorModal = val)}\n modaltitle=\"Attenzione\"\n onModalClose={() => (this.invalidFiles = new Map<string, string[]>())}\n onModalBackgroundClick={() => (this.invalidFiles = new Map<string, string[]>())}\n >\n {this.handleErrorModalContent()}\n </z-modal>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"8KAAA,MAAMA,EAAY,21DAClB,MAAAC,EAAeD,E,MCQFE,EAAW,M,8DAmDdC,KAAAC,gBAAkB,CACxBC,KAAM,OACNC,GAAI,YACJC,SAAU,M,UAnDYC,EAAgBC,Q,qJAwBxB,G,oBAIU,S,sBAIE,gD,4BAwB5B,kBAAAC,CAAmBC,GACjB,MAAMC,EAAQT,KAAKS,MACnB,MAAMC,EAAOD,EAAME,MAAMD,GAASA,EAAKE,OAASJ,EAAEK,OAAOC,WACzD,GAAIJ,EAAM,CACR,MAAMK,EAAQN,EAAMO,QAAQN,GAC5B,GAAIK,GAAS,EAAG,CACdN,EAAMQ,OAAOF,EAAO,GACpBf,KAAKS,MAAQ,IAAIA,E,GAOvB,mBAAAS,CAAoBV,GAClBR,KAAKmB,MAAMV,MAAQD,EAAEK,OACrBb,KAAKoB,kB,CAGP,kBAAAC,GACErB,KAAKsB,sBACLtB,KAAKuB,aAAaC,MAAQxB,KAAKyB,WAAWC,O,CAG5C,iBAAAC,GACE3B,KAAKuB,aAAe,IAAIK,G,CAOlB,gBAAAR,GACN,GAAIpB,KAAKmB,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ACvBlE,KAAKkC,WAAa7B,EAAgBC,QAAUN,KAAKyG,oBAAsBzG,KAAK0G,wBAE5E1G,KAAKuB,aAAaC,MACnB2C,EAAA,WACEiD,QAAS,eAAepH,KAAKE,mBAC7BsG,SAAU,EACVb,IAAMC,GAAS5F,KAAKyB,WAAamE,EACjCyB,WAAW,aACXC,aAAc,IAAOtH,KAAKuB,aAAe,IAAIK,IAC7C2F,uBAAwB,IAAOvH,KAAKuB,aAAe,IAAIK,KAEtD5B,KAAKgH,2B"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as s,h as i,a as e,g as o}from"./p-10bb4f4b.js";import{R as r,U as a,B as n}from"./p-025f494e.js";const l=':host{font-family:var(--font-family-sans);font-weight:var(--font-rg);--z-carousel-gutter:0}:host([single]){display:flex;flex-direction:column;align-items:center;justify-content:center}:host([single]) .z-carousel-container{width:fit-content;max-width:100%}.z-carousel-container{display:flex;flex-direction:column}.z-carousel-title{margin-bottom:calc(var(--space-unit) * 2)}.z-carousel-wrapper{position:relative}.z-carousel-items-container{display:flex;max-width:100%;flex-direction:row;margin:0;column-gap:var(--z-carousel-gutter);list-style:none;-ms-overflow-style:none;overflow-x:scroll;padding-inline-start:0;scroll-behavior:smooth;scroll-snap-type:x mandatory;scrollbar-width:none;}.z-carousel-items-container::-webkit-scrollbar{display:none}.z-carousel-items-container ::slotted(*){scroll-snap-align:center}.z-carousel-navigation-arrow[hidden]{display:none}.z-carousel-navigation-arrow[data-direction]{position:absolute;bottom:50%;transform:translateY(50%)}.z-carousel-navigation-arrow[data-direction="next"]{right:0}:host(:not([fixed-arrows])) .z-carousel-wrapper .z-carousel-navigation-arrow{display:none}.z-carousel-footer{display:flex;flex-direction:row;align-items:center;justify-content:center;column-gap:calc(var(--space-unit) * 3)}:host([arrows-position="bottom"]) .z-carousel-footer{margin-top:calc(var(--space-unit) * 0.75)}.z-carousel-footer .numbers-progress,.z-carousel-footer .dots-progress{display:flex;align-items:center;justify-content:center}.z-carousel-footer .dots-progress{column-gap:calc(var(--space-unit) * 3)}:host(:not([arrows-position="bottom"])) .z-carousel-footer .dots-progress{margin-top:calc(var(--space-unit) * 2)}.z-carousel-footer .dots-progress button{display:flex;width:calc(var(--space-unit) * 3);height:calc(var(--space-unit) * 3);align-items:center;padding:0;border:none;margin:0;background-color:var(--color-surface03);border-radius:calc(var(--space-unit) * 3)}.z-carousel-footer .dots-progress button.current{background-color:var(--color-primary01)}.z-carousel-footer .dots-progress button:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}.z-carousel-footer .dots-progress button:not(.current){cursor:pointer}.z-carousel-footer .numbers-progress{column-gap:calc(var(--space-unit) / 2)}:host(:not([arrows-position="bottom"])) .z-carousel-footer .numbers-progress{margin-top:var(--space-unit)}.z-carousel-footer .numbers-progress .current{font-weight:var(--font-sb)}@media (min-width: 768px){:host(:not([fixed-arrows])) .z-carousel-wrapper:hover .z-carousel-navigation-arrow:not([hidden]){display:flex}}';const h=l;const c=class{constructor(i){t(this,i);this.indexChange=s(this,"indexChange",7);this.scrollingTo=null;this.isLoading=undefined;this.label=undefined;this.single=false;this.arrowsPosition=undefined;this.progressMode=undefined;this.fixedArrows=true;this.ghostLoadingHeight=100;this.infinite=false;this.current=0;this.items=undefined;this.highlightedIndicator=undefined;this.canNavigatePrev=undefined;this.canNavigateNext=undefined}onIndexChange(){this.indexChange.emit({currentItem:this.current})}onSingleModeChange(){if(this.single&&!this.intersectionObserver){this.setIntersectionObserver()}}onInfiniteModeChange(){this.checkNavigationValidity()}setIntersectionObserver(){this.intersectionObserver=new IntersectionObserver((t=>{const s=t.find((({isIntersecting:t})=>t));if(!s){return}const i=this.items.findIndex((t=>t===s.target));this.highlightedIndicator=i;if(this.scrollingTo!==null&&i!==this.scrollingTo){return}this.scrollingTo=null;this.current=i}),{root:this.itemsContainer,threshold:.5});this.items.forEach((t=>this.intersectionObserver.observe(t)))}onSlotChange(){this.items=Array.from(this.host.children);this.checkNavigationValidity();this.setIntersectionObserver();this.goTo(this.current)}onPrev(){if(this.single){this.goTo(this.infinite&&this.current-1<0?this.items.length-1:Math.max(0,this.current-1));return}this.itemsContainer.scrollBy({left:this.infinite&&this.itemsContainer.scrollLeft==0?this.itemsContainer.scrollWidth-this.itemsContainer.clientWidth:-this.itemsContainer.clientWidth/2,behavior:"smooth"})}onNext(){if(this.single){const t=this.infinite&&this.current+1>this.items.length-1?0:Math.min(this.current+1,this.items.length-1);return this.goTo(t)}this.itemsContainer.scrollBy({left:this.infinite&&this.itemsContainer.scrollLeft==this.itemsContainer.scrollWidth-this.itemsContainer.clientWidth?-this.itemsContainer.scrollWidth:this.itemsContainer.clientWidth/2,behavior:"smooth"})}checkNavigationValidity(){if(this.single){this.canNavigatePrev=this.current>0;this.canNavigateNext=this.current<this.items.length-1;return}this.canNavigatePrev=this.itemsContainer.scrollLeft>0;this.canNavigateNext=this.itemsContainer.scrollLeft<this.itemsContainer.scrollWidth-this.itemsContainer.clientWidth}canShowFooter(){if(!this.canNavigatePrev&&!this.canNavigateNext){return false}return this.arrowsPosition===r.BOTTOM||this.progressMode===a.DOTS||this.progressMode===a.NUMBERS}goTo(t){if(this.current===t){return}this.scrollingTo=t;const s=this.items.slice(0,t).reduce(((t,s)=>t+=s.clientWidth),0);this.itemsContainer.scroll({left:s,behavior:"smooth"})}get canNavigate(){return this.canNavigatePrev||this.canNavigateNext}setupItems(){this.items=Array.from(this.host.children);this.items.forEach((t=>{t.setAttribute("role","group");t.setAttribute("aria-roledescription","slide")}))}componentDidLoad(){this.itemsContainer.addEventListener("scroll",this.checkNavigationValidity.bind(this),{passive:true});this.resizeObserver=new ResizeObserver(this.checkNavigationValidity.bind(this));this.resizeObserver.observe(this.itemsContainer);this.setupItems();if(this.single){this.setIntersectionObserver()}this.checkNavigationValidity()}disconnectedCallback(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()}render(){if(this.isLoading){return i("div",{class:"z-carousel-container"},this.label&&i("div",{class:"heading-3-sb z-carousel-title"},this.label),i("div",{style:{height:`${this.ghostLoadingHeight}px`}},i("z-ghost-loading",null)))}return i(e,null,i("div",{class:"z-carousel-container",role:"group","aria-roledescription":"carousel","aria-label":this.label||"Carousel"},this.label&&i("div",{class:"z-carousel-title heading-3-sb"},this.label),i("div",{class:"z-carousel-wrapper"},i("z-button",{class:"z-carousel-navigation-arrow",variant:n.SECONDARY,"data-direction":"prev",icon:"arrow-left",onClick:this.onPrev.bind(this),disabled:!this.infinite&&!this.canNavigatePrev,hidden:this.arrowsPosition!==r.OVER||!this.canNavigate,ariaLabel:this.single?"Mostra l'elemento precedente":"Mostra gli elementi precedenti"}),i("ul",{class:"z-carousel-items-container","aria-atomic":"false","aria-live":"polite",ref:t=>this.itemsContainer=t},i("slot",{onSlotchange:this.onSlotChange.bind(this)})),i("z-button",{class:"z-carousel-navigation-arrow",variant:n.SECONDARY,"data-direction":"next",icon:"arrow-right",onClick:this.onNext.bind(this),disabled:!this.infinite&&!this.canNavigateNext,hidden:this.arrowsPosition!==r.OVER||!this.canNavigate,ariaLabel:this.single?"Mostra l'elemento successivo":"Mostra gli elementi successivi"}))),this.canShowFooter()&&i("div",{class:"z-carousel-footer"},this.arrowsPosition===r.BOTTOM&&i("z-button",{class:"z-carousel-navigation-arrow",variant:n.TERTIARY,icon:"arrow-left",onClick:this.onPrev.bind(this),disabled:!this.infinite&&!this.canNavigatePrev,ariaLabel:this.single?"Mostra l'elemento precedente":"Mostra gli elementi precedenti"}),this.progressMode===a.DOTS&&this.single&&this.items&&i("div",{class:"dots-progress"},this.items.map(((t,s)=>i("button",{type:"button",class:{current:this.highlightedIndicator===s},"aria-label":this.highlightedIndicator===s?"Elemento corrente":`Spostati all'elemento ${s+1}`,onClick:()=>this.goTo(s)})))),this.progressMode===a.NUMBERS&&this.single&&this.items&&i("div",{class:"numbers-progress interactive-1"},i("span",{class:"current"},this.current+1),i("span",null,"di"),i("span",null,this.items.length)),this.arrowsPosition===r.BOTTOM&&i("z-button",{class:"z-carousel-navigation-arrow",variant:n.TERTIARY,icon:"arrow-right",onClick:this.onNext.bind(this),disabled:!this.infinite&&!this.canNavigateNext,ariaLabel:this.single?"Mostra l'elemento successivo":"Mostra gli elementi successivi"})))}get host(){return o(this)}static get watchers(){return{current:["onIndexChange"],single:["onSingleModeChange"],infinite:["onInfiniteModeChange"]}}};c.style=h;export{c as z_carousel};
2
- //# sourceMappingURL=p-93cb103f.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stylesCss","ZCarouselStyle0","ZCarousel","this","scrollingTo","onIndexChange","indexChange","emit","currentItem","current","onSingleModeChange","single","intersectionObserver","setIntersectionObserver","onInfiniteModeChange","checkNavigationValidity","IntersectionObserver","entries","entry","find","isIntersecting","entryIndex","items","findIndex","item","target","highlightedIndicator","root","itemsContainer","threshold","forEach","element","observe","onSlotChange","Array","from","host","children","goTo","onPrev","infinite","length","Math","max","scrollBy","left","scrollLeft","scrollWidth","clientWidth","behavior","onNext","next","min","canNavigatePrev","canNavigateNext","canShowFooter","arrowsPosition","CarouselArrowsPosition","BOTTOM","progressMode","CarouselProgressMode","DOTS","NUMBERS","index","slice","reduce","acc","scroll","canNavigate","setupItems","setAttribute","componentDidLoad","addEventListener","bind","passive","resizeObserver","ResizeObserver","disconnectedCallback","_a","disconnect","render","isLoading","h","class","label","style","height","ghostLoadingHeight","Host","role","variant","ButtonVariant","SECONDARY","icon","onClick","disabled","hidden","OVER","ariaLabel","ref","el","onSlotchange","TERTIARY","map","_","type"],"sources":["src/components/z-carousel/styles.css?tag=z-carousel&encapsulation=shadow","src/components/z-carousel/index.tsx"],"sourcesContent":[":host {\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n\n --z-carousel-gutter: 0;\n}\n\n:host([single]) {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n:host([single]) .z-carousel-container {\n width: fit-content;\n max-width: 100%;\n}\n\n.z-carousel-container {\n display: flex;\n flex-direction: column;\n}\n\n.z-carousel-title {\n margin-bottom: calc(var(--space-unit) * 2);\n}\n\n.z-carousel-wrapper {\n position: relative;\n}\n\n.z-carousel-items-container {\n display: flex;\n max-width: 100%;\n flex-direction: row;\n margin: 0;\n column-gap: var(--z-carousel-gutter);\n list-style: none;\n -ms-overflow-style: none; /* IE and Edge */\n overflow-x: scroll;\n padding-inline-start: 0;\n scroll-behavior: smooth;\n scroll-snap-type: x mandatory;\n\n /* Hide scrollbar for IE, Edge and Firefox */\n scrollbar-width: none; /* Firefox */\n}\n\n/* Hide scrollbar for Chrome, Safari and Opera */\n.z-carousel-items-container::-webkit-scrollbar {\n display: none;\n}\n\n.z-carousel-items-container ::slotted(*) {\n scroll-snap-align: center;\n}\n\n.z-carousel-navigation-arrow[hidden] {\n display: none;\n}\n\n.z-carousel-navigation-arrow[data-direction] {\n position: absolute;\n bottom: 50%;\n transform: translateY(50%);\n}\n\n.z-carousel-navigation-arrow[data-direction=\"next\"] {\n right: 0;\n}\n\n:host(:not([fixed-arrows])) .z-carousel-wrapper .z-carousel-navigation-arrow {\n display: none;\n}\n\n.z-carousel-footer {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n column-gap: calc(var(--space-unit) * 3);\n}\n\n:host([arrows-position=\"bottom\"]) .z-carousel-footer {\n margin-top: calc(var(--space-unit) * 0.75);\n}\n\n.z-carousel-footer .numbers-progress,\n.z-carousel-footer .dots-progress {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.z-carousel-footer .dots-progress {\n column-gap: calc(var(--space-unit) * 3);\n}\n\n:host(:not([arrows-position=\"bottom\"])) .z-carousel-footer .dots-progress {\n margin-top: calc(var(--space-unit) * 2);\n}\n\n.z-carousel-footer .dots-progress button {\n display: flex;\n width: calc(var(--space-unit) * 3);\n height: calc(var(--space-unit) * 3);\n align-items: center;\n padding: 0;\n border: none;\n margin: 0;\n background-color: var(--color-surface03);\n border-radius: calc(var(--space-unit) * 3);\n}\n\n.z-carousel-footer .dots-progress button.current {\n background-color: var(--color-primary01);\n}\n\n.z-carousel-footer .dots-progress button:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n.z-carousel-footer .dots-progress button:not(.current) {\n cursor: pointer;\n}\n\n.z-carousel-footer .numbers-progress {\n column-gap: calc(var(--space-unit) / 2);\n}\n\n:host(:not([arrows-position=\"bottom\"])) .z-carousel-footer .numbers-progress {\n margin-top: var(--space-unit);\n}\n\n.z-carousel-footer .numbers-progress .current {\n font-weight: var(--font-sb);\n}\n\n@media (min-width: 768px) {\n :host(:not([fixed-arrows])) .z-carousel-wrapper:hover .z-carousel-navigation-arrow:not([hidden]) {\n display: flex;\n }\n}\n","import {Component, h, Prop, Element, Watch, Event, EventEmitter, State, Host} from \"@stencil/core\";\nimport {CarouselArrowsPosition, CarouselProgressMode, ButtonVariant} from \"../../beans\";\n\n/**\n * ZCarousel component.\n * @cssprop --z-carousel-gutter - The gutter between items.\n * @slot - Carousel items. Use `<li>` elements inside this slot.\n */\n@Component({\n tag: \"z-carousel\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZCarousel {\n @Element() host: HTMLZCarouselElement;\n\n /** The z-carousel is on loading state */\n @Prop()\n isLoading: boolean;\n\n /** The z-carousel title */\n @Prop()\n label?: string;\n\n /** Shows only one content at a time */\n @Prop({reflect: true})\n single = false;\n\n /** Arrow buttons position */\n @Prop({reflect: true})\n arrowsPosition?: CarouselArrowsPosition;\n\n /** Progress indicator type. Only available for `single` mode */\n @Prop()\n progressMode?: CarouselProgressMode;\n\n /**\n * Whether the navigation arrow buttons over the items are always visible or only on mouse hover.\n * If set to `false`, the arrows will not be visible on mobile.\n * Only meaningful with `arrowsPosition` set to `OVER`.\n */\n @Prop({reflect: true})\n fixedArrows = true;\n\n /** The height of the ghost loader (only visible when `isLoading` is set to `true`) */\n @Prop()\n ghostLoadingHeight = 100;\n\n /** When enabled, navigating next the last item will go back to the first item and vice versa. */\n @Prop()\n infinite = false;\n\n /** Current item index for single mode. */\n @State()\n current = 0;\n\n /** Items on the slider. */\n @State()\n items: HTMLLIElement[];\n\n /** Index of the indicator to highlight. */\n @State()\n highlightedIndicator: number;\n\n @State()\n canNavigatePrev: boolean;\n\n @State()\n canNavigateNext: boolean;\n\n /** Reference for the items container element. */\n protected itemsContainer: HTMLUListElement;\n\n /** Observer that handles current index change when scrolling on single mode. */\n private intersectionObserver: IntersectionObserver;\n\n /** Observer to check if navigation can still be enabled/showed when the size of the items' container changes */\n private resizeObserver: ResizeObserver;\n\n /** Flag indicating the items container is about to scroll programmatically towards the stored index. */\n private scrollingTo: number = null;\n\n /** Emitted on index change and only in `single` mode. */\n @Event()\n indexChange: EventEmitter<{currentItem: number}>;\n\n @Watch(\"current\")\n onIndexChange(): void {\n this.indexChange.emit({currentItem: this.current});\n }\n\n @Watch(\"single\")\n onSingleModeChange(): void {\n if (this.single && !this.intersectionObserver) {\n this.setIntersectionObserver();\n }\n }\n\n @Watch(\"infinite\")\n onInfiniteModeChange(): void {\n this.checkNavigationValidity();\n }\n\n /**\n * Set an intersection observer to:\n * - highlight the indicator of the intersecting item during scroll\n * - set the current item to the last intersecting item\n */\n private setIntersectionObserver(): void {\n this.intersectionObserver = new IntersectionObserver(\n (entries) => {\n const entry = entries.find(({isIntersecting}) => isIntersecting);\n if (!entry) {\n return;\n }\n\n const entryIndex = this.items.findIndex((item) => item === entry.target);\n this.highlightedIndicator = entryIndex;\n\n /* skip setting the current item if intersection has been triggered by a programmatic scroll\n (@see `goTo` function) and the final index has not been reached */\n if (this.scrollingTo !== null && entryIndex !== this.scrollingTo) {\n return;\n }\n\n this.scrollingTo = null;\n this.current = entryIndex;\n },\n {\n root: this.itemsContainer,\n threshold: 0.5,\n }\n );\n\n this.items.forEach((element) => this.intersectionObserver.observe(element));\n }\n\n /** Update items' list and check conditions to allow navigation */\n private onSlotChange(): void {\n this.items = Array.from(this.host.children) as HTMLLIElement[];\n this.checkNavigationValidity();\n this.setIntersectionObserver();\n this.goTo(this.current);\n }\n\n private onPrev(): void {\n if (this.single) {\n this.goTo(this.infinite && this.current - 1 < 0 ? this.items.length - 1 : Math.max(0, this.current - 1));\n\n return;\n }\n\n this.itemsContainer.scrollBy({\n left:\n this.infinite && this.itemsContainer.scrollLeft == 0\n ? this.itemsContainer.scrollWidth - this.itemsContainer.clientWidth\n : -this.itemsContainer.clientWidth / 2,\n behavior: \"smooth\",\n });\n }\n\n private onNext(): void {\n if (this.single) {\n const next =\n this.infinite && this.current + 1 > this.items.length - 1\n ? 0\n : Math.min(this.current + 1, this.items.length - 1);\n\n return this.goTo(next);\n }\n\n this.itemsContainer.scrollBy({\n left:\n this.infinite &&\n this.itemsContainer.scrollLeft == this.itemsContainer.scrollWidth - this.itemsContainer.clientWidth\n ? -this.itemsContainer.scrollWidth\n : this.itemsContainer.clientWidth / 2,\n behavior: \"smooth\",\n });\n }\n\n /**\n * Check if navigation buttons can be enabled and set the related local states.\n */\n private checkNavigationValidity(): void {\n if (this.single) {\n this.canNavigatePrev = this.current > 0;\n this.canNavigateNext = this.current < this.items.length - 1;\n\n return;\n }\n\n this.canNavigatePrev = this.itemsContainer.scrollLeft > 0;\n this.canNavigateNext =\n this.itemsContainer.scrollLeft < this.itemsContainer.scrollWidth - this.itemsContainer.clientWidth;\n }\n\n /**\n * Check if footer has to be rendered.\n */\n private canShowFooter(): boolean {\n if (!this.canNavigatePrev && !this.canNavigateNext) {\n return false;\n }\n\n return (\n this.arrowsPosition === CarouselArrowsPosition.BOTTOM ||\n this.progressMode === CarouselProgressMode.DOTS ||\n this.progressMode === CarouselProgressMode.NUMBERS\n );\n }\n\n /**\n * Set current item to passed index.\n * @param index Index to set\n */\n private goTo(index: number): void {\n if (this.current === index) {\n return;\n }\n\n this.scrollingTo = index;\n const left = this.items.slice(0, index).reduce((acc, item) => (acc += item.clientWidth), 0);\n // the scroll will trigger the IntersectionObserver and set the current item\n this.itemsContainer.scroll({\n left,\n behavior: \"smooth\",\n });\n }\n\n /** Check if navigation of at least one direction is enabled */\n private get canNavigate(): boolean {\n return this.canNavigatePrev || this.canNavigateNext;\n }\n\n private setupItems(): void {\n this.items = Array.from(this.host.children) as HTMLLIElement[];\n this.items.forEach((item) => {\n item.setAttribute(\"role\", \"group\");\n item.setAttribute(\"aria-roledescription\", \"slide\");\n });\n }\n\n componentDidLoad(): void {\n this.itemsContainer.addEventListener(\"scroll\", this.checkNavigationValidity.bind(this), {passive: true});\n this.resizeObserver = new ResizeObserver(this.checkNavigationValidity.bind(this));\n this.resizeObserver.observe(this.itemsContainer);\n this.setupItems();\n if (this.single) {\n this.setIntersectionObserver();\n }\n this.checkNavigationValidity();\n }\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n }\n\n render(): HTMLDivElement | HTMLZCarouselElement {\n if (this.isLoading) {\n return (\n <div class=\"z-carousel-container\">\n {this.label && <div class=\"heading-3-sb z-carousel-title\">{this.label}</div>}\n <div style={{height: `${this.ghostLoadingHeight}px`}}>\n <z-ghost-loading></z-ghost-loading>\n </div>\n </div>\n );\n }\n\n return (\n <Host>\n <div\n class=\"z-carousel-container\"\n role=\"group\"\n aria-roledescription=\"carousel\"\n aria-label={this.label || \"Carousel\"}\n >\n {this.label && <div class=\"z-carousel-title heading-3-sb\">{this.label}</div>}\n <div class=\"z-carousel-wrapper\">\n <z-button\n class=\"z-carousel-navigation-arrow\"\n variant={ButtonVariant.SECONDARY}\n data-direction=\"prev\"\n icon=\"arrow-left\"\n onClick={this.onPrev.bind(this)}\n disabled={!this.infinite && !this.canNavigatePrev}\n hidden={this.arrowsPosition !== CarouselArrowsPosition.OVER || !this.canNavigate}\n ariaLabel={this.single ? \"Mostra l'elemento precedente\" : \"Mostra gli elementi precedenti\"}\n />\n <ul\n class=\"z-carousel-items-container\"\n aria-atomic=\"false\"\n aria-live=\"polite\"\n ref={(el) => (this.itemsContainer = el)}\n >\n <slot onSlotchange={this.onSlotChange.bind(this)} />\n </ul>\n <z-button\n class=\"z-carousel-navigation-arrow\"\n variant={ButtonVariant.SECONDARY}\n data-direction=\"next\"\n icon=\"arrow-right\"\n onClick={this.onNext.bind(this)}\n disabled={!this.infinite && !this.canNavigateNext}\n hidden={this.arrowsPosition !== CarouselArrowsPosition.OVER || !this.canNavigate}\n ariaLabel={this.single ? \"Mostra l'elemento successivo\" : \"Mostra gli elementi successivi\"}\n />\n </div>\n </div>\n\n {this.canShowFooter() && (\n <div class=\"z-carousel-footer\">\n {this.arrowsPosition === CarouselArrowsPosition.BOTTOM && (\n <z-button\n class=\"z-carousel-navigation-arrow\"\n variant={ButtonVariant.TERTIARY}\n icon=\"arrow-left\"\n onClick={this.onPrev.bind(this)}\n disabled={!this.infinite && !this.canNavigatePrev}\n ariaLabel={this.single ? \"Mostra l'elemento precedente\" : \"Mostra gli elementi precedenti\"}\n />\n )}\n {this.progressMode === CarouselProgressMode.DOTS && this.single && this.items && (\n <div class=\"dots-progress\">\n {this.items.map((_, index) => (\n <button\n type=\"button\"\n class={{current: this.highlightedIndicator === index}}\n aria-label={\n this.highlightedIndicator === index ? \"Elemento corrente\" : `Spostati all'elemento ${index + 1}`\n }\n onClick={() => this.goTo(index)}\n />\n ))}\n </div>\n )}\n {this.progressMode === CarouselProgressMode.NUMBERS && this.single && this.items && (\n <div class=\"numbers-progress interactive-1\">\n <span class=\"current\">{this.current + 1}</span>\n <span>di</span>\n <span>{this.items.length}</span>\n </div>\n )}\n {this.arrowsPosition === CarouselArrowsPosition.BOTTOM && (\n <z-button\n class=\"z-carousel-navigation-arrow\"\n variant={ButtonVariant.TERTIARY}\n icon=\"arrow-right\"\n onClick={this.onNext.bind(this)}\n disabled={!this.infinite && !this.canNavigateNext}\n ariaLabel={this.single ? \"Mostra l'elemento successivo\" : \"Mostra gli elementi successivi\"}\n />\n )}\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"kHAAA,MAAMA,EAAY,4gFAClB,MAAAC,EAAeD,E,MCYFE,EAAS,M,kEAmEZC,KAAAC,YAAsB,K,0DAtDrB,M,2EAgBK,K,wBAIO,I,cAIV,M,aAID,E,uHAiCV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