@zanichelli/albe-web-components 16.3.3 → 16.3.4

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 (36) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/cjs/z-carousel.cjs.entry.js +1 -2
  3. package/dist/cjs/z-carousel.cjs.entry.js.map +1 -1
  4. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  5. package/dist/cjs/z-menu-section.cjs.entry.js.map +1 -1
  6. package/dist/collection/components/z-carousel/index.js +1 -2
  7. package/dist/collection/components/z-carousel/index.js.map +1 -1
  8. package/dist/collection/components/z-menu-section/index.js +2 -2
  9. package/dist/collection/components/z-menu-section/index.js.map +1 -1
  10. package/dist/components/z-carousel.js +1 -2
  11. package/dist/components/z-carousel.js.map +1 -1
  12. package/dist/components/z-menu-section.js +1 -1
  13. package/dist/components/z-menu-section.js.map +1 -1
  14. package/dist/esm/z-carousel.entry.js +1 -2
  15. package/dist/esm/z-carousel.entry.js.map +1 -1
  16. package/dist/esm/z-menu-section.entry.js +1 -1
  17. package/dist/esm/z-menu-section.entry.js.map +1 -1
  18. package/dist/types/components/z-menu-section/index.d.ts +1 -1
  19. package/dist/web-components-library/{p-8e5f1ae0.entry.js → p-3f0be317.entry.js} +2 -2
  20. package/dist/web-components-library/p-3f0be317.entry.js.map +1 -0
  21. package/{www/build/p-df9c3674.entry.js → dist/web-components-library/p-a56fa2f2.entry.js} +2 -2
  22. package/dist/web-components-library/p-a56fa2f2.entry.js.map +1 -0
  23. package/dist/web-components-library/web-components-library.esm.js +1 -1
  24. package/package.json +1 -1
  25. package/readme.md +5 -9
  26. package/www/build/{p-8e5f1ae0.entry.js → p-3f0be317.entry.js} +2 -2
  27. package/www/build/p-3f0be317.entry.js.map +1 -0
  28. package/{dist/web-components-library/p-df9c3674.entry.js → www/build/p-a56fa2f2.entry.js} +2 -2
  29. package/www/build/p-a56fa2f2.entry.js.map +1 -0
  30. package/www/build/{p-f7420b16.js → p-ee649874.js} +1 -1
  31. package/www/build/web-components-library.esm.js +1 -1
  32. package/www/index.html +1 -1
  33. package/dist/web-components-library/p-8e5f1ae0.entry.js.map +0 -1
  34. package/dist/web-components-library/p-df9c3674.entry.js.map +0 -1
  35. package/www/build/p-8e5f1ae0.entry.js.map +0 -1
  36. package/www/build/p-df9c3674.entry.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{p as e,H as a,b as t}from"./p-75c4a726.js";export{s as setNonce}from"./p-75c4a726.js";import{g as o}from"./p-e1255160.js";var i=()=>{{l(a.prototype)}const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};var l=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const o=this.childNodes;if(e){for(let e=0;e<o.length;e++){if(o[e].nodeType!==2){t.appendChild(o[e].cloneNode(true))}}}return t}};i().then((async e=>{await o();return t(JSON.parse('[["p-02418303",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[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],"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-608c35ba",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-b2356bc7",[[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-a64a1bf0",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32],"checkboxes":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"],"checkboxes":["watchCheckboxes"]}]]],["p-9a1b51ed",[[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-f15d0a00",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-1896cc54",[[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"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"files":[32],"invalidFiles":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","removeFileListener"],[0,"fileDropped","fileDroppedListener"]]]]],["p-da7200c2",[[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-df9c3674",[[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-296924ea",[[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-64364cbf",[[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-1cc37aa7",[[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-823c45d4",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-f703660d",[[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-51f1c9c0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsed":[32]}]]],["p-4537f922",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-707e5f91",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-100c6243",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-7aba5af3",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-f8bbca6e",[[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-777ad335",[[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-d5f5e107",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-acd911aa",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-06d98334",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-f425c6f2",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"ariaLabel":[1,"aria-label"],"size":[513],"open":[32]},[[9,"resize","adjustPanelPosition"],[10,"keydown","handleEscapeKey"]],{"position":["adjustPanelPosition"],"open":["adjustPanelPosition"]}]]],["p-587aa850",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-38d5e74f",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-8e5f1ae0",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-273f3c53",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-9b9a04ad",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-f9aa2d11",[[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-2f662fea",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-5a0f0978",[[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-cd0219b4",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-2e432a39",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-a0fd1323",[[1,"z-stepper-item",{"index":[2],"href":[1],"pressed":[4],"checked":[4],"disabled":[4]}]]],["p-5a178c69",[[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-e529a714",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-68f4fbc8",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-c54d0925",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-4f3f8578",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-cc71a90c",[[4,"z-aria-alert",{"mode":[1]}]]],["p-c679277c",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-820b48f6",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-855334f4",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-e25d7f0a",[[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-c1e498ac",[[1,"z-myz-card-footer-sections"]]],["p-45dc157c",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-aaae6b16",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-f06ad42c",[[1,"z-stepper"]]],["p-28018cd3",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-7d5bf905",[[1,"z-tbody"]]],["p-2b1fd95a",[[1,"z-tfoot",{"sticky":[516]}]]],["p-63ec7bad",[[1,"z-thead",{"sticky":[516]}]]],["p-df8c381a",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-3ae8fb1a",[[1,"z-visually-hidden"]]],["p-e4d97fbf",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-ea9c0ff3",[[1,"z-alert",{"type":[1]}]]],["p-46d98609",[[1,"z-ghost-loading"]]],["p-8d56e74b",[[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-ab7f129e",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-ad97fdc4",[[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-6a1b3e86",[[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)}));
1
+ import{p as e,H as a,b as t}from"./p-75c4a726.js";export{s as setNonce}from"./p-75c4a726.js";import{g as o}from"./p-e1255160.js";var i=()=>{{l(a.prototype)}const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};var l=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const o=this.childNodes;if(e){for(let e=0;e<o.length;e++){if(o[e].nodeType!==2){t.appendChild(o[e].cloneNode(true))}}}return t}};i().then((async e=>{await o();return t(JSON.parse('[["p-02418303",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[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],"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-608c35ba",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-b2356bc7",[[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-a64a1bf0",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32],"checkboxes":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"],"checkboxes":["watchCheckboxes"]}]]],["p-9a1b51ed",[[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-f15d0a00",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-1896cc54",[[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"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"files":[32],"invalidFiles":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","removeFileListener"],[0,"fileDropped","fileDroppedListener"]]]]],["p-da7200c2",[[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-a56fa2f2",[[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-296924ea",[[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-64364cbf",[[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-1cc37aa7",[[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-823c45d4",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-f703660d",[[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-51f1c9c0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsed":[32]}]]],["p-4537f922",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-707e5f91",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-100c6243",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-7aba5af3",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-f8bbca6e",[[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-777ad335",[[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-d5f5e107",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-acd911aa",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-06d98334",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-f425c6f2",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"ariaLabel":[1,"aria-label"],"size":[513],"open":[32]},[[9,"resize","adjustPanelPosition"],[10,"keydown","handleEscapeKey"]],{"position":["adjustPanelPosition"],"open":["adjustPanelPosition"]}]]],["p-587aa850",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-38d5e74f",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-3f0be317",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-273f3c53",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-9b9a04ad",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-f9aa2d11",[[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-2f662fea",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-5a0f0978",[[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-cd0219b4",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-2e432a39",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-a0fd1323",[[1,"z-stepper-item",{"index":[2],"href":[1],"pressed":[4],"checked":[4],"disabled":[4]}]]],["p-5a178c69",[[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-e529a714",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-68f4fbc8",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-c54d0925",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-4f3f8578",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-cc71a90c",[[4,"z-aria-alert",{"mode":[1]}]]],["p-c679277c",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-820b48f6",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-855334f4",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-e25d7f0a",[[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-c1e498ac",[[1,"z-myz-card-footer-sections"]]],["p-45dc157c",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-aaae6b16",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-f06ad42c",[[1,"z-stepper"]]],["p-28018cd3",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-7d5bf905",[[1,"z-tbody"]]],["p-2b1fd95a",[[1,"z-tfoot",{"sticky":[516]}]]],["p-63ec7bad",[[1,"z-thead",{"sticky":[516]}]]],["p-df8c381a",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-3ae8fb1a",[[1,"z-visually-hidden"]]],["p-e4d97fbf",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-ea9c0ff3",[[1,"z-alert",{"type":[1]}]]],["p-46d98609",[[1,"z-ghost-loading"]]],["p-8d56e74b",[[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-ab7f129e",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-ad97fdc4",[[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-6a1b3e86",[[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
2
  //# sourceMappingURL=web-components-library.esm.js.map
package/www/index.html CHANGED
@@ -1,3 +1,3 @@
1
- <!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Albe test application</title> <link rel="stylesheet" type="text/css" href="/build/p-ae0a33a2.css"> <link rel="modulepreload" href="/build/p-f7420b16.js"><link rel="modulepreload" href="/build/p-5145a606.js"><link rel="modulepreload" href="/build/p-6037cdf3.js"><link rel="modulepreload" href="/build/p-67e5e8ed.js"><link rel="modulepreload" href="/build/p-75c4a726.js"><script type="module" src="/build/p-f7420b16.js" data-stencil data-resources-url="/build/" data-stencil-namespace="web-components-library"></script> <script nomodule="" src="/build/web-components-library.js" data-stencil></script> </head> <body> <header> <z-app-header> <h1 slot="title">Albe test app</h1> </z-app-header> </header> <main></main> <style>body {
1
+ <!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Albe test application</title> <link rel="stylesheet" type="text/css" href="/build/p-ae0a33a2.css"> <link rel="modulepreload" href="/build/p-ee649874.js"><link rel="modulepreload" href="/build/p-5145a606.js"><link rel="modulepreload" href="/build/p-6037cdf3.js"><link rel="modulepreload" href="/build/p-67e5e8ed.js"><link rel="modulepreload" href="/build/p-75c4a726.js"><script type="module" src="/build/p-ee649874.js" data-stencil data-resources-url="/build/" data-stencil-namespace="web-components-library"></script> <script nomodule="" src="/build/web-components-library.js" data-stencil></script> </head> <body> <header> <z-app-header> <h1 slot="title">Albe test app</h1> </z-app-header> </header> <main></main> <style>body {
2
2
  margin: 0;
3
3
  }</style> </body></html>
@@ -1 +0,0 @@
1
- {"version":3,"names":["stylesCss","ZMenuSectionStyle0","ZMenuSection","focusableItem","this","items","find","tabIndex","toggle","hasItems","open","setItemsA11yAttrs","forEach","item","setAttribute","onItemsChange","Array","from","host","querySelectorAll","length","onLabelSlotChange","ev","labelElement","target","assignedElements","dataset","text","textContent","onLabelClick","setFocus","onLabelKeydown","key","KeyboardCode","ENTER","SPACE","preventDefault","stopPropagation","focustFirstItem","moveFocus","receiver","current","setTimeout","focus","focusLastItem","htmlTabindex","label","onOpenChange","closed","emit","opened","onTabindexChange","onItemsKeydown","ESC","ARROW_LEFT","ARROW_RIGHT","ARROW_DOWN","document","activeElement","currentIndex","indexOf","ARROW_UP","constructor","hostRef","bind","connectedCallback","render","h","Host","ref","el","class","role","tabindex","onClick","onKeyDown","onSlotchange","name","hidden"],"sources":["src/components/z-menu-section/styles.css?tag=z-menu-section&encapsulation=shadow","src/components/z-menu-section/index.tsx"],"sourcesContent":[":host {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: 0;\n font-family: var(--font-family-sans);\n}\n\n:host,\n::slotted(*),\n* {\n box-sizing: border-box;\n}\n\n::slotted(a) {\n text-decoration: none;\n}\n\n::slotted(*) {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n.label {\n display: flex;\n width: 100%;\n align-items: center;\n padding: var(--space-unit) 0;\n border: 0;\n border-bottom: var(--border-size-small) solid var(--color-surface03);\n margin: 0;\n background: transparent;\n border-radius: 0;\n cursor: pointer;\n text-align: left;\n}\n\n:host(:last-child:not([open])) .label {\n border-bottom: none;\n}\n\n:host(:is([active], [open])) .label,\n.label:focus:focus-visible,\n.label:hover {\n border-color: var(--color-secondary01);\n}\n\n.label:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n:host(:is([active], [open])) .label ::slotted(*),\n.label:focus:focus-visible ::slotted(*),\n.label:hover ::slotted(*) {\n font-weight: var(--font-bd);\n}\n\n::slotted([data-text]) {\n display: inline-flex;\n flex-direction: column;\n}\n\n/* Trick to prevent layout shifts on font-weight changes.\nThe trick is to put an hidden copy of the text already set to bold,\nso the needed space is correctly calculated before any hover/active state changes the\nfont-weight of the real text.\nThe hidden text has an height of 0px so it can expand the width without changing the height\nwhen placed below the real text using `flex-direction: column`. */\n::slotted([data-text])::after {\n overflow: hidden;\n height: 0;\n content: attr(data-text);\n content: attr(data-text) / \"\";\n font-weight: var(--font-bd);\n pointer-events: none;\n user-select: none;\n visibility: hidden;\n}\n\n@media speech {\n ::slotted([data-text])::after {\n display: none;\n }\n}\n\n.label ::slotted(*) {\n width: 100%;\n margin: 0;\n font-size: var(--font-size-3);\n line-height: 1.5;\n}\n\n.label z-icon {\n margin-left: calc(var(--space-unit) * 4);\n fill: var(--color-default-icon);\n}\n\n.items {\n display: flex;\n width: 100%;\n flex-direction: column;\n padding: calc(var(--space-unit) / 2);\n padding-bottom: calc(var(--space-unit) * 1.5);\n}\n\n.items[hidden] {\n display: none;\n}\n\n::slotted([slot=\"section\"]) {\n display: inline-flex;\n padding: calc(var(--space-unit) / 2);\n margin: 0;\n font-size: var(--font-size-1);\n line-height: 1.333;\n outline: none;\n}\n\n::slotted([slot=\"section\"]:last-of-type) {\n border: none;\n}\n\n::slotted([slot=\"section\"]:focus:focus-visible) {\n box-shadow: var(--shadow-focus-primary);\n color: var(--color-secondary01);\n}\n\n::slotted([slot=\"section\"]:hover),\n::slotted([slot=\"section\"]:focus:focus-visible),\n::slotted([slot=\"section\"][active]) {\n color: var(--color-secondary01);\n font-weight: var(--font-bd);\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {KeyboardCode} from \"../../beans\";\n\n/**\n * A component to create submenus inside the ZMenu.\n * @slot - Label of the menu section.\n * @slot item - Single entry of the section. Set the same slot name to different items to put many of them. Add the `active` attribute to a slotted item to highlight it.\n */\n@Component({\n tag: \"z-menu-section\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMenuSection {\n @Element() host: HTMLZMenuSectionElement;\n\n /** Active state */\n @Prop({reflect: true})\n active?: boolean;\n\n /**\n * Tabindex value to set on the label button.\n * Useful to manage keyboard navigation focus with roving tabindex handled by this component's parent (usually ZMenu).\n */\n @Prop()\n htmlTabindex = -1;\n\n /** The opening state of the section. */\n @Prop({mutable: true})\n open: boolean;\n\n @State()\n hasItems: boolean;\n\n @State()\n items: HTMLElement[];\n\n /** The section has been opened. */\n @Event()\n opened: EventEmitter;\n\n /** The section has been closed. */\n @Event()\n closed: EventEmitter;\n\n private label: HTMLButtonElement;\n\n private get focusableItem(): HTMLElement {\n return this.items.find(({tabIndex}) => tabIndex === 0);\n }\n\n private toggle(): void {\n if (!this.hasItems) {\n return;\n }\n\n this.open = !this.open;\n }\n\n private setItemsA11yAttrs(): void {\n if (!this.hasItems) {\n return;\n }\n\n this.items.forEach((item) => {\n item.setAttribute(\"role\", \"menuitem\");\n item.tabIndex = -1;\n });\n }\n\n private onItemsChange(): void {\n this.items = Array.from(this.host.querySelectorAll('[slot=\"section\"]')) as HTMLElement[];\n this.hasItems = this.items.length > 0;\n this.setItemsA11yAttrs();\n }\n\n /**\n * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.\n * @param ev Slotchange event\n */\n private onLabelSlotChange(ev: Event): void {\n const labelElement = (ev.target as HTMLSlotElement).assignedElements()[0] as HTMLElement;\n labelElement.dataset.text = labelElement?.textContent;\n }\n\n private onLabelClick(): void {\n this.toggle();\n this.setFocus();\n }\n\n private onLabelKeydown(ev: KeyboardEvent): void {\n if (ev.key === KeyboardCode.ENTER || ev.key === KeyboardCode.SPACE) {\n ev.preventDefault();\n ev.stopPropagation();\n this.toggle();\n if (this.open) {\n this.focustFirstItem();\n }\n }\n }\n\n /**\n * Move focus and adjust the tabindex value of `receiver` and `current` elements,\n * setting -1 to the `current` and 0 to the `receiver`, then focus the `receiver` element.\n */\n private moveFocus(receiver: HTMLElement, current?: HTMLElement): void {\n receiver.tabIndex = 0;\n setTimeout(() => {\n receiver.focus();\n }, 100);\n if (current) {\n current.tabIndex = -1;\n }\n }\n\n private focustFirstItem(): void {\n this.moveFocus(this.items[0]);\n }\n\n /** Focus the last item. */\n @Method()\n async focusLastItem(): Promise<void> {\n this.moveFocus(this.items[this.items.length - 1]);\n }\n\n /** Set tabindex of the label to 0, then focus it. */\n @Method()\n async setFocus(): Promise<void> {\n this.htmlTabindex = 0;\n setTimeout(() => {\n this.label.focus();\n }, 100);\n }\n\n @Watch(\"open\")\n onOpenChange(): void {\n if (!this.open) {\n this.setItemsA11yAttrs();\n this.closed.emit();\n } else {\n this.opened.emit();\n }\n }\n\n @Watch(\"htmlTabindex\")\n onTabindexChange(): void {\n this.label.tabIndex = this.htmlTabindex;\n }\n\n @Listen(\"keydown\")\n private onItemsKeydown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case KeyboardCode.ESC:\n case KeyboardCode.ARROW_LEFT:\n if (!this.open) {\n break;\n }\n ev.preventDefault();\n ev.stopPropagation();\n this.moveFocus(this.label, this.focusableItem);\n this.open = false;\n break;\n case KeyboardCode.ARROW_RIGHT:\n if (this.open) {\n break;\n }\n ev.preventDefault();\n ev.stopPropagation();\n this.open = true;\n this.focustFirstItem();\n break;\n case KeyboardCode.ARROW_DOWN: {\n if (!this.open) {\n break;\n }\n if (document.activeElement === this.host) {\n ev.preventDefault();\n ev.stopPropagation();\n this.focustFirstItem();\n break;\n }\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex + 1];\n if (receiver) {\n ev.preventDefault();\n ev.stopPropagation();\n this.moveFocus(receiver, this.focusableItem);\n } else {\n this.htmlTabindex = 0;\n this.focusableItem.tabIndex = -1;\n }\n break;\n }\n case KeyboardCode.ARROW_UP: {\n if (!this.open || document.activeElement === this.host) {\n break;\n }\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex - 1];\n ev.preventDefault();\n ev.stopPropagation();\n if (receiver) {\n this.moveFocus(receiver, this.focusableItem);\n } else {\n // since there isn't a previous item to focus, give the focus to the label element\n this.focusableItem.tabIndex = -1;\n this.setFocus();\n }\n break;\n }\n }\n }\n\n constructor() {\n this.toggle = this.toggle.bind(this);\n this.onItemsChange = this.onItemsChange.bind(this);\n this.onLabelSlotChange = this.onLabelSlotChange.bind(this);\n this.onLabelClick = this.onLabelClick.bind(this);\n this.onLabelKeydown = this.onLabelKeydown.bind(this);\n this.onItemsKeydown = this.onItemsKeydown.bind(this);\n }\n\n connectedCallback(): void {\n this.onItemsChange();\n }\n\n render(): HTMLZMenuSectionElement {\n return (\n <Host open={this.open}>\n <button\n ref={(el) => (this.label = el)}\n class=\"label\"\n aria-haspopup={`${!!this.hasItems}`}\n aria-expanded={`${!!this.open}`}\n role=\"menuitem\"\n tabindex={this.htmlTabindex}\n onClick={this.onLabelClick}\n onKeyDown={this.onLabelKeydown}\n >\n <slot onSlotchange={this.onLabelSlotChange} />\n {this.hasItems && <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />}\n </button>\n <div\n class=\"items\"\n role=\"menu\"\n hidden={!this.open}\n >\n <slot\n name=\"section\"\n onSlotchange={this.onItemsChange}\n />\n </div>\n </Host>\n );\n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AC/BH,KAAK0B,U,CAEP,K,GAKN,WAAAgC,CAAAC,G,iHA5LgB,E,iEA6Ld3D,KAAKI,OAASJ,KAAKI,OAAOwD,KAAK5D,MAC/BA,KAAKW,cAAgBX,KAAKW,cAAciD,KAAK5D,MAC7CA,KAAKiB,kBAAoBjB,KAAKiB,kBAAkB2C,KAAK5D,MACrDA,KAAKyB,aAAezB,KAAKyB,aAAamC,KAAK5D,MAC3CA,KAAK2B,eAAiB3B,KAAK2B,eAAeiC,KAAK5D,MAC/CA,KAAKgD,eAAiBhD,KAAKgD,eAAeY,KAAK5D,K,CAGjD,iBAAA6D,GACE7D,KAAKW,e,CAGP,MAAAmD,GACE,OACEC,EAACC,EAAI,CAAApC,IAAA,2CAACtB,KAAMN,KAAKM,MACfyD,EAAA,UAAAnC,IAAA,2CACEqC,IAAMC,GAAQlE,KAAK0C,MAAQwB,EAC3BC,MAAM,QAAO,gBACE,KAAKnE,KAAKK,WAAU,gBACpB,KAAKL,KAAKM,OACzB8D,KAAK,WACLC,SAAUrE,KAAKyC,aACf6B,QAAStE,KAAKyB,aACd8C,UAAWvE,KAAK2B,gBAEhBoC,EAAA,QAAAnC,IAAA,2CAAM4C,aAAcxE,KAAKiB,oBACxBjB,KAAKK,UAAY0D,EAAA,UAAAnC,IAAA,2CAAQ6C,KAAMzE,KAAKM,KAAO,aAAe,kBAE7DyD,EAAA,OAAAnC,IAAA,2CACEuC,MAAM,QACNC,KAAK,OACLM,QAAS1E,KAAKM,MAEdyD,EAAA,QAAAnC,IAAA,2CACE6C,KAAK,UACLD,aAAcxE,KAAKW,iB","ignoreList":[]}
@@ -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","_a","addEventListener","bind","passive","resizeObserver","ResizeObserver","disconnectedCallback","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 --z-carousel-items-shadow: ;\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 box-shadow: var(--z-carousel-items-shadow, none);\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 z-index: 1;\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, Element, Event, EventEmitter, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, CarouselArrowsPosition, CarouselProgressMode} from \"../../beans\";\n\n/**\n * ZCarousel component.\n * @cssprop --z-carousel-gutter - The gutter between items.\n * @cssprop --z-carousel-items-shadow - The shadow around the 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,ukFAClB,MAAAC,EAAeD,E,MCaFE,EAAS,M,kEAmEZC,KAAAC,YAAsB,K,0DAtDrB,M,2EAgBK,K,wBAIO,I,cAIV,M,aAID,E,uHAiCV,aAAAC,GACEF,KAAKG,YAAYC,KAAK,CAACC,YAAaL,KAAKM,S,CAI3C,kBAAAC,GACE,GAAIP,KAAKQ,SAAWR,KAAKS,qBAAsB,CAC7CT,KAAKU,yB,EAKT,oBAAAC,GACEX,KAAKY,yB,CAQC,uBAAAF,GACNV,KAAKS,qBAAuB,IAAII,sBAC7BC,IACC,MAAMC,EAAQD,EAAQE,MAAK,EAAEC,oBAAoBA,IACjD,IAAKF,EAAO,CACV,M,CAGF,MAAMG,EAAalB,KAAKmB,MAAMC,WAAWC,GAASA,IAASN,EAAMO,SACjEtB,KAAKuB,qBAAuBL,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MAAM,8BACNO,QAASC,EAAcW,SACvBT,KAAK,aACLC,QAAS3F,KAAKoC,OAAOmC,KAAKvE,MAC1B4F,UAAW5F,KAAKqC,WAAarC,KAAKkD,gBAClC6C,UAAW/F,KAAKQ,OAAS,+BAAiC,mCAG7DR,KAAKwD,eAAiBC,EAAqBC,MAAQ1D,KAAKQ,QAAUR,KAAKmB,OACtE4D,EAAA,OAAKC,MAAM,iBACRhF,KAAKmB,MAAMiF,KAAI,CAACC,EAAGzC,IAClBmB,EAAA,UACEuB,KAAK,SACLtB,MAAO,CAAC1E,QAASN,KAAKuB,uBAAyBqC,GAAM,aAEnD5D,KAAKuB,uBAAyBqC,EAAQ,oBAAsB,yBAAyBA,EAAQ,IAE/F+B,QAAS,IAAM3F,KAAKmC,KAAKyB,QAKhC5D,KAAKwD,eAAiBC,EAAqBE,SAAW3D,KAAKQ,QAAUR,KAAKmB,OACzE4D,EAAA,OAAKC,MAAM,kCACTD,EAAA,QAAMC,MAAM,WAAWhF,KAAKM,QAAU,GACtCyE,EAAA,kBACAA,EAAA,YAAO/E,KAAKmB,MAAMmB,SAGrBtC,KAAKqD,iBAAmBC,EAAuBC,QAC9CwB,EAAA,YACEC,MAAM,8BACNO,QAASC,EAAcW,SACvBT,KAAK,cACLC,QAAS3F,KAAK+C,OAAOwB,KAAKvE,MAC1B4F,UAAW5F,KAAKqC,WAAarC,KAAKmD,gBAClC4C,UAAW/F,KAAKQ,OAAS,+BAAiC,oC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["stylesCss","ZMenuSectionStyle0","ZMenuSection","focusableItem","this","items","find","tabIndex","toggle","hasItems","open","setItemsA11yAttrs","forEach","item","setAttribute","onItemsChange","Array","from","host","querySelectorAll","length","onLabelSlotChange","ev","labelElement","target","assignedElements","dataset","text","textContent","onLabelClick","setFocus","onLabelKeydown","key","KeyboardCode","ENTER","SPACE","preventDefault","stopPropagation","focustFirstItem","moveFocus","receiver","current","setTimeout","focus","focusLastItem","htmlTabindex","label","onOpenChange","closed","emit","opened","onTabindexChange","onItemsKeydown","ESC","ARROW_LEFT","ARROW_RIGHT","ARROW_DOWN","document","activeElement","currentIndex","indexOf","ARROW_UP","constructor","hostRef","bind","connectedCallback","render","h","Host","ref","el","class","role","tabindex","onClick","onKeyDown","onSlotchange","name","hidden"],"sources":["src/components/z-menu-section/styles.css?tag=z-menu-section&encapsulation=shadow","src/components/z-menu-section/index.tsx"],"sourcesContent":[":host {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n padding: 0;\n font-family: var(--font-family-sans);\n}\n\n:host,\n::slotted(*),\n* {\n box-sizing: border-box;\n}\n\n::slotted(a) {\n text-decoration: none;\n}\n\n::slotted(*) {\n color: var(--color-default-text);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n}\n\n.label {\n display: flex;\n width: 100%;\n align-items: center;\n padding: var(--space-unit) 0;\n border: 0;\n border-bottom: var(--border-size-small) solid var(--color-surface03);\n margin: 0;\n background: transparent;\n border-radius: 0;\n cursor: pointer;\n text-align: left;\n}\n\n:host(:last-child:not([open])) .label {\n border-bottom: none;\n}\n\n:host(:is([active], [open])) .label,\n.label:focus:focus-visible,\n.label:hover {\n border-color: var(--color-secondary01);\n}\n\n.label:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n:host(:is([active], [open])) .label ::slotted(*),\n.label:focus:focus-visible ::slotted(*),\n.label:hover ::slotted(*) {\n font-weight: var(--font-bd);\n}\n\n::slotted([data-text]) {\n display: inline-flex;\n flex-direction: column;\n}\n\n/* Trick to prevent layout shifts on font-weight changes.\nThe trick is to put an hidden copy of the text already set to bold,\nso the needed space is correctly calculated before any hover/active state changes the\nfont-weight of the real text.\nThe hidden text has an height of 0px so it can expand the width without changing the height\nwhen placed below the real text using `flex-direction: column`. */\n::slotted([data-text])::after {\n overflow: hidden;\n height: 0;\n content: attr(data-text);\n content: attr(data-text) / \"\";\n font-weight: var(--font-bd);\n pointer-events: none;\n user-select: none;\n visibility: hidden;\n}\n\n@media speech {\n ::slotted([data-text])::after {\n display: none;\n }\n}\n\n.label ::slotted(*) {\n width: 100%;\n margin: 0;\n font-size: var(--font-size-3);\n line-height: 1.5;\n}\n\n.label z-icon {\n margin-left: calc(var(--space-unit) * 4);\n fill: var(--color-default-icon);\n}\n\n.items {\n display: flex;\n width: 100%;\n flex-direction: column;\n padding: calc(var(--space-unit) / 2);\n padding-bottom: calc(var(--space-unit) * 1.5);\n}\n\n.items[hidden] {\n display: none;\n}\n\n::slotted([slot=\"section\"]) {\n display: inline-flex;\n padding: calc(var(--space-unit) / 2);\n margin: 0;\n font-size: var(--font-size-1);\n line-height: 1.333;\n outline: none;\n}\n\n::slotted([slot=\"section\"]:last-of-type) {\n border: none;\n}\n\n::slotted([slot=\"section\"]:focus:focus-visible) {\n box-shadow: var(--shadow-focus-primary);\n color: var(--color-secondary01);\n}\n\n::slotted([slot=\"section\"]:hover),\n::slotted([slot=\"section\"]:focus:focus-visible),\n::slotted([slot=\"section\"][active]) {\n color: var(--color-secondary01);\n font-weight: var(--font-bd);\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {KeyboardCode} from \"../../beans\";\n\n/**\n * A component to create submenus inside the ZMenu.\n * @slot - Label of the menu section.\n * @slot item - Single entry of the section. Set the same slot name to different items to put many of them. Add the `active` attribute to a slotted item to highlight it.\n */\n@Component({\n tag: \"z-menu-section\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZMenuSection {\n @Element() host: HTMLZMenuSectionElement;\n\n /** Active state */\n @Prop({reflect: true})\n active?: boolean;\n\n /**\n * Tabindex value to set on the label button.\n * Useful to manage keyboard navigation focus with roving tabindex handled by this component's parent (usually ZMenu).\n */\n @Prop()\n htmlTabindex = -1;\n\n /** The opening state of the section. */\n @Prop({mutable: true})\n open: boolean;\n\n @State()\n hasItems: boolean;\n\n @State()\n items: HTMLElement[];\n\n /** The section has been opened. */\n @Event()\n opened: EventEmitter;\n\n /** The section has been closed. */\n @Event()\n closed: EventEmitter;\n\n private label: HTMLButtonElement;\n\n private get focusableItem(): HTMLElement {\n return this.items.find(({tabIndex}) => tabIndex === 0);\n }\n\n private toggle(): void {\n if (!this.hasItems) {\n return;\n }\n\n this.open = !this.open;\n }\n\n private setItemsA11yAttrs(): void {\n if (!this.hasItems) {\n return;\n }\n\n this.items.forEach((item) => {\n item.setAttribute(\"role\", \"menuitem\");\n item.tabIndex = -1;\n });\n }\n\n private onItemsChange(): void {\n this.items = Array.from(this.host.querySelectorAll('[slot=\"section\"]')) as HTMLElement[];\n this.hasItems = this.items.length > 0;\n this.setItemsA11yAttrs();\n }\n\n /**\n * Sets slotted item text as `data-text` attribute value, to let CSS use it through `attr()`.\n * @param ev Slotchange event\n */\n private onLabelSlotChange(ev: Event): void {\n const labelElement = (ev.target as HTMLSlotElement).assignedElements()[0] as HTMLElement;\n labelElement.dataset.text = labelElement?.textContent;\n }\n\n private onLabelClick(): void {\n this.toggle();\n this.setFocus();\n }\n\n private onLabelKeydown(ev: KeyboardEvent): void {\n if (ev.key === KeyboardCode.ENTER || ev.key === KeyboardCode.SPACE) {\n ev.preventDefault();\n ev.stopPropagation();\n this.toggle();\n if (this.open) {\n this.focustFirstItem();\n }\n }\n }\n\n /**\n * Move focus and adjust the tabindex value of `receiver` and `current` elements,\n * setting -1 to the `current` and 0 to the `receiver`, then focus the `receiver` element.\n */\n private moveFocus(receiver: HTMLElement, current?: HTMLElement): void {\n receiver.tabIndex = 0;\n setTimeout(() => {\n receiver.focus();\n }, 100);\n if (current) {\n current.tabIndex = -1;\n }\n }\n\n private focustFirstItem(): void {\n this.moveFocus(this.items[0]);\n }\n\n /** Focus the last item. */\n @Method()\n async focusLastItem(): Promise<void> {\n this.moveFocus(this.items[this.items.length - 1]);\n }\n\n /** Set tabindex of the label to 0, then focus it. */\n @Method()\n async setFocus(): Promise<void> {\n this.htmlTabindex = 0;\n setTimeout(() => {\n this.label.focus();\n }, 100);\n }\n\n @Watch(\"open\")\n onOpenChange(): void {\n if (!this.open) {\n this.setItemsA11yAttrs();\n this.closed.emit();\n } else {\n this.opened.emit();\n }\n }\n\n @Watch(\"htmlTabindex\")\n onTabindexChange(): void {\n this.label.tabIndex = this.htmlTabindex;\n }\n\n @Listen(\"keydown\")\n private onItemsKeydown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case KeyboardCode.ESC:\n case KeyboardCode.ARROW_LEFT:\n if (!this.open) {\n break;\n }\n ev.preventDefault();\n ev.stopPropagation();\n this.moveFocus(this.label, this.focusableItem);\n this.open = false;\n break;\n case KeyboardCode.ARROW_RIGHT:\n if (this.open) {\n break;\n }\n ev.preventDefault();\n ev.stopPropagation();\n this.open = true;\n this.focustFirstItem();\n break;\n case KeyboardCode.ARROW_DOWN: {\n if (!this.open) {\n break;\n }\n if (document.activeElement === this.host) {\n ev.preventDefault();\n ev.stopPropagation();\n this.focustFirstItem();\n break;\n }\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex + 1];\n if (receiver) {\n ev.preventDefault();\n ev.stopPropagation();\n this.moveFocus(receiver, this.focusableItem);\n } else {\n this.htmlTabindex = 0;\n this.focusableItem.tabIndex = -1;\n }\n break;\n }\n case KeyboardCode.ARROW_UP: {\n if (!this.open || document.activeElement === this.host) {\n break;\n }\n const currentIndex = this.items.indexOf(this.focusableItem);\n const receiver = this.items[currentIndex - 1];\n ev.preventDefault();\n ev.stopPropagation();\n if (receiver) {\n this.moveFocus(receiver, this.focusableItem);\n } else {\n // since there isn't a previous item to focus, give the focus to the label element\n this.focusableItem.tabIndex = -1;\n this.setFocus();\n }\n break;\n }\n }\n }\n\n constructor() {\n this.toggle = this.toggle.bind(this);\n this.onItemsChange = this.onItemsChange.bind(this);\n this.onLabelSlotChange = this.onLabelSlotChange.bind(this);\n this.onLabelClick = this.onLabelClick.bind(this);\n this.onLabelKeydown = this.onLabelKeydown.bind(this);\n this.onItemsKeydown = this.onItemsKeydown.bind(this);\n }\n\n connectedCallback(): void {\n this.onItemsChange();\n }\n\n render(): HTMLZMenuSectionElement {\n return (\n <Host open={this.open}>\n <button\n ref={(el) => (this.label = el)}\n class=\"label\"\n aria-haspopup={`${!!this.hasItems}`}\n aria-expanded={`${!!this.open}`}\n role=\"menuitem\"\n tabindex={this.htmlTabindex}\n onClick={this.onLabelClick}\n onKeyDown={this.onLabelKeydown}\n >\n <slot onSlotchange={this.onLabelSlotChange} />\n {this.hasItems && <z-icon name={this.open ? \"chevron-up\" : \"chevron-down\"} />}\n </button>\n <div\n class=\"items\"\n role=\"menu\"\n hidden={!this.open}\n >\n <slot\n name=\"section\"\n onSlotchange={this.onItemsChange}\n />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"oGAAA,MAAMA,EAAY,0iEAClB,MAAAC,EAAeD,E,MCYFE,EAAY,MAkCvB,iBAAYC,GACV,OAAOC,KAAKC,MAAMC,MAAK,EAAEC,cAAcA,IAAa,G,CAG9C,MAAAC,GACN,IAAKJ,KAAKK,SAAU,CAClB,M,CAGFL,KAAKM,MAAQN,KAAKM,I,CAGZ,iBAAAC,GACN,IAAKP,KAAKK,SAAU,CAClB,M,CAGFL,KAAKC,MAAMO,SAASC,IAClBA,EAAKC,aAAa,OAAQ,YAC1BD,EAAKN,UAAY,CAAC,G,CAId,aAAAQ,GACNX,KAAKC,MAAQW,MAAMC,KAAKb,KAAKc,KAAKC,iBAAiB,qBACnDf,KAAKK,SAAWL,KAAKC,MAAMe,OAAS,EACpChB,KAAKO,mB,CAOC,iBAAAU,CAAkBC,GACxB,MAAMC,EAAgBD,EAAGE,OAA2BC,mBAAmB,GACvEF,EAAaG,QAAQC,KAAOJ,IAAY,MAAZA,SAAY,SAAZA,EAAcK,W,CAGpC,YAAAC,GACNzB,KAAKI,SACLJ,KAAK0B,U,CAGC,cAAAC,CAAeT,GACrB,GAAIA,EAAGU,MAAQC,EAAaC,OAASZ,EAAGU,MAAQC,EAAaE,MAAO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AKK,UAAY0D,EAAA,UAAAnC,IAAA,2CAAQ6C,KAAMzE,KAAKM,KAAO,aAAe,kBAE7DyD,EAAA,OAAAnC,IAAA,2CACEuC,MAAM,QACNC,KAAK,OACLM,QAAS1E,KAAKM,MAEdyD,EAAA,QAAAnC,IAAA,2CACE6C,KAAK,UACLD,aAAcxE,KAAKW,iB","ignoreList":[]}
@@ -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","_a","addEventListener","bind","passive","resizeObserver","ResizeObserver","disconnectedCallback","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 --z-carousel-items-shadow: ;\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 box-shadow: var(--z-carousel-items-shadow, none);\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 z-index: 1;\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, Element, Event, EventEmitter, Host, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ButtonVariant, CarouselArrowsPosition, CarouselProgressMode} from \"../../beans\";\n\n/**\n * ZCarousel component.\n * @cssprop --z-carousel-gutter - The gutter between items.\n * @cssprop --z-carousel-items-shadow - The shadow around the 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,ukFAClB,MAAAC,EAAeD,E,MCaFE,EAAS,M,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