@zanichelli/albe-web-components 19.1.3-RC3 → 19.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/{index-e84fb4e1.js → index-805390c8.js} +2 -2
- package/dist/cjs/{index-e84fb4e1.js.map → index-805390c8.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-3dc316f8.js → utils-5148245a.js} +69 -24
- package/dist/cjs/utils-5148245a.js.map +1 -0
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-header_12.cjs.entry.js +4 -6
- package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
- package/dist/cjs/z-book-card-deprecated.cjs.entry.js +1 -1
- package/dist/cjs/z-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/z-combobox.cjs.entry.js +62 -50
- package/dist/cjs/z-combobox.cjs.entry.js.map +1 -1
- package/dist/cjs/z-menu.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list-item.cjs.entry.js +1 -1
- package/dist/cjs/z-popover.cjs.entry.js +111 -42
- package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/z-select.cjs.entry.js +28 -63
- package/dist/cjs/z-select.cjs.entry.js.map +1 -1
- package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
- package/dist/cjs/z-slideshow.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper-item.cjs.entry.js +3 -3
- package/dist/cjs/z-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/z-stepper.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/z-table.cjs.entry.js +2 -2
- package/dist/cjs/z-toggle-switch.cjs.entry.js +1 -1
- package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/z-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/z-tr.cjs.entry.js +2 -2
- package/dist/collection/components/list/z-list-group/index.js +2 -39
- package/dist/collection/components/list/z-list-group/index.js.map +1 -1
- package/dist/collection/components/z-combobox/index.js +63 -48
- package/dist/collection/components/z-combobox/index.js.map +1 -1
- package/dist/collection/components/z-combobox/styles.css +0 -6
- package/dist/collection/components/z-input-message/index.js +1 -1
- package/dist/collection/components/z-input-message/index.js.map +1 -1
- package/dist/collection/components/z-popover/index.js +111 -42
- package/dist/collection/components/z-popover/index.js.map +1 -1
- package/dist/collection/components/z-popover/index.stories.js +49 -0
- package/dist/collection/components/z-popover/index.stories.js.map +1 -1
- package/dist/collection/components/z-popover/styles.css +0 -16
- package/dist/collection/components/z-select/index.js +27 -62
- package/dist/collection/components/z-select/index.js.map +1 -1
- package/dist/collection/components/z-stepper/index.js +1 -1
- package/dist/collection/components/z-stepper/index.js.map +1 -1
- package/dist/collection/components/z-stepper-item/index.js +3 -3
- package/dist/collection/components/z-stepper-item/index.js.map +1 -1
- package/dist/collection/components/z-tooltip/styles.css +7 -6
- package/dist/collection/utils/utils.js +66 -22
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index13.js +1 -1
- package/dist/components/index13.js.map +1 -1
- package/dist/components/index16.js +3 -7
- package/dist/components/index16.js.map +1 -1
- package/dist/components/index24.js +111 -42
- package/dist/components/index24.js.map +1 -1
- package/dist/components/index25.js +1 -1
- package/dist/components/utils.js +67 -23
- package/dist/components/utils.js.map +1 -1
- package/dist/components/z-combobox.js +65 -51
- package/dist/components/z-combobox.js.map +1 -1
- package/dist/components/z-select.js +27 -62
- package/dist/components/z-select.js.map +1 -1
- package/dist/components/z-stepper-item.js +3 -3
- package/dist/components/z-stepper-item.js.map +1 -1
- package/dist/components/z-stepper.js +1 -1
- package/dist/components/z-stepper.js.map +1 -1
- package/dist/components/z-tooltip.js +1 -1
- package/dist/components/z-tooltip.js.map +1 -1
- package/dist/esm/{index-92064825.js → index-8a9f6d27.js} +2 -2
- package/dist/esm/{index-92064825.js.map → index-8a9f6d27.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-6e2be2b6.js → utils-e66d94c3.js} +68 -24
- package/dist/esm/utils-e66d94c3.js.map +1 -0
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-header_12.entry.js +4 -6
- package/dist/esm/z-app-header_12.entry.js.map +1 -1
- package/dist/esm/z-book-card-deprecated.entry.js +1 -1
- package/dist/esm/z-breadcrumb.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +62 -50
- package/dist/esm/z-combobox.entry.js.map +1 -1
- package/dist/esm/z-menu.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +1 -1
- package/dist/esm/z-popover.entry.js +111 -42
- package/dist/esm/z-popover.entry.js.map +1 -1
- package/dist/esm/z-select.entry.js +28 -63
- package/dist/esm/z-select.entry.js.map +1 -1
- package/dist/esm/z-skip-to-content.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-stepper-item.entry.js +3 -3
- package/dist/esm/z-stepper-item.entry.js.map +1 -1
- package/dist/esm/z-stepper.entry.js +1 -1
- package/dist/esm/z-stepper.entry.js.map +1 -1
- package/dist/esm/z-table.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +1 -1
- package/dist/esm/z-tooltip.entry.js +1 -1
- package/dist/esm/z-tooltip.entry.js.map +1 -1
- package/dist/esm/z-tr.entry.js +2 -2
- package/dist/types/components/list/z-list-group/index.d.ts +0 -8
- package/dist/types/components/z-combobox/index.d.ts +8 -1
- package/dist/types/components/z-popover/index.d.ts +15 -4
- package/dist/types/components/z-popover/index.stories.d.ts +8 -0
- package/dist/types/components.d.ts +2 -18
- package/dist/types/utils/utils.d.ts +14 -8
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-2bf54364.js → p-030257b3.js} +2 -2
- package/{www/build/p-8bd4a2aa.entry.js → dist/web-components-library/p-1844a4f4.entry.js} +2 -2
- package/dist/web-components-library/{p-539f99db.entry.js → p-19f5b6a9.entry.js} +2 -2
- package/dist/web-components-library/{p-ce6e18f9.entry.js → p-1c7550f9.entry.js} +2 -2
- package/dist/web-components-library/p-22ba2a17.entry.js +2 -0
- package/dist/web-components-library/p-22ba2a17.entry.js.map +1 -0
- package/dist/web-components-library/{p-28d83c86.entry.js → p-307c9c33.entry.js} +2 -2
- package/dist/web-components-library/p-334cba5d.entry.js +2 -0
- package/dist/web-components-library/p-334cba5d.entry.js.map +1 -0
- package/dist/web-components-library/p-33d2a5db.entry.js +2 -0
- package/dist/web-components-library/p-33d2a5db.entry.js.map +1 -0
- package/{www/build/p-2e0923bd.entry.js → dist/web-components-library/p-3f5aa623.entry.js} +2 -2
- package/dist/web-components-library/{p-ee223a82.entry.js → p-75e47ecf.entry.js} +2 -2
- package/dist/web-components-library/p-75e47ecf.entry.js.map +1 -0
- package/dist/web-components-library/{p-b3f1b5c1.entry.js → p-99210133.entry.js} +2 -2
- package/dist/web-components-library/p-b71a3f69.entry.js +2 -0
- package/dist/web-components-library/{p-6cff173f.entry.js.map → p-b71a3f69.entry.js.map} +1 -1
- package/dist/web-components-library/{p-7ceddb7a.entry.js → p-b7ec2cc4.entry.js} +2 -2
- package/dist/web-components-library/p-b7ec2cc4.entry.js.map +1 -0
- package/dist/web-components-library/{p-4aaf0172.entry.js → p-b96900bb.entry.js} +2 -2
- package/dist/web-components-library/{p-57314d68.entry.js → p-cc18a2b7.entry.js} +2 -2
- package/dist/web-components-library/p-cc18a2b7.entry.js.map +1 -0
- package/dist/web-components-library/p-d2035d26.entry.js +2 -0
- package/{www/build/p-5f94986f.entry.js → dist/web-components-library/p-daa1ffe9.entry.js} +2 -2
- package/dist/web-components-library/p-e6778114.js +2 -0
- package/dist/web-components-library/p-e6778114.js.map +1 -0
- package/{www/build/p-7194003a.entry.js → dist/web-components-library/p-e9e2ceb4.entry.js} +2 -2
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/dist/web-components-library/web-components-library.esm.js.map +1 -1
- package/package.json +2 -3
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-2bf54364.js → p-030257b3.js} +2 -2
- package/{dist/web-components-library/p-8bd4a2aa.entry.js → www/build/p-1844a4f4.entry.js} +2 -2
- package/www/build/{p-539f99db.entry.js → p-19f5b6a9.entry.js} +2 -2
- package/www/build/{p-ce6e18f9.entry.js → p-1c7550f9.entry.js} +2 -2
- package/www/build/p-22ba2a17.entry.js +2 -0
- package/www/build/p-22ba2a17.entry.js.map +1 -0
- package/www/build/{p-28d83c86.entry.js → p-307c9c33.entry.js} +2 -2
- package/www/build/p-334cba5d.entry.js +2 -0
- package/www/build/p-334cba5d.entry.js.map +1 -0
- package/www/build/p-33d2a5db.entry.js +2 -0
- package/www/build/p-33d2a5db.entry.js.map +1 -0
- package/{dist/web-components-library/p-2e0923bd.entry.js → www/build/p-3f5aa623.entry.js} +2 -2
- package/www/build/{p-ee223a82.entry.js → p-75e47ecf.entry.js} +2 -2
- package/www/build/p-75e47ecf.entry.js.map +1 -0
- package/www/build/p-7646bea0.js +2 -0
- package/www/build/{p-b3f1b5c1.entry.js → p-99210133.entry.js} +2 -2
- package/www/build/p-b71a3f69.entry.js +2 -0
- package/www/build/{p-6cff173f.entry.js.map → p-b71a3f69.entry.js.map} +1 -1
- package/www/build/{p-7ceddb7a.entry.js → p-b7ec2cc4.entry.js} +2 -2
- package/www/build/p-b7ec2cc4.entry.js.map +1 -0
- package/www/build/{p-4aaf0172.entry.js → p-b96900bb.entry.js} +2 -2
- package/www/build/{p-57314d68.entry.js → p-cc18a2b7.entry.js} +2 -2
- package/www/build/p-cc18a2b7.entry.js.map +1 -0
- package/www/build/p-d2035d26.entry.js +2 -0
- package/{dist/web-components-library/p-5f94986f.entry.js → www/build/p-daa1ffe9.entry.js} +2 -2
- package/www/build/p-e6778114.js +2 -0
- package/www/build/p-e6778114.js.map +1 -0
- package/{dist/web-components-library/p-7194003a.entry.js → www/build/p-e9e2ceb4.entry.js} +2 -2
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.esm.js.map +1 -1
- package/www/index.html +1 -1
- package/dist/cjs/utils-3dc316f8.js.map +0 -1
- package/dist/esm/utils-6e2be2b6.js.map +0 -1
- package/dist/web-components-library/p-57314d68.entry.js.map +0 -1
- package/dist/web-components-library/p-625e2cee.js +0 -2
- package/dist/web-components-library/p-625e2cee.js.map +0 -1
- package/dist/web-components-library/p-6cff173f.entry.js +0 -2
- package/dist/web-components-library/p-78146cef.entry.js +0 -2
- package/dist/web-components-library/p-78146cef.entry.js.map +0 -1
- package/dist/web-components-library/p-7ceddb7a.entry.js.map +0 -1
- package/dist/web-components-library/p-ac477ae7.entry.js +0 -2
- package/dist/web-components-library/p-ac477ae7.entry.js.map +0 -1
- package/dist/web-components-library/p-bc2fb71e.entry.js +0 -2
- package/dist/web-components-library/p-bc2fb71e.entry.js.map +0 -1
- package/dist/web-components-library/p-dc156429.entry.js +0 -2
- package/dist/web-components-library/p-ee223a82.entry.js.map +0 -1
- package/www/build/p-57314d68.entry.js.map +0 -1
- package/www/build/p-625e2cee.js +0 -2
- package/www/build/p-625e2cee.js.map +0 -1
- package/www/build/p-6cff173f.entry.js +0 -2
- package/www/build/p-78146cef.entry.js +0 -2
- package/www/build/p-78146cef.entry.js.map +0 -1
- package/www/build/p-7ceddb7a.entry.js.map +0 -1
- package/www/build/p-ac477ae7.entry.js +0 -2
- package/www/build/p-ac477ae7.entry.js.map +0 -1
- package/www/build/p-bc2fb71e.entry.js +0 -2
- package/www/build/p-bc2fb71e.entry.js.map +0 -1
- package/www/build/p-dc156429.entry.js +0 -2
- package/www/build/p-e13b193a.js +0 -2
- package/www/build/p-ee223a82.entry.js.map +0 -1
- /package/dist/web-components-library/{p-2bf54364.js.map → p-030257b3.js.map} +0 -0
- /package/dist/web-components-library/{p-8bd4a2aa.entry.js.map → p-1844a4f4.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-539f99db.entry.js.map → p-19f5b6a9.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-ce6e18f9.entry.js.map → p-1c7550f9.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-28d83c86.entry.js.map → p-307c9c33.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2e0923bd.entry.js.map → p-3f5aa623.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-b3f1b5c1.entry.js.map → p-99210133.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-4aaf0172.entry.js.map → p-b96900bb.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-dc156429.entry.js.map → p-d2035d26.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-5f94986f.entry.js.map → p-daa1ffe9.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-7194003a.entry.js.map → p-e9e2ceb4.entry.js.map} +0 -0
- /package/www/build/{p-2bf54364.js.map → p-030257b3.js.map} +0 -0
- /package/www/build/{p-8bd4a2aa.entry.js.map → p-1844a4f4.entry.js.map} +0 -0
- /package/www/build/{p-539f99db.entry.js.map → p-19f5b6a9.entry.js.map} +0 -0
- /package/www/build/{p-ce6e18f9.entry.js.map → p-1c7550f9.entry.js.map} +0 -0
- /package/www/build/{p-28d83c86.entry.js.map → p-307c9c33.entry.js.map} +0 -0
- /package/www/build/{p-2e0923bd.entry.js.map → p-3f5aa623.entry.js.map} +0 -0
- /package/www/build/{p-b3f1b5c1.entry.js.map → p-99210133.entry.js.map} +0 -0
- /package/www/build/{p-4aaf0172.entry.js.map → p-b96900bb.entry.js.map} +0 -0
- /package/www/build/{p-dc156429.entry.js.map → p-d2035d26.entry.js.map} +0 -0
- /package/www/build/{p-5f94986f.entry.js.map → p-daa1ffe9.entry.js.map} +0 -0
- /package/www/build/{p-7194003a.entry.js.map → p-e9e2ceb4.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZSelectStyle0","ZSelect","constructor","hostRef","this","flattenedList","itemsList","itemIdKeyMap","resetKey","randomId","ControlSize","BIG","toggleSelectUl","bind","handleSelectFocus","watchItems","getInitialItemsArray","selectedItem","findSelectedItem","getFocusedItemHandler","e","focusedItemId","target","id","getSelectedItem","getValue","getSelectedValue","setValue","value","values","push","length","updateSelection","emitOptionSelect","optionSelect","emit","htmlid","selected","emitResetSelect","resetSelect","componentWillLoad","componentWillRender","filterItems","searchString","updateFlattenedList","items","JSON","parse","mapSelectedItemToItemsArray","initialItemsList","_a","getGroupedItems","Object","entries","reduce","group","item","category","orderedItems","hasGroupItems","map","flat","flattenTreeItems","forEach","key","getPlainText","html","doc","DOMParser","parseFromString","body","textContent","prevList","assign","name","hasTreeItems","filterTree","filter","toUpperCase","includes","getHighlightedText","matchingParent","match","newItem","children","showChildrenOfMatchingParent","text","search","upperText","upperSearch","start","indexOf","end","substring","hasAutocomplete","boolean","autocomplete","handleInputChange","detail","isOpen","selectedId","found","selectItem","disabled","flatItems","index","flatten","subItems","disabledAncestor","itm","isDisabled","arrowsSelectNav","idOrReset","showResetIcon","resetItem","arrows","KeyboardCode","ARROW_DOWN","ARROW_UP","preventDefault","stopPropagation","f","unshift","currentIndex","findIndex","k","focusSelectItem","lastIndex","newIndex","elemId","elem","host","querySelector","focus","selfFocusOnClose","readonly","document","addEventListener","removeEventListener","handleInputClick","closest","KeyboardEvent","ESC","TAB","clickedElement","getClickedElement","hasAttribute","getElementTree","find","nodeName","toLowerCase","zSelect","scrollToLetter","letter","foundItem","charAt","renderInput","ariaExpanded","ariaControls","ariaActivedescendant","wrapperAriaComboboxAttributes","inputAriaComboboxAttributes","role","replace","h","class","placeholder","label","ariaLabel","icon","hasclearicon","message","status","undefined","size","onClick","onKeyDown","current","onInputChange","onKeyPress","renderSelectUl","fixed","isfixed","tabindex","listSizeType","renderResetItem","renderSelectUlItems","hide","clickable","dividerType","ListDividerType","ELEMENT","ListSize","MEDIUM","onClickItem","renderItem","lastItem","thisItemKey","HEADER","innerHTML","NONE","SMALL","X_SMALL","renderNoSearchResults","renderGroupedTree","renderSelectGroupItems","array","isLastItem","parentHasSiblings","renderTreeItems","isLastChild","isTopLevel","hasDivider","_b","tabIndex","ENTER","title","child","arr","groupedItems","some","groupItems","ariaLabelledby","slot","i","style","zIndex","height","isLastGroup","subindex","noresultslabel","renderMessage","render"],"sources":["src/components/z-select/styles.css?tag=z-select&encapsulation=scoped","src/components/z-select/index.tsx"],"sourcesContent":[":host {\n display: inline-block;\n width: inherit;\n color: var(--color-form-default-text);\n font-family: var(--font-family-sans);\n font-size: var(--font-size-3);\n font-weight: var(--font-rg);\n}\n\n:host([size=\"small\"]),\n:host([size=\"x-small\"]) {\n font-size: var(--font-size-2);\n}\n\n.select-wrapper > z-input {\n width: 100%;\n}\n\n.select-wrapper > z-input .input-icon {\n cursor: pointer;\n}\n\n.select-wrapper > div {\n position: relative;\n}\n\n.select-wrapper > div.closed {\n overflow: hidden;\n height: 0;\n}\n\n.select-wrapper .ul-scroll-wrapper {\n position: absolute;\n width: 100%;\n box-sizing: border-box;\n border-top: none;\n background: var(--color-form-background);\n box-shadow: var(--shadow-2);\n outline: none;\n}\n\n.select-wrapper .closed .ul-scroll-wrapper {\n z-index: 10;\n}\n\n.select-wrapper .open .ul-scroll-wrapper {\n z-index: 20;\n}\n\n.select-wrapper .ul-scroll-wrapper.fixed {\n position: static;\n}\n\n.select-wrapper z-list {\n --background-color-list-element: var(--color-form-background);\n --background-hover-color-list-element: var(--color-surface02);\n --background-active-color-list-element: var(--color-surface02);\n}\n\n.select-wrapper .ul-scroll-wrapper > z-list {\n position: relative;\n overflow: auto;\n max-height: 240px;\n padding: var(--space-unit) calc(var(--space-unit) * 1.5);\n margin: 0;\n outline: none;\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element[disabled] {\n color: var(--color-form-disabled03);\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container {\n display: flex;\n align-items: center;\n padding: calc(var(--space-unit) / 2) var(--space-unit);\n column-gap: var(--space-unit);\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container .list-element-content {\n margin-right: auto;\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon + .list-element-content {\n padding: calc(var(--space-unit) * 0.5) var(--space-unit);\n}\n\n:host([size=\"x-small\"])\n .select-wrapper\n .ul-scroll-wrapper\n z-list\n z-list-element\n .list-element-container\n .list-element-content {\n padding: 0;\n}\n\n:host([size=\"small\"]) .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon {\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n}\n\n:host([size=\"x-small\"]) .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon {\n --z-icon-width: 14px;\n --z-icon-height: 14px;\n}\n\n:host([size=\"x-small\"])\n .select-wrapper\n .ul-scroll-wrapper\n z-list\n z-list-element\n .list-element-container\n > z-icon\n + .list-element-content {\n padding: 0 var(--space-unit);\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container .list-element-content.selected {\n font-weight: var(--font-sb);\n}\n\n.select-wrapper .ul-scroll-wrapper .no-results z-icon {\n margin-right: var(--space-unit);\n}\n\n.z-list-group-title {\n color: var(--color-form-default-text);\n}\n\n.reset-item {\n color: var(--color-form-active-primary);\n fill: var(--color-form-active-primary);\n}\n\n.reset-item-content {\n display: flex;\n align-items: center;\n}\n\n.reset-item.reset-item-margin .reset-item-content {\n margin-left: var(--space-unit);\n}\n\n.reset-item .reset-item-content > z-icon {\n margin-right: var(--space-unit);\n}\n\n.reset-item.hide {\n display: none;\n}\n\n.tree-list-reset-item {\n padding: var(--space-unit) 0;\n}\n\nz-list-element {\n position: relative;\n display: block;\n}\n\nz-list z-list-element::before {\n position: absolute;\n z-index: 100;\n top: 3px;\n left: -8px;\n width: 8px;\n height: 1em;\n border-bottom: 1px solid var(--color-form-disabled01-icon);\n border-left: 1px solid var(--color-form-disabled01-icon);\n content: \"\";\n cursor: pointer;\n}\n\nz-list z-list-element::after {\n position: absolute;\n z-index: 100;\n top: 5px;\n left: -8px;\n width: 8px;\n height: 100%;\n border-left: 1px solid var(--color-form-disabled01-icon);\n content: \"\";\n cursor: pointer;\n}\n\nz-list z-list-element:last-child::after {\n display: none;\n}\n\nz-list > z-list-element::before,\nz-list > z-list-element::after,\nz-list > z-list-group > z-list-element::before,\nz-list > z-list-group > z-list-element::after {\n display: none;\n}\n\nz-list > div.children-node {\n padding-left: calc(var(--space-unit) * 2);\n}\n\nz-list-element > .list-element {\n display: flex;\n justify-content: space-between;\n padding: calc(var(--space-unit) * 1.5) var(--space-unit);\n cursor: pointer;\n}\n\nz-list-element > .list-element:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\nz-list-element:not([disabled]) > .list-element:hover,\nz-list-element:not([disabled]) > .list-element:hover::after {\n background-color: var(--background-hover-color-list-element, var(--color-background));\n}\n\nz-list-element > .list-element .item.ellipsis {\n overflow: hidden;\n}\n\nz-list-element .list-element::after {\n position: absolute;\n top: 0;\n right: -1px;\n display: block;\n width: 100%;\n height: 45px;\n content: \"\";\n transform: translateX(-100%);\n}\n\nz-list-element.tree-search-item {\n padding-top: 0;\n}\n\nz-list-element.tree-search-item .list-element::after {\n position: absolute;\n right: -25px;\n display: block;\n width: 100%;\n height: 45px;\n content: \"\";\n transform: translateX(-100%);\n}\n\nz-list-element.grouped-tree-parent-node .list-element::after {\n position: absolute;\n right: -25px;\n display: block;\n width: 100%;\n height: 45px;\n content: \"\";\n transform: translateX(-100%);\n}\n\n.item-label.selected {\n font-weight: bold;\n}\n\n.item.ellipsis {\n display: inline-block;\n overflow: hidden;\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\nz-list > z-list-element.grouped-tree-parent-node > .list-element:hover::after,\nz-list-element.tree-search-item .list-element:hover::after,\nz-list > z-list-group > z-list-element.grouped-tree-parent-node > .list-element:hover::after {\n position: absolute;\n z-index: -1;\n right: -18px;\n display: block;\n width: 100%;\n height: 45px;\n content: \"\";\n transform: translateX(-100%);\n}\n\nz-list-element > .list-element:hover::after {\n position: absolute;\n z-index: -1;\n top: 0;\n right: 0;\n display: block;\n width: 100%;\n height: 45px;\n content: \"\";\n transform: translateX(-100%);\n}\n\n.children-node z-list-element::before,\n.children-node z-list-element::after {\n left: -8px;\n}\n\n.children-node .children-node z-list-element::before,\n.children-node .children-node z-list-element::after {\n left: -8px;\n}\n\n.children-node > z-list-element {\n padding: 0;\n}\n","import {Component, Element, Event, EventEmitter, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ControlSize, InputStatus, KeyboardCode, ListDividerType, ListSize, SelectItem} from \"../../beans\";\nimport {boolean, getClickedElement, getElementTree, randomId} from \"../../utils/utils\";\n\n@Component({\n tag: \"z-select\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZSelect {\n @Element() host: HTMLZSelectElement;\n\n /** the id of the input element */\n @Prop()\n htmlid = `id-${randomId()}`;\n\n /** the input select options */\n @Prop()\n items: SelectItem[] | string = [];\n\n /** the input name */\n @Prop()\n name?: string;\n\n /** the input label */\n @Prop()\n label?: string;\n\n /** the input aria-label */\n @Prop()\n ariaLabel = \"\";\n\n /** the input is disabled */\n @Prop()\n disabled?: boolean = false;\n\n /** the input is readonly */\n @Prop()\n readonly?: boolean = false;\n\n /** the input placeholder (optional) */\n @Prop()\n placeholder?: string;\n\n /** the input html title (optional) */\n @Prop()\n htmltitle?: string;\n\n /** the input status (optional) */\n @Prop()\n status?: InputStatus;\n\n /** input helper message (optional) - if set to `false` message won't be displayed */\n @Prop()\n message?: string | boolean = true;\n\n /** the input has autocomplete option */\n @Prop()\n autocomplete?: boolean = false;\n\n /** no result text message */\n @Prop()\n noresultslabel?: string = \"Nessun risultato\";\n\n /** */\n @Prop()\n hasGroupItems?: boolean;\n\n /** */\n @Prop()\n hasTreeItems?: boolean;\n\n /** If true and an item matches the search string, children of matching item are shown even if they don't match the search string */\n @Prop()\n showChildrenOfMatchingParent?: boolean;\n\n /** When fixed, it occupies space and pushes down next elements. */\n @Prop()\n isfixed?: boolean = false;\n\n /** */\n @Prop()\n resetItem?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop()\n size?: ControlSize = ControlSize.BIG;\n\n @State()\n isOpen = false;\n\n @State()\n selectedItem: null | SelectItem = null;\n\n @State()\n focusedItemId: string;\n\n @State()\n searchString: null | string;\n\n private flattenedList: {item: SelectItem; key: number}[] = [];\n\n private itemsList: SelectItem[] = [];\n\n private itemIdKeyMap: Record<string, number> = {};\n\n private readonly resetKey = -1;\n\n constructor() {\n this.toggleSelectUl = this.toggleSelectUl.bind(this);\n this.handleSelectFocus = this.handleSelectFocus.bind(this);\n }\n\n @Watch(\"items\")\n watchItems(): void {\n this.itemsList = this.getInitialItemsArray();\n\n this.selectedItem = this.findSelectedItem(this.itemsList);\n }\n\n @Listen(\"ariaDescendantFocus\")\n getFocusedItemHandler(e: CustomEvent): void {\n this.focusedItemId = (e.target as Element).id;\n }\n\n /** get the input selected options */\n @Method()\n async getSelectedItem(): Promise<SelectItem> {\n return this.selectedItem;\n }\n\n /** get the input value */\n @Method()\n async getValue(): Promise<string> {\n return this.getSelectedValue();\n }\n\n /** set the input value */\n @Method()\n async setValue(value: string | string[]): Promise<void> {\n let values: string[] = [];\n if (typeof value === \"string\") {\n values.push(value);\n } else {\n values = value;\n }\n\n this.itemsList = this.getInitialItemsArray();\n if (values.length) {\n this.updateSelection(this.itemsList, values[0]);\n }\n this.selectedItem = this.findSelectedItem(this.itemsList);\n }\n\n /** Emitted on select option selection, returns select id, selected item id */\n @Event()\n optionSelect: EventEmitter;\n\n private emitOptionSelect(): void {\n this.optionSelect.emit({\n id: this.htmlid,\n selected: this.getSelectedValue(),\n });\n }\n\n /** Emitted on reset selected item, returns select id, selected item id */\n @Event()\n resetSelect: EventEmitter;\n\n private emitResetSelect(): void {\n this.resetSelect.emit({\n id: this.htmlid,\n });\n }\n\n componentWillLoad(): void {\n this.watchItems();\n }\n\n componentWillRender(): void {\n this.filterItems(this.searchString);\n this.updateFlattenedList();\n }\n\n private getInitialItemsArray(): SelectItem[] {\n return typeof this.items === \"string\" ? JSON.parse(this.items) : this.items;\n }\n\n private mapSelectedItemToItemsArray(): SelectItem[] {\n const initialItemsList = this.getInitialItemsArray();\n\n this.updateSelection(initialItemsList, this.selectedItem?.id);\n\n return initialItemsList;\n }\n\n private getSelectedValue(): string {\n return this.selectedItem?.id;\n }\n\n private getGroupedItems(): [string, SelectItem[]][] {\n if (!this.itemsList.length) {\n return [];\n }\n\n return Object.entries(\n this.itemsList.reduce(\n (group, item) => {\n const category = item.category || \"Altra categoria\";\n group[category] = group[category] || [];\n group[category].push(item);\n\n return group;\n },\n {} as Record<string, SelectItem[]>\n )\n );\n }\n\n private updateFlattenedList(): void {\n let orderedItems: SelectItem[];\n if (this.hasGroupItems) {\n orderedItems = this.getGroupedItems()\n .map((item) => item[1])\n .flat();\n } else {\n orderedItems = this.itemsList;\n }\n\n this.flattenedList = this.flattenTreeItems(orderedItems);\n this.itemIdKeyMap = {};\n this.flattenedList.forEach(({item, key}) => {\n this.itemIdKeyMap[item.id] = key;\n });\n }\n\n private getPlainText(html: string): string {\n const doc = new DOMParser().parseFromString(html, \"text/html\");\n\n return doc.body.textContent || \"\";\n }\n\n private filterItems(searchString: string): void {\n let prevList = this.mapSelectedItemToItemsArray();\n\n if (!searchString?.length) {\n this.itemsList = prevList;\n\n return;\n }\n\n prevList = prevList.map((item) => ({...item, name: this.getPlainText(item.name)}));\n\n if (this.hasTreeItems) {\n this.itemsList = this.filterTree(prevList, searchString, false);\n } else {\n this.itemsList = prevList\n .filter((item: SelectItem) => item.name.toUpperCase().includes(searchString.toUpperCase()))\n .map((item: SelectItem) => {\n item.name = this.getHighlightedText(item.name, searchString);\n\n return item;\n });\n }\n }\n\n private filterTree(items: SelectItem[], searchString: string, matchingParent: boolean): SelectItem[] {\n if (!items) {\n return [];\n }\n\n return items\n .map((item) => {\n const match = item.name.toUpperCase().includes(searchString.toUpperCase());\n\n const newItem: SelectItem = {...item};\n if (newItem.children && newItem.children.length > 0) {\n newItem.children = this.filterTree(\n newItem.children.map((item) => ({...item, name: this.getPlainText(item.name)})),\n searchString,\n match\n );\n }\n\n if (match) {\n newItem.name = this.getHighlightedText(newItem.name, searchString);\n }\n if (\n match ||\n (newItem.children && newItem.children.length > 0) ||\n (this.showChildrenOfMatchingParent && matchingParent)\n ) {\n return newItem;\n }\n\n return null;\n })\n .filter((item) => item !== null) as SelectItem[];\n }\n\n private getHighlightedText(text: string, search: string): string {\n const upperText = text.toUpperCase();\n const upperSearch = search.toUpperCase();\n const start = upperText.indexOf(upperSearch);\n\n if (start === -1) {\n return text;\n }\n\n const end = start + search.length;\n\n return text.substring(0, start) + `<strong>${text.substring(start, end)}</strong>` + text.substring(end);\n }\n\n private hasAutocomplete(): boolean {\n return boolean(this.autocomplete) === true;\n }\n\n private handleInputChange(e: CustomEvent): void {\n this.searchString = e.detail.value;\n if (!this.isOpen) {\n this.toggleSelectUl();\n }\n }\n\n private updateSelection(items: SelectItem[], selectedId: string): void {\n if (items) {\n items.forEach((item) => {\n item.selected = item.id === selectedId;\n if (item.children && item.children.length > 0) {\n this.updateSelection(item.children, selectedId);\n }\n });\n }\n }\n\n private findSelectedItem(items: SelectItem[]): SelectItem | null {\n if (items) {\n for (const item of items) {\n if (item.selected) {\n return item;\n }\n if (item.children && item.children.length > 0) {\n const found = this.findSelectedItem(item.children);\n if (found) {\n return found;\n }\n }\n }\n }\n\n return null;\n }\n\n private selectItem(selected: null | SelectItem): void {\n if (selected?.disabled) {\n return;\n }\n\n this.itemsList = this.getInitialItemsArray();\n\n if (selected) {\n this.updateSelection(this.itemsList, selected.id);\n }\n\n this.selectedItem = this.findSelectedItem(this.itemsList);\n this.emitOptionSelect();\n this.toggleSelectUl();\n if (this.searchString) {\n this.searchString = null;\n }\n }\n\n private flattenTreeItems(items: SelectItem[]): {item: SelectItem; key: number}[] {\n const flatItems: {item: SelectItem; key: number}[] = [];\n let index = 0;\n\n const flatten = (subItems: SelectItem[], disabledAncestor?: boolean): void => {\n subItems.forEach((itm) => {\n const isDisabled = itm.disabled || disabledAncestor;\n flatItems.push({item: {...itm, disabled: isDisabled}, key: index++});\n if (itm.children && itm.children.length > 0) {\n flatten(itm.children, isDisabled);\n }\n });\n };\n\n if (items) {\n flatten(items);\n }\n\n return flatItems;\n }\n\n private arrowsSelectNav(e: KeyboardEvent, idOrReset: string | number): void {\n const showResetIcon = this.resetItem && !!this.selectedItem;\n const arrows = [KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP];\n\n if (!arrows.includes(e.key as KeyboardCode)) {\n return;\n }\n\n e.preventDefault();\n e.stopPropagation();\n\n const flatItems = [...this.flattenedList].filter((f) => !f.item.disabled);\n\n if (this.resetItem && showResetIcon) {\n flatItems.unshift({\n item: {id: \"__RESET_ITEM__\"} as SelectItem,\n key: this.resetKey,\n });\n }\n\n if (!flatItems.length) {\n return;\n }\n\n let currentIndex: number;\n if (typeof idOrReset === \"number\") {\n currentIndex = flatItems.findIndex((f) => f.key === idOrReset);\n } else {\n const k = this.itemIdKeyMap[idOrReset];\n currentIndex = flatItems.findIndex((f) => f.key === k);\n }\n\n if (!this.isOpen) {\n this.toggleSelectUl();\n\n if (currentIndex > -1) {\n this.focusSelectItem(flatItems[currentIndex].key);\n\n return;\n }\n }\n\n if (currentIndex > -1 && !this.focusedItemId) {\n this.focusSelectItem(flatItems[currentIndex].key);\n }\n\n const lastIndex = flatItems.length - 1;\n\n let newIndex = currentIndex;\n\n if (e.key === KeyboardCode.ARROW_DOWN) {\n do {\n if (newIndex === lastIndex) {\n return;\n }\n\n newIndex = newIndex + 1;\n } while (flatItems[newIndex].item.disabled);\n } else {\n do {\n if (newIndex <= 0) {\n return;\n }\n\n newIndex = newIndex - 1;\n } while (flatItems[newIndex].item.disabled);\n }\n\n this.focusSelectItem(flatItems[newIndex].key);\n }\n\n private focusSelectItem(key: number): void {\n const elemId = `${this.htmlid}_key_${key}`;\n const elem = this.host.querySelector<HTMLDivElement>(`#${elemId}`);\n if (elem) {\n this.focusedItemId = elemId;\n elem.focus();\n }\n }\n\n private toggleSelectUl(selfFocusOnClose = false): void {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (!this.isOpen) {\n document.addEventListener(\"click\", this.handleSelectFocus);\n document.addEventListener(\"keyup\", this.handleSelectFocus);\n } else {\n document.removeEventListener(\"click\", this.handleSelectFocus);\n document.removeEventListener(\"keyup\", this.handleSelectFocus);\n if (selfFocusOnClose) {\n (this.host.querySelector(`#${this.htmlid}_select_input`) as HTMLInputElement)?.focus();\n }\n\n if (this.selectedItem && this.searchString) {\n this.searchString = null;\n this.filterItems(this.searchString);\n }\n }\n\n this.focusedItemId = \"\";\n this.isOpen = !this.isOpen;\n }\n\n private handleInputClick(e: MouseEvent | KeyboardEvent): void {\n if ((e.target as HTMLElement).closest(\".reset-icon\")) {\n e.stopPropagation();\n\n return;\n }\n\n this.toggleSelectUl();\n }\n\n private handleSelectFocus(e: MouseEvent | KeyboardEvent): void {\n if (e instanceof KeyboardEvent && e.key === KeyboardCode.ESC) {\n e.stopPropagation();\n\n return this.toggleSelectUl(true);\n }\n\n if (e instanceof KeyboardEvent && e.key !== KeyboardCode.TAB) {\n return;\n }\n\n const clickedElement = getClickedElement();\n if (clickedElement?.hasAttribute(\"disabled\")) {\n return;\n }\n\n if (\n !getElementTree(clickedElement).find(\n (elem: HTMLElement) => elem.nodeName.toLowerCase() === \"z-input\" && elem.id === `${this.htmlid}_input`\n )\n ) {\n const zSelect = getElementTree(clickedElement).find((e) => e.nodeName === \"Z-SELECT\");\n this.toggleSelectUl(zSelect === this.host);\n }\n }\n\n private scrollToLetter(letter: string): void {\n if (!this.itemsList.length) {\n return;\n }\n\n const foundItem = this.itemsList.findIndex(\n (item: SelectItem) => item.name.toLowerCase().charAt(0) === letter.toLowerCase()\n );\n if (foundItem > -1) {\n if (!this.isOpen) {\n this.toggleSelectUl();\n }\n this.focusSelectItem(this.itemIdKeyMap[this.itemsList[foundItem].id]);\n }\n }\n\n private renderInput(): HTMLElement[] {\n const ariaExpanded = this.isOpen ? \"true\" : \"false\";\n const ariaControls = `${this.htmlid}_list`;\n const ariaActivedescendant = this.isOpen ? this.focusedItemId : \"\";\n\n let wrapperAriaComboboxAttributes, inputAriaComboboxAttributes;\n\n if (this.hasAutocomplete()) {\n wrapperAriaComboboxAttributes = {};\n inputAriaComboboxAttributes = {\n \"role\": \"combobox\",\n \"html-aria-expanded\": ariaExpanded,\n \"html-aria-controls\": ariaControls,\n \"html-aria-activedescendant\": ariaActivedescendant,\n \"html-aria-autocomplete\": \"list\",\n };\n } else {\n wrapperAriaComboboxAttributes = {\n \"role\": \"combobox\",\n \"aria-expanded\": ariaExpanded,\n \"aria-controls\": ariaControls,\n \"aria-activedescendant\": ariaActivedescendant,\n };\n inputAriaComboboxAttributes = {role: \"presentation\"};\n }\n\n let value = null;\n if (!this.isOpen && this.selectedItem) {\n value = this.selectedItem.name.replace(/<[^>]+>/g, \"\");\n }\n if (this.isOpen && this.searchString) {\n value = this.searchString;\n }\n\n return [\n <z-input\n class={{\n \"active-select\": this.isOpen,\n \"cursor-select\": !this.autocomplete,\n }}\n id={`${this.htmlid}_input`}\n htmlid={`${this.htmlid}_select_input`}\n placeholder={this.placeholder}\n value={value}\n label={this.label}\n autocomplete=\"off\"\n aria-label={this.ariaLabel}\n icon={this.isOpen ? \"caret-up\" : \"caret-down\"}\n hasclearicon={false}\n message={false}\n name={this.name}\n disabled={this.disabled}\n readonly={this.readonly || (!this.hasAutocomplete() && this.isOpen)}\n status={this.isOpen ? undefined : this.status}\n size={this.size}\n {...inputAriaComboboxAttributes}\n onClick={(e: MouseEvent) => {\n this.handleInputClick(e);\n }}\n onKeyDown={(e: KeyboardEvent) => {\n const current = this.selectedItem\n ? this.itemIdKeyMap[this.selectedItem.id]\n : this.resetItem\n ? this.resetKey\n : \"\";\n\n return this.arrowsSelectNav(e, current);\n }}\n onInputChange={(e: CustomEvent) => {\n this.handleInputChange(e);\n }}\n onKeyPress={(e: KeyboardEvent) => {\n if (!this.hasAutocomplete()) {\n e.preventDefault();\n this.scrollToLetter(e.key);\n }\n }}\n />,\n <div {...wrapperAriaComboboxAttributes}></div>,\n ];\n }\n\n private renderSelectUl(): HTMLDivElement {\n return (\n <div class={this.isOpen ? \"open\" : \"closed\"}>\n <div\n class={{\n \"ul-scroll-wrapper\": true,\n \"fixed\": this.isfixed,\n }}\n >\n <z-list\n role=\"listbox\"\n aria-label={this.ariaLabel || this.label}\n tabindex={this.disabled || this.readonly || !this.isOpen ? -1 : 0}\n id={`${this.htmlid}_list`}\n aria-multiselectable={false}\n size={this.listSizeType()}\n class={{\n \"disabled\": this.disabled,\n \"readonly\": this.readonly,\n [`input-${this.status}`]: !this.isOpen && !!this.status,\n \"z-scrollbar\": true,\n }}\n >\n {this.resetItem && this.renderResetItem()}\n {this.renderSelectUlItems()}\n </z-list>\n </div>\n </div>\n );\n }\n\n private renderResetItem(): HTMLZListElementElement {\n return (\n <z-list-element\n class={{\n \"hide\": !this.selectedItem || !this.resetItem,\n \"reset-item\": true,\n \"reset-item-margin\": !this.hasGroupItems,\n }}\n clickable={true}\n disabled={false}\n dividerType={ListDividerType.ELEMENT}\n role=\"option\"\n html-tabindex={0}\n aria-selected=\"false\"\n id={`${this.htmlid}_key_${this.resetKey}`}\n size={this.hasTreeItems ? ListSize.MEDIUM : this.listSizeType()}\n onClickItem={() => {\n this.selectedItem = null;\n this.searchString = null;\n this.emitResetSelect();\n }}\n onKeyDown={(e: KeyboardEvent) => this.arrowsSelectNav(e, this.resetKey)}\n >\n <div\n class={{\n \"reset-item-content\": true,\n \"tree-list-reset-item\": this.hasTreeItems,\n }}\n >\n <z-icon name=\"multiply-circled\" />\n <span>{this.resetItem}</span>\n </div>\n </z-list-element>\n );\n }\n\n private renderItem(item: SelectItem, lastItem: boolean): HTMLZListElementElement {\n const thisItemKey = this.itemIdKeyMap[item.id];\n\n return (\n <z-list-element\n clickable={!item.disabled}\n disabled={item.disabled}\n dividerType={lastItem ? ListDividerType.HEADER : ListDividerType.ELEMENT}\n role=\"option\"\n html-tabindex={\n item.disabled || !this.isOpen || this.focusedItemId !== `${this.htmlid}_key_${thisItemKey}` ? -1 : 0\n }\n aria-selected={item.selected ? \"true\" : \"false\"}\n id={`${this.htmlid}_key_${thisItemKey}`}\n size={this.listSizeType()}\n onClickItem={() => this.selectItem(item)}\n onKeyDown={(e: KeyboardEvent) => this.arrowsSelectNav(e, thisItemKey)}\n >\n <div class=\"list-element-container\">\n <div\n class={{\n \"selected\": !!item.selected,\n \"list-element-content\": true,\n }}\n innerHTML={item.name}\n />\n {item.icon && <z-tag icon={item.icon}></z-tag>}\n </div>\n </z-list-element>\n );\n }\n\n private listSizeType(): ListSize {\n if (this.hasTreeItems) {\n return ListSize.NONE;\n }\n\n if (this.size === ControlSize.SMALL || this.size === ControlSize.X_SMALL) {\n return ListSize.SMALL;\n }\n\n return ListSize.MEDIUM;\n }\n\n private renderSelectUlItems():\n | HTMLZListElementElement\n | (HTMLZListElementElement | HTMLZListElementElement[])[]\n | HTMLZListGroupElement[] {\n if (!this.itemsList.length) {\n return this.renderNoSearchResults();\n }\n\n if (this.hasGroupItems) {\n if (this.hasTreeItems) {\n return this.renderGroupedTree();\n }\n\n return this.renderSelectGroupItems();\n }\n\n return this.itemsList.map((item: SelectItem, index, array) => {\n const isLastItem = index === array.length - 1;\n const parentHasSiblings = array.length > 1;\n\n if (this.hasTreeItems) {\n return this.renderTreeItems(item, isLastItem, parentHasSiblings, true, item.disabled);\n }\n\n return this.renderItem(item, isLastItem);\n });\n }\n\n private renderTreeItems(\n item: SelectItem,\n isLastChild: boolean,\n parentHasSiblings: boolean,\n isTopLevel?: boolean,\n disabledAncestor?: boolean\n ): HTMLZListElementElement[] {\n const thisItemKey = this.itemIdKeyMap[item.id];\n const isDisabled = item.disabled || disabledAncestor;\n\n const hasDivider = this.hasGroupItems\n ? undefined\n : this.hasGroupItems\n ? isLastChild && !parentHasSiblings\n ? ListDividerType.ELEMENT\n : undefined\n : isTopLevel && parentHasSiblings && !isLastChild\n ? ListDividerType.ELEMENT\n : undefined;\n\n return (\n <z-list-element\n clickable={!item.disabled}\n disabled={isDisabled}\n class={{\n \"grouped-tree-parent-node\": this.hasGroupItems && !!item.children?.length,\n \"tree-search-item\": this.hasGroupItems && isTopLevel && !item.children?.length && !!this.searchString,\n }}\n size={this.listSizeType()}\n dividerType={hasDivider}\n hasTreeItems={this.hasTreeItems}\n html-tabindex={null}\n role=\"presentation\"\n >\n <div\n id={`${this.htmlid}_key_${thisItemKey}`}\n role=\"option\"\n class=\"list-element\"\n tabIndex={!this.isOpen || isDisabled || this.focusedItemId !== `${this.htmlid}_key_${thisItemKey}` ? -1 : 0}\n onClick={() => this.selectItem(item)}\n onKeyDown={(e: KeyboardEvent) => {\n this.arrowsSelectNav(e, thisItemKey);\n if (e.key === KeyboardCode.ENTER) {\n this.selectItem(item);\n }\n }}\n >\n <span class=\"item ellipsis\">\n <span\n class={{\n \"item-label\": true,\n \"selected\": !!item.selected,\n }}\n title={item.name}\n innerHTML={item.name}\n />\n </span>\n {item.icon && <z-tag icon={item.icon}></z-tag>}\n </div>\n {item.children && item.children.length > 0 ? (\n <z-list role=\"presentation\">\n <div class=\"children-node\">\n {item.children.map((child, index, arr) =>\n this.renderTreeItems(\n child,\n index === arr.length - 1,\n arr.length > 1,\n false, // isTopLevel = false for children\n isDisabled\n )\n )}\n </div>\n </z-list>\n ) : null}\n </z-list-element>\n );\n }\n\n private renderGroupedTree(): HTMLZListGroupElement[] {\n const groupedItems = this.getGroupedItems();\n\n return groupedItems.map(([category, items], index, entries) => {\n const parentHasSiblings = Object.values(groupedItems).some((groupItems) => groupItems.length > 1);\n\n return (\n <z-list-group\n divider-type={index === entries.length - 1 ? undefined : ListDividerType.ELEMENT}\n hasTreeItems={true}\n ariaLabelledby={`${this.htmlid}_tree_${index}`}\n >\n <span\n class=\"body-3-sb z-list-group-title\"\n slot=\"header-title\"\n id={`${this.htmlid}_tree_${index}`}\n aria-hidden=\"true\"\n >\n {category}\n </span>\n <z-list role=\"presentation\">\n {items.map((item, i, arr) => [\n this.renderTreeItems(item, i === arr.length - 1, parentHasSiblings, true, item.disabled),\n i < arr.length - 1 ? (\n <z-divider\n key={`divider-${i}`}\n style={{zIndex: \"100\", height: \"var(--border-size-small)\"}}\n />\n ) : null,\n ])}\n </z-list>\n {index !== entries.length - 1 && <z-divider style={{zIndex: \"100\", height: \"var(--border-size-small)\"}} />}\n </z-list-group>\n );\n });\n }\n\n private renderSelectGroupItems(): HTMLZListElementElement[] {\n const groupedItems = this.getGroupedItems();\n\n return groupedItems.map(([key, items], index) => {\n const isLastGroup = groupedItems.length === index + 1;\n\n return (\n <z-list-group\n divider-type={ListDividerType.ELEMENT}\n ariaLabelledby={`${this.htmlid}_group_${index}`}\n >\n <span\n class=\"body-3-sb z-list-group-title\"\n slot=\"header-title\"\n id={`${this.htmlid}_group_${index}`}\n aria-hidden=\"true\"\n >\n {key}\n </span>\n {items.map((item, subindex) => {\n const isLastItem = items.length === subindex + 1;\n\n return this.renderItem(item, isLastGroup && isLastItem);\n })}\n </z-list-group>\n );\n });\n }\n\n private renderNoSearchResults(): HTMLZListElementElement {\n return (\n <z-list-element\n class=\"no-results\"\n size={this.hasTreeItems ? ListSize.MEDIUM : this.listSizeType()}\n html-tabindex={null}\n role=\"presentation\"\n >\n {this.noresultslabel}\n </z-list-element>\n );\n }\n\n private renderMessage(): HTMLZInputMessageElement {\n if (boolean(this.message) === false) {\n return;\n }\n\n return (\n <z-input-message\n message={boolean(this.message) === true ? undefined : (this.message as string)}\n status={this.status}\n class={this.size}\n disabled={this.disabled}\n />\n );\n }\n\n render(): HTMLDivElement {\n return (\n <div class=\"select-wrapper\">\n {this.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XzC,GAEFnB,EAAMe,KAAI,CAACJ,EAAM6K,KAChB,MAAMtB,EAAalK,EAAMd,SAAWsM,EAAW,EAE/C,OAAOjO,KAAK+L,WAAW3I,EAAM4K,GAAerB,EAAW,IAE5C,G,CAKb,qBAAAJ,GACN,OACEvC,EAAA,kBACEC,MAAM,aACNS,KAAM1K,KAAKuE,aAAeqH,EAASC,OAAS7L,KAAKoL,eAAc,gBAChD,KACftB,KAAK,gBAEJ9J,KAAKkO,e,CAKJ,aAAAC,GACN,GAAIxI,EAAQ3F,KAAKuK,WAAa,MAAO,CACnC,M,CAGF,OACEP,EAAA,mBACEO,QAAS5E,EAAQ3F,KAAKuK,WAAa,KAAOE,UAAazK,KAAKuK,QAC5DC,OAAQxK,KAAKwK,OACbP,MAAOjK,KAAK0K,KACZvE,SAAUnG,KAAKmG,U,CAKrB,MAAAiI,GACE,OACEpE,EAAA,OAAApG,IAAA,2CAAKqG,MAAM,kBACRjK,KAAKwJ,cACLxJ,KAAKgL,iBACLhL,KAAKmO,gB","ignoreList":[]}
|
package/www/build/p-625e2cee.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g as n,p as t}from"./p-17af7fb2.js";import{B as e}from"./p-5145a606.js";function r(n){switch(n){case true:case"true":case 1:case"1":case"on":case"yes":return true;case false:case"false":case 0:case"0":case"off":case"no":return false;default:return n}}function s(){return Math.random().toString(36).replace("0.","")}function a(t,e,...r){if(t.code===n.ENTER||t.code===n.SPACE){t.preventDefault();e(...r)}}function o(t,e,...r){if(t.code===n.ENTER){t.preventDefault();e(...r)}}function c(n=null){if(!n){n=document.activeElement}if(n&&n.shadowRoot&&n.shadowRoot.activeElement){n=n.shadowRoot.activeElement;return c(n)}return n}function i(n,t=[]){t.push(n);if(n.parentElement){n=n.parentElement;return i(n,t)}else if(n.parentNode&&n.parentNode.host){n=n.parentNode.host;return i(n,t)}return t}function u(){switch(true){case window.innerWidth<=e.MOBILE:return t.MOBILE;case window.innerWidth<=e.TABLET:return t.TABLET;case window.innerWidth<=e.DESKTOP:return t.DESKTOP;default:return t.DESKTOP_WIDE}}function f(n){try{return JSON.parse(n)}catch(n){return false}}function l(n){const t="avatar-C";const e=19;const r=Math.ceil(2**31-1)*parseFloat(`0.${n}`);let s=Math.ceil(e*(r%1));if(s===0){s=1}return`${t}${s.toString().padStart(2,"0")}`}function d(n,t){var e;return n.contains(t)||!!((e=n.shadowRoot)===null||e===void 0?void 0:e.contains(t))}function w(n){if(n.parentNode===n.shadowRoot){return n.shadowRoot.host}return n.parentElement}function h(n){let t=w(n);while(t&&t!==n.ownerDocument.documentElement){const n=window.getComputedStyle(t);const{overflow:e,overflowX:r,overflowY:s}=n;const a=e==="hidden"||s==="hidden"||r==="hidden";const o=t.scrollHeight>t.clientHeight&&e!=="visible"&&s!=="visible"||t.scrollWidth>t.clientWidth&&e!=="visible"&&r!=="visible";if(!a&&o){return t}t=w(t)}return n.ownerDocument.documentElement}function v(n,t){const e=n.getBoundingClientRect();const r=n.ownerDocument.documentElement.clientWidth;const s=n.ownerDocument.documentElement.clientHeight;const a=e.bottom>0&&e.top<s&&e.right>0&&e.left<r;if(t===n.ownerDocument.documentElement||t===n.ownerDocument.body){return a}const o=t.getBoundingClientRect();const c=e.bottom>o.top&&e.top<o.bottom&&e.right>o.left&&e.left<o.right;return c&&a}export{d as a,r as b,l as c,a as d,i as e,c as f,u as g,o as h,f as i,h as j,v as k,s as r};
|
|
2
|
-
//# sourceMappingURL=p-625e2cee.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["boolean","value","randomId","Math","random","toString","replace","handleKeyboardSubmit","ev","callback","args","code","KeyboardCode","ENTER","SPACE","preventDefault","handleEnterKeydSubmit","getClickedElement","elem","document","activeElement","shadowRoot","getElementTree","tree","push","parentElement","parentNode","host","getDevice","window","innerWidth","Breakpoints","MOBILE","Device","TABLET","DESKTOP","DESKTOP_WIDE","convertJson","data","JSON","parse","_a","colorFromId","id","prefix","colorsCount","seed","ceil","parseFloat","color","padStart","containsElement","ancestor","descendant","contains","getParentElement","element","findScrollableParent","parent","ownerDocument","documentElement","style","getComputedStyle","overflow","overflowX","overflowY","hasHiddenOverflow","isScrollable","scrollHeight","clientHeight","scrollWidth","clientWidth","isElementVisibleInContainer","container","elemRect","getBoundingClientRect","documentWidth","documentHeight","isVisibleInViewport","bottom","top","right","left","body","containerRect","isVisibleInContainer"],"sources":["src/utils/utils.ts"],"sourcesContent":["import {ChildNode} from \"@stencil/core\";\nimport {Device, KeyboardCode} from \"../beans/index\";\nimport {Breakpoints} from \"../constants/breakpoints\";\n\n/**\n * Return boolean value for passed value if a boolean corresponding value is found\n * Return passed value otherwise\n */\nexport function boolean(value: string | number | boolean): boolean | string | number {\n switch (value) {\n case true:\n case \"true\":\n case 1:\n case \"1\":\n case \"on\":\n case \"yes\":\n return true;\n case false:\n case \"false\":\n case 0:\n case \"0\":\n case \"off\":\n case \"no\":\n return false;\n default:\n return value;\n }\n}\n\nexport function retrieveAsset(assetName: string): string {\n return assetName && \"assets/images/png/\" + assetName;\n}\n\nexport function randomId(): string {\n return Math.random().toString(36).replace(\"0.\", \"\");\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function handleKeyboardSubmit(ev: KeyboardEvent, callback: (...args) => void, ...args: any[]): void {\n if (ev.code === KeyboardCode.ENTER || ev.code === KeyboardCode.SPACE) {\n ev.preventDefault();\n callback(...args);\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function handleEnterKeydSubmit(ev: KeyboardEvent, callback: (...args) => void, ...args: any[]): void {\n if (ev.code === KeyboardCode.ENTER) {\n ev.preventDefault();\n callback(...args);\n }\n}\n\nexport function getClickedElement(elem: null | Element = null): null | Element {\n if (!elem) {\n elem = document.activeElement;\n }\n\n if (elem && elem.shadowRoot && elem.shadowRoot.activeElement) {\n elem = elem.shadowRoot.activeElement;\n\n return getClickedElement(elem);\n }\n\n return elem;\n}\n\nexport function getElementTree(elem: Element, tree: Element[] = []): null | Element[] {\n tree.push(elem);\n\n if (elem.parentElement) {\n elem = elem.parentElement;\n\n return getElementTree(elem, tree);\n } else if (elem.parentNode && (elem.parentNode as ShadowRoot).host) {\n elem = (elem.parentNode as ShadowRoot).host;\n\n return getElementTree(elem, tree);\n }\n\n return tree;\n}\n\nexport function getSiblings(elem: HTMLElement): ChildNode[] {\n const siblings = [];\n if (!elem || !elem.parentNode || !elem.parentNode.childNodes) {\n return siblings;\n }\n\n elem.parentNode.childNodes.forEach((child) => {\n if (child.nodeType === 1 && child !== elem) {\n siblings.push(child);\n }\n });\n\n return siblings;\n}\n\n/**\n * Get the current device type based on the window width.\n * @returns {Device} - The current device type\n */\nexport function getDevice(): Device {\n switch (true) {\n case window.innerWidth <= Breakpoints.MOBILE:\n return Device.MOBILE;\n case window.innerWidth <= Breakpoints.TABLET:\n return Device.TABLET;\n case window.innerWidth <= Breakpoints.DESKTOP:\n return Device.DESKTOP;\n default:\n return Device.DESKTOP_WIDE;\n }\n}\n\ntype JSONValue = string | number | boolean | JSONObject | JSONArray;\ninterface JSONObject {\n [x: string]: JSONValue;\n}\ntype JSONArray = JSONValue[];\n\nexport function convertJson(data: string): JSONValue {\n try {\n return JSON.parse(data);\n } catch {\n return false;\n }\n}\n\nexport function colorFromId(id: number): string {\n const prefix = \"avatar-C\"; // prefix for color vars name\n const colorsCount = 19; // available colors\n const seed = Math.ceil(2 ** 31 - 1) * parseFloat(`0.${id}`);\n let color = Math.ceil(colorsCount * (seed % 1));\n\n // if result of mc is 0\n // es.: 3895229\n if (color === 0) {\n color = 1;\n }\n\n return `${prefix}${color.toString().padStart(2, \"0\")}`;\n}\n\n/**\n * Check if the passed CSS selector is valid.\n * @param selector CSS selector to validate\n */\nexport function isSelectorValid(selector: string): boolean {\n try {\n document.createDocumentFragment().querySelector(selector);\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Check if an element contains another element, checking both light and shadow DOM.\n * @param ancestor Ancestor element\n * @param descendant Descendant element\n */\nexport function containsElement(ancestor: HTMLElement, descendant: Node): boolean {\n return ancestor.contains(descendant) || !!ancestor.shadowRoot?.contains(descendant);\n}\n\n/** Get the parent of passed element, accounting for shadow DOM.\n * @param element The element whose parent is to be found.\n */\nexport function getParentElement(element: Element): Element {\n if (element.parentNode === element.shadowRoot) {\n return element.shadowRoot.host;\n }\n\n return element.parentElement;\n}\n\n/**\n * Find the nearest ancestor of an element to take as a reference for positioning.\n * The chosen ancestor is the first to have an overflow set to hidden or is scrollable.\n * Falls back to the `offsetParent` of the element (the closest positioned ancestor, for example the one with `position: relative`).\n * @link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent\n */\nexport function findScrollableParent(element: HTMLElement): HTMLElement {\n let parent = getParentElement(element);\n\n while (parent && parent !== element.ownerDocument.documentElement) {\n const style = window.getComputedStyle(parent);\n const {overflow, overflowX, overflowY} = style;\n const hasHiddenOverflow = overflow === \"hidden\" || overflowY === \"hidden\" || overflowX === \"hidden\";\n const isScrollable =\n (parent.scrollHeight > parent.clientHeight && overflow !== \"visible\" && overflowY !== \"visible\") ||\n (parent.scrollWidth > parent.clientWidth && overflow !== \"visible\" && overflowX !== \"visible\");\n\n if (!hasHiddenOverflow && isScrollable) {\n return parent as HTMLElement;\n }\n\n parent = getParentElement(parent);\n }\n\n return element.ownerDocument.documentElement;\n}\n\n/**\n * Check if the element is visible within the container or in the viewport.\n * @param element The element to check.\n * @param container The container to check against, which must be the nearest scrollable ancestor.\n */\nexport function isElementVisibleInContainer(element: HTMLElement, container: HTMLElement): boolean {\n const elemRect = element.getBoundingClientRect();\n const documentWidth = element.ownerDocument.documentElement.clientWidth;\n const documentHeight = element.ownerDocument.documentElement.clientHeight;\n\n // Check if element is visible in viewport\n const isVisibleInViewport =\n elemRect.bottom > 0 && elemRect.top < documentHeight && elemRect.right > 0 && elemRect.left < documentWidth;\n\n // If container is the document element, only check viewport visibility\n if (container === element.ownerDocument.documentElement || container === element.ownerDocument.body) {\n return isVisibleInViewport;\n }\n\n // For other containers, check both container and viewport visibility\n const containerRect = container.getBoundingClientRect();\n const isVisibleInContainer =\n elemRect.bottom > containerRect.top &&\n elemRect.top < containerRect.bottom &&\n elemRect.right > containerRect.left &&\n elemRect.left < containerRect.right;\n\n return isVisibleInContainer && isVisibleInViewport;\n}\n"],"mappings":"wFAQgBA,EAAQC,GACtB,OAAQA,GACN,KAAK,KACL,IAAK,OACL,KAAK,EACL,IAAK,IACL,IAAK,KACL,IAAK,MACH,OAAO,KACT,KAAK,MACL,IAAK,QACL,KAAK,EACL,IAAK,IACL,IAAK,MACL,IAAK,KACH,OAAO,MACT,QACE,OAAOA,EAEb,C,SAMgBC,IACd,OAAOC,KAAKC,SAASC,SAAS,IAAIC,QAAQ,KAAM,GAClD,C,SAGgBC,EAAqBC,EAAmBC,KAAgCC,GACtF,GAAIF,EAAGG,OAASC,EAAaC,OAASL,EAAGG,OAASC,EAAaE,MAAO,CACpEN,EAAGO,iBACHN,KAAYC,E,CAEhB,C,SAGgBM,EAAsBR,EAAmBC,KAAgCC,GACvF,GAAIF,EAAGG,OAASC,EAAaC,MAAO,CAClCL,EAAGO,iBACHN,KAAYC,E,CAEhB,C,SAEgBO,EAAkBC,EAAuB,MACvD,IAAKA,EAAM,CACTA,EAAOC,SAASC,a,CAGlB,GAAIF,GAAQA,EAAKG,YAAcH,EAAKG,WAAWD,cAAe,CAC5DF,EAAOA,EAAKG,WAAWD,cAEvB,OAAOH,EAAkBC,E,CAG3B,OAAOA,CACT,C,SAEgBI,EAAeJ,EAAeK,EAAkB,IAC9DA,EAAKC,KAAKN,GAEV,GAAIA,EAAKO,cAAe,CACtBP,EAAOA,EAAKO,cAEZ,OAAOH,EAAeJ,EAAMK,E,MACvB,GAAIL,EAAKQ,YAAeR,EAAKQ,WAA0BC,KAAM,CAClET,EAAQA,EAAKQ,WAA0BC,KAEvC,OAAOL,EAAeJ,EAAMK,E,CAG9B,OAAOA,CACT,C,SAqBgBK,IACd,OAAQ,MACN,KAA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T,C,CAGTA,EAASH,EAAiBG,E,CAG5B,OAAOF,EAAQG,cAAcC,eAC/B,C,SAOgBY,EAA4BhB,EAAsBiB,GAChE,MAAMC,EAAWlB,EAAQmB,wBACzB,MAAMC,EAAgBpB,EAAQG,cAAcC,gBAAgBW,YAC5D,MAAMM,EAAiBrB,EAAQG,cAAcC,gBAAgBS,aAG7D,MAAMS,EACJJ,EAASK,OAAS,GAAKL,EAASM,IAAMH,GAAkBH,EAASO,MAAQ,GAAKP,EAASQ,KAAON,EAGhG,GAAIH,IAAcjB,EAAQG,cAAcC,iBAAmBa,IAAcjB,EAAQG,cAAcwB,KAAM,CACnG,OAAOL,C,CAIT,MAAMM,EAAgBX,EAAUE,wBAChC,MAAMU,EACJX,EAASK,OAASK,EAAcJ,KAChCN,EAASM,IAAMI,EAAcL,QAC7BL,EAASO,MAAQG,EAAcF,MAC/BR,EAASQ,KAAOE,EAAcH,MAEhC,OAAOI,GAAwBP,CACjC,Q","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,a as o}from"./p-75c4a726.js";const s=":host{position:relative;display:flex;width:100%;max-width:100%;box-sizing:border-box;flex-direction:row;padding:0;margin:0;font-family:var(--font-family-sans);font-weight:var(--font-rg);list-style:none}@media (min-width: 768px){:host{padding:0 calc(var(--space-unit) * 2)}}";const a=s;const e=class{constructor(i){t(this,i)}render(){return i(o,{key:"88b305b670ea7d879cb2e976ff66510b10c7e460",role:"list"},i("slot",{key:"09b3507f40fdabb48273360f7864f577bcf15365"}))}};e.style=a;export{e as z_stepper};
|
|
2
|
-
//# sourceMappingURL=p-6cff173f.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as o,a as s,g as r}from"./p-75c4a726.js";import{P as i,g as n,p as a}from"./p-17af7fb2.js";import{a as h,j as c,g as f,k as p}from"./p-625e2cee.js";import"./p-5145a606.js";const u=':host{position:fixed;display:none;max-width:calc(100% - var(--grid-margin) * 2);max-height:calc(100% - var(--grid-margin) * 2);padding:var(--z-popover-padding, 0);background:var(--z-popover-theme--surface, var(--color-surface01));border-radius:var(--border-radius-small);color:var(--z-popover-theme--text, var(--color-default-text));fill:currentcolor;filter:var(--z-popover-shadow-filter, drop-shadow(0 1px 2px var(--shadow-color-base)));text-align:center;visibility:hidden;}:host([open]:not([open="false"])[current-position]){display:block}:host([center][current-position="top"]),:host([center][current-position="bottom"]){transform:translateX(-50%)}:host([center][current-position="right"]),:host([center][current-position="left"]){transform:translateY(-50%)}:host([current-position^="top"]){margin:0 0 var(--space-unit)}:host([current-position^="bottom"]){margin:var(--space-unit) 0 0}:host([current-position^="left"]){margin:0 var(--space-unit) 0 0}:host([current-position^="right"]){margin:0 0 0 var(--space-unit)}:host([current-position])::before{--arrow-size:6px;--arrow-edge-offset:calc(100% - var(--space-unit) - (var(--arrow-size) / 2));--arrow-center-x-offset:calc(50% - (var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - (var(--arrow-size) / 2));position:absolute;display:block;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface, var(--color-surface01));content:"";transform:rotate(45deg)}:host([show-arrow="false"])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^="top"])::before{top:var(--arrow-center-y-offset)}:host([current-position^="bottom"])::before{bottom:var(--arrow-center-y-offset)}:host([current-position="top"])::before,:host([current-position="bottom"])::before{right:var(--arrow-edge-offset)}:host([current-position="right"])::before,:host([current-position="left"])::before{bottom:var(--arrow-edge-offset)}:host([current-position="right"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left"])::before{left:var(--arrow-center-y-offset)}:host([current-position="top_right"])::before,:host([current-position="bottom_right"])::before{right:var(--arrow-edge-offset)}:host([current-position="top_left"])::before,:host([current-position="bottom_left"])::before{left:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="left_top"])::before{top:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="right_bottom"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left_top"])::before,:host([current-position="left_bottom"])::before{left:var(--arrow-center-y-offset)}:host([current-position="right_bottom"])::before,:host([current-position="left_bottom"])::before{bottom:var(--arrow-edge-offset)}:host([center][current-position="top"])::before,:host([center][current-position="bottom"])::before{right:auto;left:var(--arrow-center-x-offset)}:host([center][current-position="right"])::before,:host([center][current-position="left"])::before{top:var(--arrow-center-x-offset);bottom:auto}';const l=u;const b=class{constructor(o){t(this,o);this.positionChange=e(this,"positionChange",7);this.openChange=e(this,"openChange",7);this.spaceTolerance=3;this.position=i.TOP;this.open=false;this.bindTo=undefined;this.showArrow=false;this.center=false;this.closable=true;this.currentPosition=undefined}closePopoverWithKeyboard(t){if(this.closable&&t.key===n.ESC){this.open=false}}handleOutsideClick(t){const e=t.target;if(!this.closable||!this.open||h(this.host,e)){return}if(h(this.boundElement,e)){t.stopPropagation()}this.open=false}validatePosition(t){if(!Object.values(i).includes(t)||t===i.AUTO){t=i.TOP;this.position=t}this.currentPosition=t;if(this.open){this.setPosition()}}onOpen(){cancelAnimationFrame(this.animationFrameRequestId);this.openChange.emit({open:this.open});if(!this.open){Object.assign(this.host.style,{top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"",maxHeight:"",visibility:"hidden"});this.currentPosition=undefined;return}const t=()=>{if(!this.open){return}this.setPosition();this.animationFrameRequestId=requestAnimationFrame(t)};setTimeout((()=>{t()}),0)}onBindingChange(){this.findBoundElement()}get offsetModifier(){return this.center?.5:0}findBoundElement(){if(typeof this.bindTo==="string"){this.boundElement=this.host.ownerDocument.querySelector(this.bindTo)}else if(this.bindTo){this.boundElement=this.bindTo}else{this.boundElement=this.host.parentElement}}hasCenteredHorizontalSpace(t,e,o,s){const r=(o-s)*(1-this.offsetModifier);if(!this.center){return e>=r-this.spaceTolerance}return e>=r-this.spaceTolerance&&t>=r-this.spaceTolerance}hasCenteredVerticalSpace(t,e,o,s){const r=(o-s)*(1-this.offsetModifier);if(!this.center){return e>=r-this.spaceTolerance}return t>=r-this.spaceTolerance&&e>=r-this.spaceTolerance}hasEnoughSideSpace(t,e,o,s){return t>=e-o*(1-s)-this.spaceTolerance}getOptimalPopoverPosition(t,e){const o=this.host.offsetWidth;const s=this.host.offsetHeight;const r=this.boundElement.getBoundingClientRect().width;const n=this.boundElement.getBoundingClientRect().height;const a=this.offsetModifier;const h=t=>{switch(t){case i.TOP:return e.top>=s-this.spaceTolerance&&this.hasCenteredHorizontalSpace(e.left,e.right,o,r);case i.TOP_RIGHT:return e.top>=s&&this.hasEnoughSideSpace(e.right,o,r,a);case i.TOP_LEFT:return e.top>=s&&this.hasEnoughSideSpace(e.left,o,r,a);case i.RIGHT:return e.right>=o&&this.hasCenteredVerticalSpace(e.top,e.bottom,s,n);case i.RIGHT_BOTTOM:return e.right>=o&&this.hasEnoughSideSpace(e.bottom,s,n,a);case i.RIGHT_TOP:return e.right>=o&&this.hasEnoughSideSpace(e.top,s,n,a);case i.BOTTOM:return e.bottom>=s&&this.hasCenteredHorizontalSpace(e.left,e.right,o,r);case i.BOTTOM_LEFT:return e.bottom>=s&&this.hasEnoughSideSpace(e.left,o,r,a);case i.BOTTOM_RIGHT:return e.bottom>=s&&this.hasEnoughSideSpace(e.right,o,r,a);case i.LEFT:return e.left>=o&&this.hasCenteredVerticalSpace(e.top,e.bottom,s,n);case i.LEFT_TOP:return e.left>=o&&this.hasEnoughSideSpace(e.top,s,n,a);case i.LEFT_BOTTOM:return e.left>=o&&this.hasEnoughSideSpace(e.bottom,s,n,a);default:return false}};if(h(t)){return t}const c=b.positionOrder;const f=c.indexOf(t);if(f===-1){return t}for(let t=1;t<c.length;t++){const e=(f+t)%c.length;const o=c[e];if(h(o)){return o}}return this.findBestFallbackPosition(e)}findBestFallbackPosition(t){const e=t.right>=t.left?i.RIGHT:i.LEFT;const o=t.bottom>=t.top?i.BOTTOM:i.TOP;const s=Math.max(t.right,t.left);const r=Math.max(t.bottom,t.top);const n=r>=s?o:e;let a=false;if(n===o){const e=Math.min(t.right,t.left);a=s>=e*2}else{const e=Math.min(t.bottom,t.top);a=r>=e*2}if(!a){return n}const h=n===o?e:o;return`${n}_${h}`}calculateAvailableSpace(){const t=this.boundElement.getBoundingClientRect();if(this.lastBoundRect&&this.lastBoundRect.x===t.x&&this.lastBoundRect.y===t.y&&this.lastBoundRect.width===t.width&&this.lastBoundRect.height===t.height&&this.cachedAvailableSpace){return this.cachedAvailableSpace}this.lastBoundRect=t;const e=c(this.boundElement);const o=e.getBoundingClientRect();const s=e!==this.boundElement.ownerDocument.documentElement;const r=this.boundElement.ownerDocument.documentElement.clientWidth;const i=this.boundElement.ownerDocument.documentElement.clientHeight;const n=8;const a=s?o.top:0;const h=s?r-o.right:0;const f=s?i-o.bottom:0;const p=s?o.left:0;this.cachedAvailableSpace={top:t.top-a-n,right:r-t.right-h-n,bottom:i-t.bottom-f-n,left:t.left-p-n};return this.cachedAvailableSpace}calculateElementOffsets(t){const e=t.getBoundingClientRect();const o=t.ownerDocument.documentElement.clientWidth;const s=t.ownerDocument.documentElement.clientHeight;return{top:e.top,right:o-e.right,bottom:s-e.bottom,left:e.left}}applyPositionStyles(t,e){const o=this.boundElement.offsetWidth;const s=this.boundElement.offsetHeight;const r=8;const n=this.offsetModifier;const h=this.showArrow&&this.center?8:0;const c=this.host.style;const p=this.calculateElementOffsets(this.boundElement);let u;let l;switch(t){case i.TOP:case i.TOP_RIGHT:c.bottom=`${p.bottom+s}px`;c.left=`${p.left+o*n-(t===i.TOP_RIGHT?h:0)}px`;l=e.top-r;if(t===i.TOP_RIGHT){u=e.right+o*n}break;case i.TOP_LEFT:c.right=`${p.right+o*n-h}px`;c.bottom=`${p.bottom+s}px`;u=e.left+o*n;l=e.top-r;break;case i.BOTTOM:case i.BOTTOM_RIGHT:c.top=`${p.top+s}px`;c.left=`${p.left+o*n-(t===i.BOTTOM_RIGHT?h:0)}px`;l=e.bottom-r;if(t===i.BOTTOM_RIGHT){u=e.right+o*n}break;case i.BOTTOM_LEFT:c.top=`${p.top+s}px`;c.right=`${p.right+o*n-h}px`;u=e.left+o*n;l=e.bottom-r;break;case i.RIGHT:case i.RIGHT_BOTTOM:c.top=`${p.top+s*n-(t===i.RIGHT_BOTTOM?h:0)}px`;c.left=`${p.left+o}px`;u=e.right-r;if(t===i.RIGHT){l=e.top+e.bottom+s}else{l=e.bottom+s*n}break;case i.RIGHT_TOP:c.bottom=`${p.bottom+s*n-h}px`;c.left=`${p.left+o}px`;u=e.right-r;l=e.top+s*n;break;case i.LEFT:case i.LEFT_BOTTOM:c.top=`${p.top+s*n-(t===i.LEFT_BOTTOM?h:0)}px`;c.right=`${p.right+o}px`;u=e.left-r;if(t===i.LEFT_BOTTOM){l=e.bottom+s*n}break;case i.LEFT_TOP:c.right=`${p.right+o}px`;c.bottom=`${p.bottom+s*n-h}px`;u=e.left-r;l=e.top+s*n;break}if(f()!==a.MOBILE){Object.assign(c,{maxWidth:u?`${u}px`:"",maxHeight:l?`${l}px`:""})}}setPosition(){if(!this.boundElement){return}if(!p(this.boundElement,c(this.boundElement))){this.open=false;return}Object.assign(this.host.style,{top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"",maxHeight:"",visibility:"hidden"});const t=this.calculateAvailableSpace();const e=this.getOptimalPopoverPosition(this.position,t);this.applyPositionStyles(e,t);this.currentPosition=e;this.positionChange.emit({position:this.currentPosition});this.host.style.visibility="visible"}componentWillLoad(){this.validatePosition(this.position)}componentDidLoad(){this.findBoundElement();if(this.open){this.onOpen()}}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}render(){return o(s,{key:"aeb6c7ccabc279af16d9a957e732ad611612589f","current-position":this.currentPosition},o("slot",{key:"77fecb1bbfa49e1a8f97c078e7cef01a03420d9c"}))}get host(){return r(this)}static get watchers(){return{position:["validatePosition"],open:["onOpen"],bindTo:["onBindingChange"]}}};b.positionOrder=[i.TOP,i.TOP_RIGHT,i.TOP_LEFT,i.RIGHT,i.RIGHT_BOTTOM,i.RIGHT_TOP,i.BOTTOM,i.BOTTOM_LEFT,i.BOTTOM_RIGHT,i.LEFT,i.LEFT_TOP,i.LEFT_BOTTOM];b.style=l;export{b as z_popover};
|
|
2
|
-
//# sourceMappingURL=p-78146cef.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZPopoverStyle0","ZPopover","this","spaceTolerance","PopoverPosition","TOP","closePopoverWithKeyboard","e","closable","key","KeyboardCode","ESC","open","handleOutsideClick","target","containsElement","host","boundElement","stopPropagation","validatePosition","newValue","Object","values","includes","AUTO","position","currentPosition","setPosition","onOpen","cancelAnimationFrame","animationFrameRequestId","openChange","emit","assign","style","top","right","bottom","left","maxWidth","maxHeight","visibility","undefined","updatePositionLoop","requestAnimationFrame","setTimeout","onBindingChange","findBoundElement","offsetModifier","center","bindTo","ownerDocument","querySelector","parentElement","hasCenteredHorizontalSpace","availableLeft","availableRight","hostWidth","boundElementWidth","requiredSideSpace","hasCenteredVerticalSpace","availableTop","availableBottom","hostHeight","boundElementHeight","hasEnoughSideSpace","availableSpace","hostSize","boundElementSize","getOptimalPopoverPosition","desiredPosition","offsetWidth","offsetHeight","getBoundingClientRect","width","height","fits","pos","TOP_RIGHT","TOP_LEFT","RIGHT","RIGHT_BOTTOM","RIGHT_TOP","BOTTOM","BOTTOM_LEFT","BOTTOM_RIGHT","LEFT","LEFT_TOP","LEFT_BOTTOM","positions","positionOrder","startIndex","indexOf","i","length","posIndex","findBestFallbackPosition","bestHorizontalDirection","bestVerticalDirection","maxHorizontalSpace","Math","max","maxVerticalSpace","mainDirection","needsSecondaryDirection","minHorizontalSpace","min","minVerticalSpace","secondaryDirection","calculateAvailableSpace","boundElementRect","lastBoundRect","x","y","cachedAvailableSpace","scrollableParent","findScrollableParent","scrollableParentRect","hasNestedScrollableParent","documentElement","documentWidth","clientWidth","documentHeight","clientHeight","safeSpace","deltaTop","deltaRight","deltaBottom","deltaLeft","calculateElementOffsets","element","elementRect","viewportWidth","viewportHeight","applyPositionStyles","distanceFromBound","arrowModifier","showArrow","hostStyle","boundElementOffsets","getDevice","Device","MOBILE","isElementVisibleInContainer","positionChange","componentWillLoad","componentDidLoad","disconnectedCallback","render","h","Host"],"sources":["src/components/z-popover/styles.css?tag=z-popover&encapsulation=shadow","src/components/z-popover/index.tsx"],"sourcesContent":[":host {\n --z-popover-theme--surface: ;\n --z-popover-theme--text: ;\n --z-popover-padding: ;\n --z-popover-shadow-filter: ;\n\n position: fixed;\n display: none;\n max-width: calc(100% - var(--grid-margin) * 2);\n max-height: calc(100% - var(--grid-margin) * 2);\n padding: var(--z-popover-padding, 0);\n background: var(--z-popover-theme--surface, var(--color-surface01));\n border-radius: var(--border-radius-small);\n color: var(--z-popover-theme--text, var(--color-default-text));\n fill: currentcolor;\n filter: var(--z-popover-shadow-filter, drop-shadow(0 1px 2px var(--shadow-color-base)));\n text-align: center;\n visibility: hidden; /* hidden by default. the positioning algorithm will set it to 'visible' when needed */\n}\n\n:host([open]:not([open=\"false\"])[current-position]) {\n display: block;\n}\n\n:host([center][current-position=\"top\"]),\n:host([center][current-position=\"bottom\"]) {\n transform: translateX(-50%);\n}\n\n:host([center][current-position=\"right\"]),\n:host([center][current-position=\"left\"]) {\n transform: translateY(-50%);\n}\n\n:host([current-position^=\"top\"]) {\n margin: 0 0 var(--space-unit);\n}\n\n:host([current-position^=\"bottom\"]) {\n margin: var(--space-unit) 0 0;\n}\n\n:host([current-position^=\"left\"]) {\n margin: 0 var(--space-unit) 0 0;\n}\n\n:host([current-position^=\"right\"]) {\n margin: 0 0 0 var(--space-unit);\n}\n\n/* Arrow style */\n\n:host([current-position])::before {\n --arrow-size: 6px;\n --arrow-edge-offset: calc(100% - var(--space-unit) - (var(--arrow-size) / 2));\n --arrow-center-x-offset: calc(50% - (var(--arrow-size) / 2));\n --arrow-center-y-offset: calc(100% - (var(--arrow-size) / 2));\n\n position: absolute;\n display: block;\n width: var(--arrow-size);\n height: var(--arrow-size);\n background: var(--z-popover-theme--surface, var(--color-surface01));\n content: \"\";\n transform: rotate(45deg);\n}\n\n:host([show-arrow=\"false\"])::before,\n:host(:not([show-arrow]))::before {\n display: none;\n}\n\n:host([current-position^=\"top\"])::before {\n top: var(--arrow-center-y-offset);\n}\n\n:host([current-position^=\"bottom\"])::before {\n bottom: var(--arrow-center-y-offset);\n}\n\n:host([current-position=\"top\"])::before,\n:host([current-position=\"bottom\"])::before {\n right: var(--arrow-edge-offset);\n}\n\n:host([current-position=\"right\"])::before,\n:host([current-position=\"left\"])::before {\n bottom: var(--arrow-edge-offset);\n}\n\n:host([current-position=\"right\"])::before {\n right: var(--arrow-center-y-offset);\n}\n\n:host([current-position=\"left\"])::before {\n left: var(--arrow-center-y-offset);\n}\n\n:host([current-position=\"top_right\"])::before,\n:host([current-position=\"bottom_right\"])::before {\n right: var(--arrow-edge-offset);\n}\n\n:host([current-position=\"top_left\"])::before,\n:host([current-position=\"bottom_left\"])::before {\n left: var(--arrow-edge-offset);\n}\n\n:host([current-position=\"right_top\"])::before,\n:host([current-position=\"left_top\"])::before {\n top: var(--arrow-edge-offset);\n}\n\n:host([current-position=\"right_top\"])::before,\n:host([current-position=\"right_bottom\"])::before {\n right: var(--arrow-center-y-offset);\n}\n\n:host([current-position=\"left_top\"])::before,\n:host([current-position=\"left_bottom\"])::before {\n left: var(--arrow-center-y-offset);\n}\n\n:host([current-position=\"right_bottom\"])::before,\n:host([current-position=\"left_bottom\"])::before {\n bottom: var(--arrow-edge-offset);\n}\n\n:host([center][current-position=\"top\"])::before,\n:host([center][current-position=\"bottom\"])::before {\n right: auto;\n left: var(--arrow-center-x-offset);\n}\n\n:host([center][current-position=\"right\"])::before,\n:host([center][current-position=\"left\"])::before {\n top: var(--arrow-center-x-offset);\n bottom: auto;\n}\n","import {Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h} from \"@stencil/core\";\nimport {Device, KeyboardCode, PopoverPosition} from \"../../beans\";\nimport {containsElement, findScrollableParent, getDevice, isElementVisibleInContainer} from \"../../utils/utils\";\n\n/** Centering offset modifier. 0 for no offset, 0.5 for centering. */\ntype OffsetModifier = 0 | 0.5;\ntype Offsets = {top: number; right: number; bottom: number; left: number};\n\n/**\n * Popover component.\n * This component displays a popover bound to an element.\n * It supports various positions and can automatically adjust it based on available space, accounting for scrollable containers.\n *\n * Notes:\n * - If positioning has an odd behavior, consider manually adjusting the size of the slotted elements (using `width`, `height`, `max-width`, `max-height`, etc...) when its content is \"fluid\" (like text), because it can interfere with the position calculation (for example a long text on one single line can be bigger than the available space, letting the algorithm think the popover doesn't fits).\n *\n * @cssprop --z-popover-theme--surface - background color of the popover.\n * @cssprop --z-popover-theme--text - foreground color of the popover.\n * @cssprop --z-popover-padding - padding of the popover.\n * @cssprop --z-popover-shadow-filter - drop-shadow filter of the popover. Defaults to `drop-shadow(0 1px 2px var(--shadow-color-base))`.\n */\n@Component({\n tag: \"z-popover\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZPopover {\n /**\n * The preferred position to render the popover.\n * The popover will automatically search another position if not enough space is available for the preferred position.\n * If the preferred position is not available, it will try to find the best position starting from `TOP` and going clockwise.\n */\n @Prop({reflect: true, mutable: true})\n position?: PopoverPosition = PopoverPosition.TOP;\n\n /** The open state of the popover. */\n @Prop({reflect: true, mutable: true})\n open = false;\n\n /**\n * The selector or the element bound with the popover.\n * If string css selector is provided make sure to use a valid selector.\n */\n @Prop()\n bindTo?: string | HTMLElement;\n\n /** Whether to show popover's arrow. */\n @Prop({reflect: true})\n showArrow = false;\n\n /** Whether to center the popup on the main side (according to \"position\"). */\n @Prop({reflect: true})\n center = false;\n\n /**\n * If true, the popover can be closed by clicking outside of it or pressing the escape key.\n * Otherwise, it will be closed only programmatically (by setting `open` to `false`).\n */\n @Prop()\n closable = true;\n\n /**\n * The current position of the popover.\n * It differs from `position` only when calculated automatically for space reasons.\n */\n @State()\n currentPosition?: PopoverPosition;\n\n @Element() host: HTMLZPopoverElement;\n\n // Clockwise order of positions.\n private static readonly positionOrder: PopoverPosition[] = [\n PopoverPosition.TOP,\n PopoverPosition.TOP_RIGHT,\n PopoverPosition.TOP_LEFT,\n PopoverPosition.RIGHT,\n PopoverPosition.RIGHT_BOTTOM,\n PopoverPosition.RIGHT_TOP,\n PopoverPosition.BOTTOM,\n PopoverPosition.BOTTOM_LEFT,\n PopoverPosition.BOTTOM_RIGHT,\n PopoverPosition.LEFT,\n PopoverPosition.LEFT_TOP,\n PopoverPosition.LEFT_BOTTOM,\n ] as const;\n\n private animationFrameRequestId?: number;\n\n /** space tolerance for space calculations */\n private readonly spaceTolerance = 3;\n\n /** The element bound to the popover. */\n private boundElement?: HTMLElement;\n\n /** Cached available space around the bound element to avoid unnecessary recalculations */\n private cachedAvailableSpace?: Offsets;\n\n /** Last bounding rect of the bound element to detect changes and eventually invalidate the caches. */\n private lastBoundRect?: DOMRect;\n\n /** Fired when the position changes. */\n @Event()\n positionChange: EventEmitter;\n\n /** Open change event. */\n @Event()\n openChange: EventEmitter;\n\n @Listen(\"keyup\", {target: \"window\"})\n closePopoverWithKeyboard(e: KeyboardEvent): void {\n if (this.closable && e.key === KeyboardCode.ESC) {\n this.open = false;\n }\n }\n\n /**\n * Close the popover when clicking outside of its content.\n * Stop event propagation if the click was fired by popover's trigger element,\n * to prevent close and reopen glitches.\n */\n @Listen(\"click\", {target: \"body\", capture: true})\n handleOutsideClick(e: MouseEvent): void {\n const target = e.target as Element;\n if (!this.closable || !this.open || containsElement(this.host, target)) {\n return;\n }\n\n if (containsElement(this.boundElement, target)) {\n // stop propagation if the click was on the trigger element to prevent close and reopen glitches\n e.stopPropagation();\n }\n this.open = false;\n }\n\n @Watch(\"position\")\n validatePosition(newValue: PopoverPosition): void {\n if (!Object.values(PopoverPosition).includes(newValue as PopoverPosition) || newValue === PopoverPosition.AUTO) {\n newValue = PopoverPosition.TOP;\n this.position = newValue;\n }\n this.currentPosition = newValue;\n if (this.open) {\n this.setPosition();\n }\n }\n\n /** Setup popover behaviors when `open` changes. */\n @Watch(\"open\")\n onOpen(): void {\n cancelAnimationFrame(this.animationFrameRequestId);\n this.openChange.emit({open: this.open});\n if (!this.open) {\n Object.assign(this.host.style, {\n // Reset all positioning properties\n top: \"auto\",\n right: \"auto\",\n bottom: \"auto\",\n left: \"auto\",\n maxWidth: \"\",\n maxHeight: \"\",\n // Set initial visibility to hidden while calculating position...\n visibility: \"hidden\",\n });\n this.currentPosition = undefined;\n\n return;\n }\n\n const updatePositionLoop = (): void => {\n if (!this.open) {\n return;\n }\n\n this.setPosition();\n this.animationFrameRequestId = requestAnimationFrame(updatePositionLoop);\n };\n\n // call `setPosition` after a tick to ensure the DOM is ready and sizes are available\n setTimeout(() => {\n updatePositionLoop();\n }, 0);\n }\n\n @Watch(\"bindTo\")\n onBindingChange(): void {\n this.findBoundElement();\n }\n\n /** Returns the offset modifier to use in calculations to align the popover with the bound element. */\n private get offsetModifier(): OffsetModifier {\n return this.center ? 0.5 : 0;\n }\n\n private findBoundElement(): void {\n if (typeof this.bindTo === \"string\") {\n this.boundElement = this.host.ownerDocument.querySelector(this.bindTo) as HTMLElement;\n } else if (this.bindTo) {\n this.boundElement = this.bindTo;\n } else {\n this.boundElement = this.host.parentElement as HTMLElement;\n }\n }\n\n /**\n * Check if element has enough space to the right and left to be centered.\n * Used for `TOP` and `BOTTOM` position.\n * When `center` is not enabled, only one side needs to be checked and `RIGHT` is the default.\n */\n private hasCenteredHorizontalSpace(\n availableLeft: number,\n availableRight: number,\n hostWidth: number,\n boundElementWidth: number\n ): boolean {\n const requiredSideSpace = (hostWidth - boundElementWidth) * (1 - this.offsetModifier);\n\n if (!this.center) {\n return availableRight >= requiredSideSpace - this.spaceTolerance;\n }\n\n return (\n availableRight >= requiredSideSpace - this.spaceTolerance &&\n availableLeft >= requiredSideSpace - this.spaceTolerance\n );\n }\n\n /**\n * Check if element has enough space to the top and bottom to be centered.\n * Used for `RIGHT` and `LEFT` position.\n * When `center` is not enabled, only one side needs to be checked and `BOTTOM` is the default.\n */\n private hasCenteredVerticalSpace(\n availableTop: number,\n availableBottom: number,\n hostHeight: number,\n boundElementHeight: number\n ): boolean {\n const requiredSideSpace = (hostHeight - boundElementHeight) * (1 - this.offsetModifier);\n\n if (!this.center) {\n return availableBottom >= requiredSideSpace - this.spaceTolerance;\n }\n\n return (\n availableTop >= requiredSideSpace - this.spaceTolerance &&\n availableBottom >= requiredSideSpace - this.spaceTolerance\n );\n }\n\n /**\n * Check if there is enough space in the given direction to fit the popover.\n * Used for composed positions like TOP_RIGHT, LEFT_BOTTOM, etc.\n */\n private hasEnoughSideSpace(\n availableSpace: number,\n hostSize: number,\n boundElementSize: number,\n offsetModifier: OffsetModifier\n ): boolean {\n return availableSpace >= hostSize - boundElementSize * (1 - offsetModifier) - this.spaceTolerance;\n }\n\n /**\n * Given a desired position and available space around the bound element, returns the best position\n * that fits the popover, trying all positions if needed.\n * Takes into account offsetModifier for centering.\n * @param desiredPosition The desired position of the popover.\n * @param availableSpace The available space around the bound element.\n */\n private getOptimalPopoverPosition(desiredPosition: PopoverPosition, availableSpace: Offsets): PopoverPosition {\n const hostWidth = this.host.offsetWidth;\n const hostHeight = this.host.offsetHeight;\n const boundElementWidth = this.boundElement.getBoundingClientRect().width;\n const boundElementHeight = this.boundElement.getBoundingClientRect().height;\n const offsetModifier = this.offsetModifier;\n\n /** Check if there is enough space to fit the popover in the desired position */\n const fits = (pos: PopoverPosition): boolean => {\n switch (pos) {\n case PopoverPosition.TOP:\n return (\n availableSpace.top >= hostHeight - this.spaceTolerance &&\n this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElementWidth)\n );\n case PopoverPosition.TOP_RIGHT:\n return (\n availableSpace.top >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.right, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.TOP_LEFT:\n return (\n availableSpace.top >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.left, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.RIGHT:\n return (\n availableSpace.right >= hostWidth &&\n this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElementHeight)\n );\n case PopoverPosition.RIGHT_BOTTOM:\n return (\n availableSpace.right >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.bottom, hostHeight, boundElementHeight, offsetModifier)\n );\n case PopoverPosition.RIGHT_TOP:\n return (\n availableSpace.right >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.top, hostHeight, boundElementHeight, offsetModifier)\n );\n case PopoverPosition.BOTTOM:\n return (\n availableSpace.bottom >= hostHeight &&\n this.hasCenteredHorizontalSpace(availableSpace.left, availableSpace.right, hostWidth, boundElementWidth)\n );\n case PopoverPosition.BOTTOM_LEFT:\n return (\n availableSpace.bottom >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.left, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.BOTTOM_RIGHT:\n return (\n availableSpace.bottom >= hostHeight &&\n this.hasEnoughSideSpace(availableSpace.right, hostWidth, boundElementWidth, offsetModifier)\n );\n case PopoverPosition.LEFT:\n return (\n availableSpace.left >= hostWidth &&\n this.hasCenteredVerticalSpace(availableSpace.top, availableSpace.bottom, hostHeight, boundElementHeight)\n );\n case PopoverPosition.LEFT_TOP:\n return (\n availableSpace.left >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.top, hostHeight, boundElementHeight, offsetModifier)\n );\n case PopoverPosition.LEFT_BOTTOM:\n return (\n availableSpace.left >= hostWidth &&\n this.hasEnoughSideSpace(availableSpace.bottom, hostHeight, boundElementHeight, offsetModifier)\n );\n\n default:\n return false;\n }\n };\n\n // Check desired position first\n if (fits(desiredPosition)) {\n return desiredPosition;\n }\n\n // Find position index and create rotation starting from next position\n const positions = ZPopover.positionOrder;\n const startIndex = positions.indexOf(desiredPosition);\n\n if (startIndex === -1) {\n return desiredPosition; // fallback if position not found\n }\n\n // Try all other positions starting from the next one\n for (let i = 1; i < positions.length; i++) {\n const posIndex = (startIndex + i) % positions.length;\n const pos = positions[posIndex];\n if (fits(pos)) {\n return pos;\n }\n }\n\n return this.findBestFallbackPosition(availableSpace);\n }\n\n /** Find the best fallback position based on available space when no position fits perfectly. */\n private findBestFallbackPosition(availableSpace: Offsets): PopoverPosition {\n // Determine which horizontal and vertical direction has the most available space\n const bestHorizontalDirection =\n availableSpace.right >= availableSpace.left ? PopoverPosition.RIGHT : PopoverPosition.LEFT;\n\n const bestVerticalDirection =\n availableSpace.bottom >= availableSpace.top ? PopoverPosition.BOTTOM : PopoverPosition.TOP;\n\n // Choose the main direction based on which axis has more space overall\n const maxHorizontalSpace = Math.max(availableSpace.right, availableSpace.left);\n const maxVerticalSpace = Math.max(availableSpace.bottom, availableSpace.top);\n\n const mainDirection = maxVerticalSpace >= maxHorizontalSpace ? bestVerticalDirection : bestHorizontalDirection;\n\n // Decide if a secondary direction is needed\n // Only add a secondary direction if the difference between min and max in that axis is at least double\n let needsSecondaryDirection = false;\n\n if (mainDirection === bestVerticalDirection) {\n // If main direction is vertical, check horizontal space difference\n const minHorizontalSpace = Math.min(availableSpace.right, availableSpace.left);\n needsSecondaryDirection = maxHorizontalSpace >= minHorizontalSpace * 2;\n } else {\n // If main direction is horizontal, check vertical space difference\n const minVerticalSpace = Math.min(availableSpace.bottom, availableSpace.top);\n needsSecondaryDirection = maxVerticalSpace >= minVerticalSpace * 2;\n }\n\n if (!needsSecondaryDirection) {\n return mainDirection;\n }\n\n const secondaryDirection =\n mainDirection === bestVerticalDirection ? bestHorizontalDirection : bestVerticalDirection;\n\n // Return a combined position (e.g., \"bottom_right\")\n return `${mainDirection}_${secondaryDirection}` as PopoverPosition;\n }\n\n /**\n * Calculate available space around the element bound with the popover, based on its nearest scrollable ancestor.\n *\n * Calculations for `right` and `bottom` can be a little bit confusing because `boundingRect.right` and `bottom` may not be what you expect...\n * For more information see the explanation in the docs.\n * @link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#return_value\n */\n private calculateAvailableSpace(): Offsets {\n const boundElementRect = this.boundElement.getBoundingClientRect();\n\n if (\n this.lastBoundRect &&\n this.lastBoundRect.x === boundElementRect.x &&\n this.lastBoundRect.y === boundElementRect.y &&\n this.lastBoundRect.width === boundElementRect.width &&\n this.lastBoundRect.height === boundElementRect.height &&\n this.cachedAvailableSpace\n ) {\n // If the bound element's rect hasn't changed, return the cached rect\n return this.cachedAvailableSpace;\n }\n\n this.lastBoundRect = boundElementRect;\n const scrollableParent = findScrollableParent(this.boundElement);\n const scrollableParentRect = scrollableParent.getBoundingClientRect();\n const hasNestedScrollableParent = scrollableParent !== this.boundElement.ownerDocument.documentElement;\n const documentWidth = this.boundElement.ownerDocument.documentElement.clientWidth;\n const documentHeight = this.boundElement.ownerDocument.documentElement.clientHeight;\n const safeSpace = 8; // extra space to avoid popover being too close to the edges\n\n // These deltas represent the offset between the scrollable parent and the viewport.\n // They are used to adjust the available space calculations when the scrollable parent is not the document or body,\n // to try to fit the popover inside the scrollable parent.\n const deltaTop = hasNestedScrollableParent ? scrollableParentRect.top : 0;\n const deltaRight = hasNestedScrollableParent ? documentWidth - scrollableParentRect.right : 0;\n const deltaBottom = hasNestedScrollableParent ? documentHeight - scrollableParentRect.bottom : 0;\n const deltaLeft = hasNestedScrollableParent ? scrollableParentRect.left : 0;\n\n this.cachedAvailableSpace = {\n top: boundElementRect.top - deltaTop - safeSpace,\n right: documentWidth - boundElementRect.right - deltaRight - safeSpace,\n bottom: documentHeight - boundElementRect.bottom - deltaBottom - safeSpace,\n left: boundElementRect.left - deltaLeft - safeSpace,\n };\n\n return this.cachedAvailableSpace;\n }\n\n /** Calculate the space around an element relative to the viewport. */\n private calculateElementOffsets(element: HTMLElement): Offsets {\n const elementRect = element.getBoundingClientRect();\n const viewportWidth = element.ownerDocument.documentElement.clientWidth;\n const viewportHeight = element.ownerDocument.documentElement.clientHeight;\n\n return {\n top: elementRect.top,\n right: viewportWidth - elementRect.right,\n bottom: viewportHeight - elementRect.bottom,\n left: elementRect.left,\n };\n }\n\n /** Apply positioning styles based on passed position. */\n private applyPositionStyles(position: PopoverPosition, availableSpace: Offsets): void {\n const boundElementWidth = this.boundElement.offsetWidth;\n const boundElementHeight = this.boundElement.offsetHeight;\n /** Distance between the popover and the bound element */\n const distanceFromBound = 8;\n const offsetModifier = this.offsetModifier;\n /** Distance between the arrow center and the popover edge. Needed to align the center of the arrow with the center of the bound element when `showArrow` and `center` are enabled. */\n const arrowModifier = this.showArrow && this.center ? 8 : 0;\n const hostStyle = this.host.style;\n const boundElementOffsets = this.calculateElementOffsets(this.boundElement);\n\n let maxWidth: number;\n let maxHeight: number;\n\n switch (position) {\n case PopoverPosition.TOP:\n case PopoverPosition.TOP_RIGHT:\n hostStyle.bottom = `${boundElementOffsets.bottom + boundElementHeight}px`;\n hostStyle.left = `${boundElementOffsets.left + boundElementWidth * offsetModifier - (position === PopoverPosition.TOP_RIGHT ? arrowModifier : 0)}px`;\n maxHeight = availableSpace.top - distanceFromBound;\n if (position === PopoverPosition.TOP_RIGHT) {\n maxWidth = availableSpace.right + boundElementWidth * offsetModifier;\n }\n break;\n\n case PopoverPosition.TOP_LEFT:\n hostStyle.right = `${boundElementOffsets.right + boundElementWidth * offsetModifier - arrowModifier}px`;\n hostStyle.bottom = `${boundElementOffsets.bottom + boundElementHeight}px`;\n maxWidth = availableSpace.left + boundElementWidth * offsetModifier;\n maxHeight = availableSpace.top - distanceFromBound;\n break;\n\n case PopoverPosition.BOTTOM:\n case PopoverPosition.BOTTOM_RIGHT:\n hostStyle.top = `${boundElementOffsets.top + boundElementHeight}px`;\n hostStyle.left = `${boundElementOffsets.left + boundElementWidth * offsetModifier - (position === PopoverPosition.BOTTOM_RIGHT ? arrowModifier : 0)}px`;\n maxHeight = availableSpace.bottom - distanceFromBound;\n if (position === PopoverPosition.BOTTOM_RIGHT) {\n maxWidth = availableSpace.right + boundElementWidth * offsetModifier;\n }\n break;\n\n case PopoverPosition.BOTTOM_LEFT:\n hostStyle.top = `${boundElementOffsets.top + boundElementHeight}px`;\n hostStyle.right = `${boundElementOffsets.right + boundElementWidth * offsetModifier - arrowModifier}px`;\n maxWidth = availableSpace.left + boundElementWidth * offsetModifier;\n maxHeight = availableSpace.bottom - distanceFromBound;\n break;\n\n case PopoverPosition.RIGHT:\n case PopoverPosition.RIGHT_BOTTOM:\n hostStyle.top = `${boundElementOffsets.top + boundElementHeight * offsetModifier - (position === PopoverPosition.RIGHT_BOTTOM ? arrowModifier : 0)}px`;\n hostStyle.left = `${boundElementOffsets.left + boundElementWidth}px`;\n maxWidth = availableSpace.right - distanceFromBound;\n if (position === PopoverPosition.RIGHT) {\n maxHeight = availableSpace.top + availableSpace.bottom + boundElementHeight;\n } else {\n maxHeight = availableSpace.bottom + boundElementHeight * offsetModifier;\n }\n break;\n\n case PopoverPosition.RIGHT_TOP:\n hostStyle.bottom = `${boundElementOffsets.bottom + boundElementHeight * offsetModifier - arrowModifier}px`;\n hostStyle.left = `${boundElementOffsets.left + boundElementWidth}px`;\n maxWidth = availableSpace.right - distanceFromBound;\n maxHeight = availableSpace.top + boundElementHeight * offsetModifier;\n break;\n\n case PopoverPosition.LEFT:\n case PopoverPosition.LEFT_BOTTOM:\n hostStyle.top = `${boundElementOffsets.top + boundElementHeight * offsetModifier - (position === PopoverPosition.LEFT_BOTTOM ? arrowModifier : 0)}px`;\n hostStyle.right = `${boundElementOffsets.right + boundElementWidth}px`;\n maxWidth = availableSpace.left - distanceFromBound;\n if (position === PopoverPosition.LEFT_BOTTOM) {\n maxHeight = availableSpace.bottom + boundElementHeight * offsetModifier;\n }\n break;\n\n case PopoverPosition.LEFT_TOP:\n hostStyle.right = `${boundElementOffsets.right + boundElementWidth}px`;\n hostStyle.bottom = `${boundElementOffsets.bottom + boundElementHeight * offsetModifier - arrowModifier}px`;\n maxWidth = availableSpace.left - distanceFromBound;\n maxHeight = availableSpace.top + boundElementHeight * offsetModifier;\n break;\n }\n\n if (getDevice() !== Device.MOBILE) {\n // Only force max sizes on non-mobile viewports\n Object.assign(hostStyle, {\n maxWidth: maxWidth ? `${maxWidth}px` : \"\",\n maxHeight: maxHeight ? `${maxHeight}px` : \"\",\n });\n }\n }\n\n /** Set the position of the popover. */\n private setPosition(): void {\n if (!this.boundElement) {\n return;\n }\n\n if (!isElementVisibleInContainer(this.boundElement, findScrollableParent(this.boundElement))) {\n // If the bound element is not visible, hide the popover too\n this.open = false;\n\n return;\n }\n\n Object.assign(this.host.style, {\n // Reset all positioning properties\n top: \"auto\",\n right: \"auto\",\n bottom: \"auto\",\n left: \"auto\",\n maxWidth: \"\",\n maxHeight: \"\",\n // Set initial visibility to hidden while calculating position...\n visibility: \"hidden\",\n });\n\n const availableSpace = this.calculateAvailableSpace();\n const position = this.getOptimalPopoverPosition(this.position, availableSpace);\n\n this.applyPositionStyles(position, availableSpace);\n this.currentPosition = position;\n this.positionChange.emit({position: this.currentPosition});\n\n // ...then restore the visibility\n this.host.style.visibility = \"visible\";\n }\n\n componentWillLoad(): void {\n this.validatePosition(this.position);\n }\n\n componentDidLoad(): void {\n this.findBoundElement();\n if (this.open) {\n this.onOpen();\n }\n }\n\n disconnectedCallback(): void {\n cancelAnimationFrame(this.animationFrameRequestId);\n }\n\n render(): HTMLZPopoverElement {\n return (\n <Host current-position={this.currentPosition}>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"mMAAA,MAAMA,EAAY,2iGAClB,MAAAC,EAAeD,E,MCyBFE,EAAQ,M,+GA+DFC,KAAAC,eAAiB,E,cAxDLC,EAAgBC,I,UAItC,M,qCAWK,M,YAIH,M,cAOE,K,+BAkDX,wBAAAC,CAAyBC,GACvB,GAAIL,KAAKM,UAAYD,EAAEE,MAAQC,EAAaC,IAAK,CAC/CT,KAAKU,KAAO,K,EAUhB,kBAAAC,CAAmBN,GACjB,MAAMO,EAASP,EAAEO,OACjB,IAAKZ,KAAKM,WAAaN,KAAKU,MAAQG,EAAgBb,KAAKc,KAAMF,GAAS,CACtE,M,CAGF,GAAIC,EAAgBb,KAAKe,aAAcH,G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,OAAOY,OAAO/B,KAAKc,KAAKkB,MAAO,CAE7BC,IAAK,OACLC,MAAO,OACPC,OAAQ,OACRC,KAAM,OACNC,SAAU,GACVC,UAAW,GAEXC,WAAY,WAGd,MAAMyB,EAAiBhE,KAAK2G,0BAC5B,MAAMpF,EAAWvB,KAAKmE,0BAA0BnE,KAAKuB,SAAUyC,GAE/DhE,KAAKoI,oBAAoB7G,EAAUyC,GACnChE,KAAKwB,gBAAkBD,EACvBvB,KAAK8I,eAAehH,KAAK,CAACP,SAAUvB,KAAKwB,kBAGzCxB,KAAKc,KAAKkB,MAAMO,WAAa,S,CAG/B,iBAAAwG,GACE/I,KAAKiB,iBAAiBjB,KAAKuB,S,CAG7B,gBAAAyH,GACEhJ,KAAK6C,mBACL,GAAI7C,KAAKU,KAAM,CACbV,KAAK0B,Q,EAIT,oBAAAuH,GACEtH,qBAAqB3B,KAAK4B,wB,CAG5B,MAAAsH,GACE,OACEC,EAACC,EAAI,CAAA7I,IAAA,8DAAmBP,KAAKwB,iBAC3B2H,EAAA,QAAA5I,IAAA,6C,oIAviBkBR,EAAAyF,cAAmC,CACzDtF,EAAgBC,IAChBD,EAAgB0E,UAChB1E,EAAgB2E,SAChB3E,EAAgB4E,MAChB5E,EAAgB6E,aAChB7E,EAAgB8E,UAChB9E,EAAgB+E,OAChB/E,EAAgBgF,YAChBhF,EAAgBiF,aAChBjF,EAAgBkF,KAChBlF,EAAgBmF,SAChBnF,EAAgBoF,a","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZStepperItemStyle0","ZStepperItem","getAttributes","href","this","pressed","disabled","onClick","location","undefined","role","current","ariaCurrent","tabindex","Object","assign","render","h","Host","key","class","checked","name","index"],"sources":["src/components/z-stepper-item/styles.css?tag=z-stepper-item&encapsulation=shadow","src/components/z-stepper-item/index.tsx"],"sourcesContent":[":host {\n position: relative;\n width: calc(var(--space-unit) * 5);\n font-family: var(--font-family-sans);\n font-weight: var(--font-rg);\n\n --z-icon-width: 20px;\n --z-icon-height: 20px;\n}\n\n:host(:not(:last-child)) {\n flex: 1;\n}\n\n:host(:not(:last-child))::after {\n position: absolute;\n z-index: 1;\n top: calc(var(--space-unit) * 4 - var(--border-size-medium) / 2);\n right: calc(var(--space-unit) * 2);\n left: calc(var(--space-unit) * 3);\n display: block;\n width: auto;\n border-bottom: var(--border-size-medium) solid var(--color-disabled03);\n margin: 0 calc(var(--space-unit) * -2) 0 calc(var(--space-unit) * 2);\n content: \"\";\n}\n\n.stepper-item {\n display: flex;\n width: calc(var(--space-unit) * 5);\n flex-direction: column;\n align-items: center;\n padding: 0;\n border: 0;\n appearance: none;\n background: transparent;\n color: inherit;\n font-family: inherit;\n font-size: 12px;\n line-height: 16px;\n outline: 0;\n text-decoration: none;\n}\n\n.stepper-item span {\n display: none;\n width: calc(100% + calc(var(--space-unit) * 4));\n color: var(--color-default-text);\n text-align: center;\n}\n\n:host([href]:not([disabled], [pressed])) .stepper-item {\n cursor: pointer;\n}\n\n:host([disabled]) .stepper-item {\n pointer-events: none;\n}\n\n:host([pressed]),\n:host([pressed]) .stepper-item {\n pointer-events: none;\n}\n\n.indicator {\n display: flex;\n width: calc(var(--space-unit) * 4);\n height: calc(var(--space-unit) * 4);\n box-sizing: border-box;\n align-items: center;\n justify-content: center;\n border: var(--border-size-medium) solid var(--color-primary01);\n margin: calc(var(--space-unit) * 2);\n background: var(--color-surface01);\n border-radius: 50%;\n color: var(--color-primary01);\n content: counter(stepper);\n font-size: 14px;\n font-weight: var(--font-sb);\n line-height: 1;\n}\n\n:host([pressed]:not([disabled])) .indicator {\n border-color: var(--color-hover-primary);\n background: var(--color-hover-primary);\n color: var(--color-text-inverse);\n}\n\n:host([href]:not([disabled]):focus-within) .indicator {\n box-shadow: var(--shadow-focus-primary);\n}\n\n:host([href]:not([disabled], [pressed], [checked])) .indicator:hover {\n border-color: var(--color-hover-primary);\n color: var(--color-hover-primary);\n}\n\n:host([disabled]) .indicator {\n border-color: var(--color-disabled02);\n background: var(--color-disabled01);\n color: var(--color-disabled03);\n}\n\n:host([checked]:not([disabled])) .indicator {\n border-color: var(--color-default-success);\n color: var(--color-default-success);\n}\n\n:host([checked]:not([disabled])) .indicator z-icon {\n fill: var(--color-default-success);\n}\n\n:host([checked]) .indicator z-icon > svg {\n width: 24px;\n height: 24px;\n}\n\n/* Tablet breakpoint */\n@media (min-width: 768px) {\n .stepper-item span {\n display: block;\n }\n}\n\n/* Desktop breakpoint */\n@media (min-width: 1152px) {\n :host {\n width: calc(var(--space-unit) * 10);\n\n --z-icon-width: 24px;\n --z-icon-height: 24px;\n }\n\n :host(:not(:last-child))::after {\n top: calc(var(--space-unit) * 5 - var(--border-size-medium) / 2);\n left: calc(var(--space-unit) * 8);\n }\n\n .stepper-item {\n width: calc(var(--space-unit) * 10);\n font-size: 18px;\n line-height: 28px;\n }\n\n .indicator {\n width: calc(var(--space-unit) * 6);\n height: calc(var(--space-unit) * 6);\n font-size: 16px;\n }\n}\n","import {Component, Host, Prop, h} from \"@stencil/core\";\n\n@Component({\n tag: \"z-stepper-item\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZStepperItem {\n /**\n * The number of the step item.\n */\n @Prop({reflect: true})\n index: number;\n\n /**\n * The href to navigate on click.\n */\n @Prop({reflect: true})\n href: string;\n\n /**\n * The pressed state of the item.\n */\n @Prop({reflect: true})\n pressed: boolean;\n\n /**\n * The checked state of the item.\n */\n @Prop({reflect: true})\n checked: boolean;\n\n /**\n * The disabled state of the item.\n */\n @Prop({reflect: true})\n disabled: boolean;\n\n private getAttributes(): Record<string, unknown> {\n const href =\n this.href && !this.pressed && !this.disabled ? {onClick: () => (location.href = this.href)} : undefined;\n const role = href ? {role: \"link\"} : undefined;\n const current = this.pressed && !this.disabled ? {ariaCurrent: \"step\"} : undefined;\n const tabindex = this.pressed || this.href === \"\" ? {tabindex: -1} : undefined;\n\n return {\n ...href,\n ...role,\n ...current,\n ...tabindex,\n };\n }\n\n render(): HTMLAnchorElement | HTMLButtonElement {\n return (\n <Host role=\"listitem\">\n <button\n class=\"stepper-item\"\n disabled={this.disabled}\n {...this.getAttributes()}\n >\n <div class=\"indicator\">{this.checked ? <z-icon name=\"checkmark\" /> : this.index}</div>\n <span>\n <slot />\n </span>\n </button>\n </Host>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAY,8vFAClB,MAAAC,EAAeD,E,MCMFE,EAAY,M,wIA+Bf,aAAAC,GACN,MAAMC,EACJC,KAAKD,OAASC,KAAKC,UAAYD,KAAKE,SAAW,CAACC,QAAS,IAAOC,SAASL,KAAOC,KAAKD,MAASM,UAChG,MAAMC,EAAOP,EAAO,CAACO,KAAM,QAAUD,UACrC,MAAME,EAAUP,KAAKC,UAAYD,KAAKE,SAAW,CAACM,YAAa,QAAUH,UACzE,MAAMI,EAAWT,KAAKC,SAAWD,KAAKD,OAAS,GAAK,CAACU,UAAW,GAAKJ,UAErE,OAAAK,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAA,GACKZ,GACAO,GACAC,GACAE,E,CAIP,MAAAG,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACT,KAAK,YACTO,EAAA,SAAAH,OAAAC,OAAA,CAAAI,IAAA,2CACEC,MAAM,eACNd,SAAUF,KAAKE,UACXF,KAAKF,iBAETe,EAAA,OAAAE,IAAA,2CAAKC,MAAM,aAAahB,KAAKiB,QAAUJ,EAAA,UAAQK,KAAK,cAAiBlB,KAAKmB,OAC1EN,EAAA,QAAAE,IAAA,4CACEF,EAAA,QAAAE,IAAA,+C","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,h as o}from"./p-75c4a726.js";import{P as t}from"./p-17af7fb2.js";const r=":host{--z-tooltip-theme--surface:var(--color-surface01);--z-tooltip-theme--text:var(--color-default-text);--z-tooltip-shadow-filter:drop-shadow(0 1px 2px var(--shadow-color-base))}:host([dark]) z-popover{--z-popover-theme--surface:var(--color-surface05);--z-popover-theme--text:var(--color-text-inverse)}z-popover{--z-popover-padding:var(--space-unit);--z-popover-theme--surface:var(--z-tooltip-theme--surface);--z-popover-theme--text:var(--z-tooltip-theme--text);--z-popover-shadow-filter:var(--z-tooltip-shadow-filter)}";const s=r;const a=class{constructor(o){e(this,o);this.position=t.AUTO;this.dark=false;this.open=false;this.bindTo=undefined;this.closable=true}onPopoverOpenChange(){this.open=this.popoverEl.open}render(){return o("z-popover",{key:"ab2c260f466a47e9f25154ece6a78197ff23d0fa",ref:e=>this.popoverEl=e,bindTo:this.bindTo,open:this.open,position:this.position,closable:this.closable,center:true,showArrow:true},o("slot",{key:"239e63a0bfececc52c9538df70d0eb7fe63a0060"}))}};a.style=s;export{a as z_tooltip};
|
|
2
|
-
//# sourceMappingURL=p-ac477ae7.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZTooltipStyle0","ZTooltip","PopoverPosition","AUTO","onPopoverOpenChange","this","open","popoverEl","render","h","key","ref","el","bindTo","position","closable","center","showArrow"],"sources":["src/components/z-tooltip/styles.css?tag=z-tooltip&encapsulation=shadow","src/components/z-tooltip/index.tsx"],"sourcesContent":[":host {\n --z-tooltip-theme--surface: var(--color-surface01);\n --z-tooltip-theme--text: var(--color-default-text);\n --z-tooltip-shadow-filter: drop-shadow(0 1px 2px var(--shadow-color-base));\n}\n\n:host([dark]) z-popover {\n --z-popover-theme--surface: var(--color-surface05);\n --z-popover-theme--text: var(--color-text-inverse);\n}\n\nz-popover {\n --z-popover-padding: var(--space-unit);\n --z-popover-theme--surface: var(--z-tooltip-theme--surface);\n --z-popover-theme--text: var(--z-tooltip-theme--text);\n --z-popover-shadow-filter: var(--z-tooltip-shadow-filter);\n}\n","import {Component, Listen, Prop, h} from \"@stencil/core\";\nimport {PopoverPosition} from \"../../beans\";\n\n/**\n * Tooltip component.\n * It is basically a wrapper for the `<z-popover>` component with custom configuration.\n *\n * @cssprop --z-tooltip-theme--surface - background color of the popover.\n * @cssprop --z-tooltip-theme--text - foreground color of the popover.\n * @cssprop --z-tooltip-shadow-filter - drop-shadow filter of the popover.\n */\n@Component({\n tag: \"z-tooltip\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZTooltip {\n /** Tooltip position. */\n @Prop({reflect: true})\n position: PopoverPosition = PopoverPosition.AUTO;\n\n /** Enable tooltip dark mode. */\n @Prop({reflect: true})\n dark = false;\n\n /**\n * The open state of the tooltip.\n */\n @Prop({reflect: true, mutable: true})\n open = false;\n\n /**\n * The selector or the element bound with the tooltip.\n */\n @Prop()\n bindTo?: string | HTMLElement;\n\n /**\n * Reflects `closable` prop of the popover.\n * \"If true, the popover can be closed by clicking outside of it or pressing the escape key.\n * Otherwise, it will be closed only programmatically (by setting `open` to `false`).\"\n */\n @Prop()\n closable = true;\n\n private popoverEl: HTMLZPopoverElement;\n\n @Listen(\"openChange\")\n onPopoverOpenChange(): void {\n this.open = this.popoverEl.open;\n }\n\n render(): HTMLZPopoverElement {\n return (\n <z-popover\n ref={(el) => (this.popoverEl = el as HTMLZPopoverElement)}\n bindTo={this.bindTo}\n open={this.open}\n position={this.position}\n closable={this.closable}\n center\n showArrow\n >\n <slot></slot>\n </z-popover>\n );\n }\n}\n"],"mappings":"+EAAA,MAAMA,EAAY,4gBAClB,MAAAC,EAAeD,E,MCeFE,EAAQ,M,uCAGSC,EAAgBC,K,UAIrC,M,UAMA,M,oCAcI,I,CAKX,mBAAAC,GACEC,KAAKC,KAAOD,KAAKE,UAAUD,I,CAG7B,MAAAE,GACE,OACEC,EAAA,aAAAC,IAAA,2CACEC,IAAMC,GAAQP,KAAKE,UAAYK,EAC/BC,OAAQR,KAAKQ,OACbP,KAAMD,KAAKC,KACXQ,SAAUT,KAAKS,SACfC,SAAUV,KAAKU,SACfC,OAAM,KACNC,UAAS,MAETR,EAAA,QAAAC,IAAA,6C","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as o}from"./p-75c4a726.js";import{I as s,e as a,i as r,g as n,l}from"./p-17af7fb2.js";import{r as c,d}from"./p-625e2cee.js";import"./p-5145a606.js";const h='.z-label{display:block;padding-bottom:var(--space-unit);color:var(--color-default-text);font-family:var(--font-family-sans);font-size:var(--font-size-1);font-weight:var(--font-sb);text-align:left;text-transform:uppercase}:host{display:block;color:var(--color-form-default-text);fill:var(--color-form-default-icon);font-family:var(--font-family-sans)}:host>div.fixed{position:relative}:host>div>.header{position:relative;z-index:10;display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--color-form-surface04);margin:0;background-color:var(--color-form-background);border-radius:var(--border-radius-small);cursor:pointer}:host([size="small"])>div>.header{min-height:34px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header{min-height:30px;font-size:var(--font-size-2)}:host>div>.header:hover{outline:var(--border-size-medium) solid var(--color-form-surface04);outline-offset:-2px}:host>div>div.header:focus:focus-visible{z-index:16;box-shadow:var(--shadow-focus-primary);outline:none}:host>div>.header>span.body-3>span{font-weight:var(--font-sb)}:host>div>.header>z-icon{fill:var(--color-form-default-icon);transform:rotate(360deg);transition:all 200ms linear}:host>div>.header>z-icon.small,:host>div>.header>z-icon.x-small{--z-icon-width:16px;--z-icon-height:16px}:host>div.open>.header{border:var(--border-size-small) solid var(--color-form-active-primary);border-radius:var(--border-radius-small) var(--border-radius-small) 0 0}:host>div.disabled{pointer-events:none}:host>div.disabled .header{border-color:var(--color-form-disabled03);fill:var(--color-form-disabled01-icon)}:host>div.disabled .header>span.body-3{color:var(--color-form-disabled03)}:host>div.disabled .header>z-icon:last-child{fill:var(--color-form-disabled01-icon)}:host>div.open>.header>z-icon{fill:var(--color-form-default-icon);transform:rotate(180deg);transition:all 200ms linear}:host>div>div.open-combo-data{display:none}:host>div.open>div.open-combo-data{position:relative;z-index:12;display:block;padding:var(--space-unit) calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--color-form-surface03);border-top:0;background-color:var(--color-form-background);border-radius:0;box-shadow:var(--shadow-2)}:host .open .open-combo-data z-input .z-label{color:var(--color-form-default-text)}:host>div.open>div.open-combo-data>div>div{overflow:auto;max-height:235px;padding:0;padding-left:var(--space-unit);margin-left:calc(var(--space-unit) * -1);}:host>div.open>div.open-combo-data>z-input{width:100%;margin-bottom:calc(var(--space-unit) * 2)}:host>div.open>div.open-combo-data>div>div>ul{max-height:235px;padding:0 calc(var(--space-unit) * 0.5);margin:0}:host .open-combo-data z-list-element{--background-color-list-element:var(--color-form-background);--background-hover-color-list-element:var(--color-form-surface03);--background-active-color-list-element:var(--color-form-surface03)}::-webkit-scrollbar{width:6px;background:linear-gradient(to right, transparent 0 1px, var(--gray200) 1px 5px, transparent 5px 6px)}::-webkit-scrollbar-thumb{background-color:var(--color-primary01)}::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}@supports not selector(::-webkit-scrollbar-track){:host{scrollbar-color:var(--color-primary01) transparent}}:host>div.open>z-input{position:relative;z-index:1;width:238px;margin:0 calc(var(--space-unit) * 2);color:var(--color-form-active-primary)}:host>div.open>div.open-combo-data>div>div.search{overflow:hidden;max-height:none;margin-top:0}:host>div.open>div.open-combo-data>div>div.search>ul{overflow:auto;max-height:180px;padding:var(--space-unit) calc(var(--space-unit) * 2)}:host .open .open-combo-data .search .no-results{display:flex;align-items:center;column-gap:var(--space-unit)}:host>.open>.open-combo-data .search .close-search{display:flex;justify-content:center}:host>div.open>div.open-combo-data>div>div.search .close-search>a{display:inline-block;height:44px;color:var(--color-form-active-primary);cursor:pointer;font-size:14px;font-weight:var(--font-sb);line-height:44px;text-align:center;text-transform:uppercase}:host>div.open>div.open-combo-data>div>div.search .close-search>a:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 2)\n calc(var(--space-unit) * 1.5);border-bottom:var(--border-size-small) solid var(--gray800);margin-bottom:var(--space-unit);margin-left:calc(var(--space-unit) * -1);text-align:left}:host([size="small"])>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5)}:host([size="x-small"])>div.open>div.open-combo-data>div>div.check-all-wrapper{padding:var(--space-unit) calc(var(--space-unit) * 0.5)}[role="option"]:focus,[role="option"]:focus-visible{background:lime}';const p=h;const u=class{watchItems(){this.itemsList=typeof this.items==="string"?JSON.parse(this.items):this.items;this.selectedCounter=this.itemsList.filter((t=>t.checked)).length;this.updateRenderItemsList()}watchSearchValue(){this.filterItems(this.searchValue)}emitComboboxChange(){this.comboboxChange.emit({id:this.inputid,items:this.itemsList})}constructor(i){t(this,i);this.comboboxChange=e(this,"comboboxChange",7);this.itemsList=[];this.inputType=s.TEXT;this.inputid=`combo-${c()}`;this.items=undefined;this.label=undefined;this.disabled=false;this.hassearch=false;this.searchlabel=undefined;this.searchplaceholder=undefined;this.searchtitle=undefined;this.noresultslabel="Nessun risultato";this.isopen=false;this.isfixed=false;this.hascheckall=false;this.checkalltext="Seleziona tutti";this.uncheckalltext="Deseleziona tutti";this.maxcheckableitems=0;this.hasgroupitems=undefined;this.size=a.BIG;this.searchValue=undefined;this.selectedCounter=undefined;this.renderItemsList=[];this.focusedItemId=undefined;this.toggleComboBox=this.toggleComboBox.bind(this);this.closeFilterItems=this.closeFilterItems.bind(this)}componentWillLoad(){this.watchItems()}componentWillRender(){this.selectedCounter=this.itemsList.filter((t=>t.checked)).length}getControlToListSize(){switch(this.size){case a.X_SMALL:return r.SMALL;case a.SMALL:return r.MEDIUM;default:return r.LARGE}}handleOptionKeyDown(t,e,i){if(t.code===n.SPACE){t.preventDefault();return e()}this.handleSelectArrowsNavigation(t,i)}handleSelectArrowsNavigation(t,e){if(![n.ARROW_DOWN,n.ARROW_UP].includes(t.key)||!this.isopen){return}t.preventDefault();t.stopPropagation();const i=this.element.shadowRoot.querySelector(`#${e}`);const o=Array.from(this.element.shadowRoot.querySelectorAll('[role="option"]'));if(!o.length){return}const s=i?o.indexOf(i):null;const a=0;const r=o.length-1;let l=null;if(t.key===n.ARROW_DOWN){l=s===null||s===r?o[a]:o[s+1]}else if(t.key===n.ARROW_UP){l=s===null||s===a?o[r]:o[s-1]}this.focusedItemId=l.id;l.focus()}handleHeaderKeyboardEvent(t){if(t.key===n.SPACE){t.preventDefault()}if(t.key===n.ARROW_DOWN&&!this.isopen||t.key===n.ARROW_UP&&this.isopen){this.toggleComboBox()}if(this.isopen&&!this.hassearch){this.handleSelectArrowsNavigation(t)}}updateRenderItemsList(){if(this.searchValue){this.filterItems(this.searchValue)}else{this.resetRenderItemsList()}}resetRenderItemsList(){const t=[];this.itemsList.forEach((e=>{t.push(Object.assign({},e))}));this.renderItemsList=t}filterItems(t){if(!t){return this.closeFilterItems()}this.resetRenderItemsList();this.renderItemsList=this.renderItemsList.filter((e=>{const i=e.name.toUpperCase().indexOf(t.toUpperCase());const o=i+t.length;const s=e.name.substring(0,i)+"<strong>"+e.name.substring(i,o)+"</strong>"+e.name.substring(o,e.name.length);e.name=s;return i>=0}))}checkAll(t=true){this.itemsList=this.itemsList.map((e=>Object.assign(Object.assign({},e),{checked:t})));this.resetRenderItemsList();this.emitComboboxChange();this.focusedItemId=null;const e=this.element.shadowRoot.querySelector("#option-check-all");this.focusedItemId=e.id;e.focus()}closeFilterItems(){this.searchValue="";this.resetRenderItemsList()}toggleComboBox(){this.isopen=!this.isopen}getComboboxA11yAttributes(t){const e="combobox";const i=this.isopen?"true":"false";const o=this.isopen?this.focusedItemId:"";const s=`${this.inputid}_list`;if(t){return{role:e,"html-aria-expanded":i,"html-aria-activedescendant":o,"html-aria-controls":s}}return{role:e,"aria-expanded":i,"aria-activedescendant":o,"aria-controls":s}}renderHeader(){return i("div",{class:"header",onClick:()=>this.toggleComboBox(),onKeyDown:t=>{this.handleHeaderKeyboardEvent(t)},onKeyUp:t=>d(t,this.toggleComboBox),role:"button",tabindex:0,"aria-controls":"open-combo-data","aria-expanded":this.isopen?"true":"false"},i("span",{class:"body-3"},this.label,i("span",null,this.selectedCounter>0&&` (${this.selectedCounter})`)),i("z-icon",{name:"caret-down",class:this.size}))}renderContent(){return i("div",{id:"open-combo-data",class:"open-combo-data"},this.hassearch&&this.renderSearchInput(),!this.hassearch?i("span",Object.assign({},this.getComboboxA11yAttributes(false))):null,i("div",{role:"listbox","aria-label":this.label,"aria-multiselectable":"true",id:`${this.inputid}_list`,"aria-owns":Array.from(this.element.shadowRoot.querySelectorAll("[role='option']")).map((t=>t.id)).join(" ")},this.renderItems()))}renderItems(){return i("div",{class:this.searchValue&&"search",tabIndex:-1,role:"presentation"},this.renderList(this.renderItemsList))}renderItem(t,e,o){const s=`option-${t.id}`;const a=!t.checked&&this.maxcheckableitems&&this.selectedCounter>=this.maxcheckableitems;const r=()=>{this.itemsList=this.itemsList.map((e=>{if(t.id===e.id){e.checked=!e.checked}return e}));this.updateRenderItemsList();this.emitComboboxChange()};return i("z-list-element",{htmlTabindex:-1,dividerType:e!==o-1?l.ELEMENT:l.NONE,size:this.getControlToListSize(),role:"presentation",disabled:a},i("z-icon",{name:t.checked?"checkbox-checked":"checkbox"}),i("span",{id:s,role:"option","aria-selected":t.checked?"true":"false",tabindex:this.focusedItemId===s?0:-1,innerHTML:t.name,onKeyDown:t=>this.handleOptionKeyDown(t,r,s),onClick:r}))}renderList(t){if(!t){return}if(!t.length&&this.searchValue){return this.renderNoSearchResults()}if(this.hasgroupitems){return this.renderGroups(t)}return i("ul",{role:"presentation"},this.renderCheckAll(),t.map(((e,i)=>this.renderItem(e,i,t.length))))}renderGroups(t){const e=t.reduce(((e,i,o)=>{var s;const a=i.category||"Altra categoria";const r=this.renderItem(i,o,t.length);e[a]=(s=e[a])!==null&&s!==void 0?s:[];e[a].push(r);return e}),{});const o=Object.entries(e).map((([t,e],o)=>i("z-list-group",{"divider-type":l.ELEMENT,ariaLabelledby:`${this.inputid}_list_group_${o}`},i("span",{class:"body-3-sb z-list-group-title",slot:"header-title",id:`${this.inputid}_list_group_${o}`,"aria-hidden":"true"},t),e.map((t=>t)))));return i("ul",{role:"presentation"},this.renderCheckAll(),o)}renderNoSearchResults(){return i("div",{class:"no-results"},i("span",null,this.noresultslabel))}renderSearchInput(){return i("z-input",Object.assign({htmlid:`${this.inputid}_search`,label:this.searchlabel,placeholder:this.searchplaceholder,htmltitle:this.searchtitle,type:this.inputType,value:this.searchValue,message:false,size:this.size,"html-aria-autocomplete":"list"},this.getComboboxA11yAttributes(true),{onKeyUp:t=>{if(t.key===n.ESC){this.closeFilterItems()}this.handleSelectArrowsNavigation(t)},onInputChange:t=>{this.searchValue=t.detail.value}}))}renderCheckAll(){if(!this.hascheckall||this.searchValue){return}const t="option-check-all";const e=this.selectedCounter===this.itemsList.length;const o=()=>this.checkAll(!e);return i("z-list-element",{class:"check-all-wrapper",role:"presentation",htmlTabindex:-1,dividerType:l.ELEMENT,size:this.getControlToListSize()},i("z-icon",{name:e?"checkbox-checked":"checkbox"}),i("span",{id:t,role:"option","aria-selected":e?"true":"false",tabindex:this.focusedItemId===t?0:-1,onKeyDown:e=>this.handleOptionKeyDown(e,o,t),onClick:o},e?this.uncheckalltext:this.checkalltext))}render(){return i("div",{key:"461b88b7131d9ad3840df3972b79cf48f8f8f8af","data-action":`combo-${this.inputid}`,class:{open:this.isopen,fixed:this.isfixed,disabled:this.disabled},id:this.inputid},this.renderHeader(),!this.disabled&&this.renderContent())}get element(){return o(this)}static get watchers(){return{items:["watchItems"],searchValue:["watchSearchValue"]}}};u.style=p;export{u as z_combobox};
|
|
2
|
-
//# sourceMappingURL=p-bc2fb71e.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["stylesCss","ZComboboxStyle0","ZCombobox","watchItems","this","itemsList","items","JSON","parse","selectedCounter","filter","item","checked","length","updateRenderItemsList","watchSearchValue","filterItems","searchValue","emitComboboxChange","comboboxChange","emit","id","inputid","constructor","hostRef","inputType","InputType","TEXT","randomId","ControlSize","BIG","toggleComboBox","bind","closeFilterItems","componentWillLoad","componentWillRender","getControlToListSize","size","X_SMALL","ListSize","SMALL","MEDIUM","LARGE","handleOptionKeyDown","e","onOptionClickCallback","currId","code","KeyboardCode","SPACE","preventDefault","handleSelectArrowsNavigation","ARROW_DOWN","ARROW_UP","includes","key","isopen","stopPropagation","currElem","element","shadowRoot","querySelector","options","Array","from","querySelectorAll","currElemIndex","indexOf","firstElemIndex","lastElemIndex","nextElem","focusedItemId","focus","handleHeaderKeyboardEvent","ev","hassearch","resetRenderItemsList","renderItemsList","forEach","push","Object","assign","value","start","name","toUpperCase","end","newName","substring","checkAll","map","elem","getComboboxA11yAttributes","isZInput","role","ariaExpanded","ariaActivedescendant","ariaControls","renderHeader","h","class","onClick","onKeyDown","onKeyUp","handleKeyboardSubmit","tabindex","label","renderContent","renderSearchInput","join","renderItems","tabIndex","renderList","renderItem","index","optionId","isDisabled","maxcheckableitems","onOptionClick","i","htmlTabindex","dividerType","ListDividerType","ELEMENT","NONE","disabled","innerHTML","renderNoSearchResults","hasgroupitems","renderGroups","renderCheckAll","newData","reduce","group","category","zListItem","_a","listGroups","entries","ariaLabelledby","slot","noresultslabel","htmlid","searchlabel","placeholder","searchplaceholder","htmltitle","searchtitle","type","message","ESC","onInputChange","detail","hascheckall","allChecked","uncheckalltext","checkalltext","render","open","fixed","isfixed"],"sources":["src/components/z-combobox/styles.css?tag=z-combobox&encapsulation=shadow","src/components/z-combobox/index.tsx"],"sourcesContent":["@import \"../css-components/z-label/styles.css\";\n\n:host {\n display: block;\n color: var(--color-form-default-text);\n fill: var(--color-form-default-icon);\n font-family: var(--font-family-sans);\n}\n\n:host > div.fixed {\n position: relative;\n}\n\n:host > div > .header {\n position: relative;\n z-index: 10;\n display: flex;\n min-height: 42px;\n align-items: center;\n justify-content: space-between;\n padding: 0 calc(var(--space-unit) * 1.5);\n border: var(--border-size-small) solid var(--color-form-surface04);\n margin: 0;\n background-color: var(--color-form-background);\n border-radius: var(--border-radius-small);\n cursor: pointer;\n}\n\n:host([size=\"small\"]) > div > .header {\n min-height: 34px;\n font-size: var(--font-size-2);\n}\n\n:host([size=\"x-small\"]) > div > .header {\n min-height: 30px;\n font-size: var(--font-size-2);\n}\n\n:host > div > .header:hover {\n outline: var(--border-size-medium) solid var(--color-form-surface04);\n outline-offset: -2px;\n}\n\n:host > div > div.header:focus:focus-visible {\n z-index: 16;\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n:host > div > .header > span.body-3 > span {\n font-weight: var(--font-sb);\n}\n\n:host > div > .header > z-icon {\n fill: var(--color-form-default-icon);\n transform: rotate(360deg);\n transition: all 200ms linear;\n}\n\n:host > div > .header > z-icon.small,\n:host > div > .header > z-icon.x-small {\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n}\n\n:host > div.open > .header {\n border: var(--border-size-small) solid var(--color-form-active-primary);\n border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;\n}\n\n:host > div.disabled {\n pointer-events: none;\n}\n\n:host > div.disabled .header {\n border-color: var(--color-form-disabled03);\n fill: var(--color-form-disabled01-icon);\n}\n\n:host > div.disabled .header > span.body-3 {\n color: var(--color-form-disabled03);\n}\n\n:host > div.disabled .header > z-icon:last-child {\n fill: var(--color-form-disabled01-icon);\n}\n\n:host > div.open > .header > z-icon {\n fill: var(--color-form-default-icon);\n transform: rotate(180deg);\n transition: all 200ms linear;\n}\n\n:host > div > div.open-combo-data {\n display: none;\n}\n\n:host > div.open > div.open-combo-data {\n position: relative;\n z-index: 12;\n display: block;\n padding: var(--space-unit) calc(var(--space-unit) * 2);\n border: var(--border-size-small) solid var(--color-form-surface03);\n border-top: 0;\n background-color: var(--color-form-background);\n border-radius: 0;\n box-shadow: var(--shadow-2);\n}\n\n:host .open .open-combo-data z-input .z-label {\n color: var(--color-form-default-text);\n}\n\n:host > div.open > div.open-combo-data > div > div {\n overflow: auto;\n max-height: 235px;\n padding: 0;\n padding-left: var(--space-unit); /* padding left and negative margin in order to enable focus */\n margin-left: calc(var(--space-unit) * -1); /* padding left and negative margin in order to enable focus */\n}\n\n:host > div.open > div.open-combo-data > z-input {\n width: 100%;\n margin-bottom: calc(var(--space-unit) * 2);\n}\n\n:host > div.open > div.open-combo-data > div > div > ul {\n max-height: 235px;\n padding: 0 calc(var(--space-unit) * 0.5); /* needed for checkbox focus shadow */\n margin: 0;\n}\n\n:host .open-combo-data z-list-element {\n --background-color-list-element: var(--color-form-background);\n --background-hover-color-list-element: var(--color-form-surface03);\n --background-active-color-list-element: var(--color-form-surface03);\n}\n\n::-webkit-scrollbar {\n width: 6px;\n background: linear-gradient(to right, transparent 0 1px, var(--gray200) 1px 5px, transparent 5px 6px);\n}\n\n::-webkit-scrollbar-thumb {\n background-color: var(--color-primary01);\n}\n\n::-webkit-scrollbar-thumb:hover {\n background-color: var(--color-hover-primary);\n}\n\n/* Firefox scrollbar */\n@supports not selector(::-webkit-scrollbar-track) {\n :host {\n scrollbar-color: var(--color-primary01) transparent;\n }\n}\n\n:host > div.open > z-input {\n position: relative;\n z-index: 1;\n width: 238px;\n margin: 0 calc(var(--space-unit) * 2);\n color: var(--color-form-active-primary);\n}\n\n:host > div.open > div.open-combo-data > div > div.search {\n overflow: hidden;\n max-height: none;\n margin-top: 0;\n}\n\n:host > div.open > div.open-combo-data > div > div.search > ul {\n overflow: auto;\n max-height: 180px;\n padding: var(--space-unit) calc(var(--space-unit) * 2);\n}\n\n:host .open .open-combo-data .search .no-results {\n display: flex;\n align-items: center;\n column-gap: var(--space-unit);\n}\n\n:host > .open > .open-combo-data .search .close-search {\n display: flex;\n justify-content: center;\n}\n\n:host > div.open > div.open-combo-data > div > div.search .close-search > a {\n display: inline-block;\n height: 44px;\n color: var(--color-form-active-primary);\n cursor: pointer;\n font-size: 14px;\n font-weight: var(--font-sb);\n line-height: 44px;\n text-align: center;\n text-transform: uppercase;\n}\n\n:host > div.open > div.open-combo-data > div > div.search .close-search > a:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n:host > div.open > div.open-combo-data > div > div.check-all-wrapper {\n /* padding left and negative margin in order to enable focus */\n padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 2)\n calc(var(--space-unit) * 1.5);\n border-bottom: var(--border-size-small) solid var(--gray800);\n margin-bottom: var(--space-unit);\n margin-left: calc(var(--space-unit) * -1);\n text-align: left;\n}\n\n:host([size=\"small\"]) > div.open > div.open-combo-data > div > div.check-all-wrapper {\n padding: calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5);\n}\n\n:host([size=\"x-small\"]) > div.open > div.open-combo-data > div > div.check-all-wrapper {\n padding: var(--space-unit) calc(var(--space-unit) * 0.5);\n}\n\n/* TODO: remove */\n[role=\"option\"]:focus,\n[role=\"option\"]:focus-visible {\n background: lime;\n}\n","import {Component, Element, Event, EventEmitter, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ComboItem, ControlSize, InputType, KeyboardCode, ListDividerType, ListSize} from \"../../beans\";\nimport {handleKeyboardSubmit, randomId} from \"../../utils/utils\";\nimport {ZInput} from \"../z-input\";\n\n@Component({\n tag: \"z-combobox\",\n styleUrl: \"styles.css\",\n shadow: true,\n})\nexport class ZCombobox {\n @Element() element: HTMLZComboboxElement;\n\n /** input unique id */\n @Prop()\n inputid = `combo-${randomId()}`;\n\n /** list items array */\n @Prop()\n items: ComboItem[] | string;\n\n /** label text */\n @Prop()\n label: string;\n\n /** the combobox is disabled */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** show search input flag (optional) */\n @Prop()\n hassearch?: boolean = false;\n\n /** search input label text (optional) */\n @Prop()\n searchlabel?: string;\n\n /** search input placeholder text (optional) */\n @Prop()\n searchplaceholder?: string;\n\n /** search input title text (optional) */\n @Prop()\n searchtitle?: string;\n\n /** no result text message */\n @Prop()\n noresultslabel?: string = \"Nessun risultato\";\n\n /** toggle combo list opening flag */\n @Prop({mutable: true})\n isopen = false;\n\n /** fixed style flag */\n @Prop()\n isfixed = false;\n\n /** show \"check all\" checkbox (optional) */\n @Prop()\n hascheckall?: boolean = false;\n\n /** check all label (optional) */\n @Prop()\n checkalltext?: string = \"Seleziona tutti\";\n\n /** uncheck all label (optional) */\n @Prop()\n uncheckalltext?: string = \"Deseleziona tutti\";\n\n /** max number of checkable items (0 = unlimited) */\n @Prop()\n maxcheckableitems = 0;\n\n /** group items by category */\n @Prop()\n hasgroupitems?: boolean;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop()\n size?: ControlSize = ControlSize.BIG;\n\n @State()\n searchValue: string;\n\n @State()\n selectedCounter: number;\n\n @State()\n renderItemsList: ComboItem[] = []; // used for render only\n\n @State()\n focusedItemId: string;\n\n private itemsList: ComboItem[] = [];\n\n private inputType: InputType = InputType.TEXT;\n\n @Watch(\"items\")\n watchItems(): void {\n this.itemsList = typeof this.items === \"string\" ? JSON.parse(this.items) : this.items;\n this.selectedCounter = this.itemsList.filter((item) => item.checked).length;\n this.updateRenderItemsList();\n }\n\n @Watch(\"searchValue\")\n watchSearchValue(): void {\n this.filterItems(this.searchValue);\n }\n\n /** Emitted when value is checked/unchecked. Returns id, items. */\n @Event()\n comboboxChange: EventEmitter;\n\n private emitComboboxChange(): void {\n this.comboboxChange.emit({id: this.inputid, items: this.itemsList});\n }\n\n constructor() {\n this.toggleComboBox = this.toggleComboBox.bind(this);\n this.closeFilterItems = this.closeFilterItems.bind(this);\n }\n\n componentWillLoad(): void {\n this.watchItems();\n }\n\n componentWillRender(): void {\n this.selectedCounter = this.itemsList.filter((item) => item.checked).length;\n }\n\n private getControlToListSize(): ListSize {\n switch (this.size) {\n case ControlSize.X_SMALL:\n return ListSize.SMALL;\n case ControlSize.SMALL:\n return ListSize.MEDIUM;\n default:\n return ListSize.LARGE;\n }\n }\n\n private handleOptionKeyDown(e: KeyboardEvent, onOptionClickCallback: () => void, currId?: string): void {\n if ((e.code as KeyboardCode) === KeyboardCode.SPACE) {\n e.preventDefault();\n\n return onOptionClickCallback();\n }\n\n this.handleSelectArrowsNavigation(e, currId);\n }\n\n private handleSelectArrowsNavigation(e: KeyboardEvent, currId?: string): void {\n if (![KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP].includes(e.key as KeyboardCode) || !this.isopen) {\n return;\n }\n\n e.preventDefault();\n e.stopPropagation();\n\n const currElem = this.element.shadowRoot.querySelector(`#${currId}`);\n const options = Array.from(this.element.shadowRoot.querySelectorAll('[role=\"option\"]'));\n\n if (!options.length) {\n return;\n }\n\n const currElemIndex = currElem ? options.indexOf(currElem) : null;\n const firstElemIndex = 0;\n const lastElemIndex = options.length - 1;\n\n let nextElem = null;\n if (e.key === KeyboardCode.ARROW_DOWN) {\n nextElem =\n currElemIndex === null || currElemIndex === lastElemIndex\n ? options[firstElemIndex]\n : options[currElemIndex + 1];\n } else if (e.key === KeyboardCode.ARROW_UP) {\n nextElem =\n currElemIndex === null || currElemIndex === firstElemIndex\n ? options[lastElemIndex]\n : options[currElemIndex - 1];\n }\n\n this.focusedItemId = nextElem.id;\n nextElem.focus();\n }\n\n private handleHeaderKeyboardEvent(ev: KeyboardEvent): void {\n if (ev.key === KeyboardCode.SPACE) {\n ev.preventDefault();\n }\n\n if ((ev.key === KeyboardCode.ARROW_DOWN && !this.isopen) || (ev.key === KeyboardCode.ARROW_UP && this.isopen)) {\n this.toggleComboBox();\n }\n\n if (this.isopen && !this.hassearch) {\n this.handleSelectArrowsNavigation(ev);\n }\n }\n\n private updateRenderItemsList(): void {\n if (this.searchValue) {\n this.filterItems(this.searchValue);\n } else {\n this.resetRenderItemsList();\n }\n }\n\n private resetRenderItemsList(): void {\n const renderItemsList = [];\n this.itemsList.forEach((item: ComboItem) => {\n renderItemsList.push({...item});\n });\n this.renderItemsList = renderItemsList;\n }\n\n private filterItems(value: string): void {\n if (!value) {\n return this.closeFilterItems();\n }\n\n this.resetRenderItemsList();\n this.renderItemsList = this.renderItemsList.filter((item) => {\n const start = item.name.toUpperCase().indexOf(value.toUpperCase());\n const end = start + value.length;\n const newName =\n item.name.substring(0, start) +\n \"<strong>\" +\n item.name.substring(start, end) +\n \"</strong>\" +\n item.name.substring(end, item.name.length);\n\n item.name = newName;\n\n return start >= 0;\n });\n }\n\n private checkAll(checked = true): void {\n this.itemsList = this.itemsList.map((item: ComboItem) => ({\n ...item,\n checked: checked,\n }));\n this.resetRenderItemsList();\n this.emitComboboxChange();\n\n this.focusedItemId = null;\n const elem = this.element.shadowRoot.querySelector(\"#option-check-all\") as HTMLElement;\n this.focusedItemId = elem.id;\n elem.focus();\n }\n\n private closeFilterItems(): void {\n this.searchValue = \"\";\n this.resetRenderItemsList();\n }\n\n private toggleComboBox(): void {\n this.isopen = !this.isopen;\n }\n\n private getComboboxA11yAttributes(isZInput: boolean): Record<string, string> {\n const role = \"combobox\";\n const ariaExpanded = this.isopen ? \"true\" : \"false\";\n const ariaActivedescendant = this.isopen ? this.focusedItemId : \"\";\n const ariaControls = `${this.inputid}_list`;\n\n if (isZInput) {\n return {\n \"role\": role,\n \"html-aria-expanded\": ariaExpanded,\n \"html-aria-activedescendant\": ariaActivedescendant,\n \"html-aria-controls\": ariaControls,\n };\n }\n\n return {\n \"role\": role,\n \"aria-expanded\": ariaExpanded,\n \"aria-activedescendant\": ariaActivedescendant,\n \"aria-controls\": ariaControls,\n };\n }\n\n private renderHeader(): HTMLDivElement {\n return (\n <div\n class=\"header\"\n onClick={() => this.toggleComboBox()}\n onKeyDown={(ev: KeyboardEvent) => {\n this.handleHeaderKeyboardEvent(ev);\n }}\n onKeyUp={(ev: KeyboardEvent) => handleKeyboardSubmit(ev, this.toggleComboBox)}\n role=\"button\"\n tabindex={0}\n aria-controls=\"open-combo-data\"\n aria-expanded={this.isopen ? \"true\" : \"false\"}\n >\n <span class=\"body-3\">\n {this.label}\n <span>{this.selectedCounter > 0 && ` (${this.selectedCounter})`}</span>\n </span>\n <z-icon\n name=\"caret-down\"\n class={this.size}\n />\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n return (\n <div\n id=\"open-combo-data\"\n class=\"open-combo-data\"\n >\n {this.hassearch && this.renderSearchInput()}\n {!this.hassearch ? <span {...this.getComboboxA11yAttributes(false)} /> : null}\n <div\n role=\"listbox\"\n aria-label={this.label}\n aria-multiselectable=\"true\"\n id={`${this.inputid}_list`}\n aria-owns={Array.from(this.element.shadowRoot.querySelectorAll(\"[role='option']\"))\n .map((item) => item.id)\n .join(\" \")}\n >\n {this.renderItems()}\n </div>\n </div>\n );\n }\n\n private renderItems(): HTMLDivElement {\n return (\n <div\n class={this.searchValue && \"search\"}\n tabIndex={-1}\n role=\"presentation\"\n >\n {this.renderList(this.renderItemsList)}\n </div>\n );\n }\n\n private renderItem(item: ComboItem, index: number, length: number): HTMLZListElement {\n const optionId = `option-${item.id}`;\n const isDisabled = !item.checked && this.maxcheckableitems && this.selectedCounter >= this.maxcheckableitems;\n\n const onOptionClick = (): void => {\n this.itemsList = this.itemsList.map((i: ComboItem) => {\n if (item.id === i.id) {\n i.checked = !i.checked;\n }\n\n return i;\n });\n this.updateRenderItemsList();\n this.emitComboboxChange();\n };\n\n return (\n <z-list-element\n htmlTabindex={-1}\n dividerType={index !== length - 1 ? ListDividerType.ELEMENT : ListDividerType.NONE}\n size={this.getControlToListSize()}\n role=\"presentation\"\n disabled={isDisabled}\n >\n <z-icon name={item.checked ? \"checkbox-checked\" : \"checkbox\"} />\n <span\n id={optionId}\n role=\"option\"\n aria-selected={item.checked ? \"true\" : \"false\"}\n tabindex={this.focusedItemId === optionId ? 0 : -1}\n innerHTML={item.name}\n onKeyDown={(e: KeyboardEvent) => this.handleOptionKeyDown(e, onOptionClick, optionId)}\n onClick={onOptionClick}\n />\n </z-list-element>\n );\n }\n\n private renderList(items: ComboItem[]): HTMLUListElement {\n if (!items) {\n return;\n }\n if (!items.length && this.searchValue) {\n return this.renderNoSearchResults();\n }\n\n if (this.hasgroupitems) {\n return this.renderGroups(items);\n }\n\n return (\n <ul role=\"presentation\">\n {this.renderCheckAll()}\n {items.map((item, i) => {\n return this.renderItem(item, i, items.length);\n })}\n </ul>\n );\n }\n\n private renderGroups(items: ComboItem[]): HTMLUListElement {\n const newData = items.reduce((group, item, index) => {\n const category = item.category || \"Altra categoria\";\n const zListItem = this.renderItem(item, index, items.length);\n\n group[category] = group[category] ?? [];\n group[category].push(zListItem);\n\n return group;\n }, {});\n\n const listGroups = Object.entries(newData as {[key: string]: HTMLZListElementElement[]}).map(\n ([key, value], index) => {\n return (\n <z-list-group\n divider-type={ListDividerType.ELEMENT}\n ariaLabelledby={`${this.inputid}_list_group_${index}`}\n >\n <span\n class=\"body-3-sb z-list-group-title\"\n slot=\"header-title\"\n id={`${this.inputid}_list_group_${index}`}\n aria-hidden=\"true\"\n >\n {key}\n </span>\n {value.map((item) => item)}\n </z-list-group>\n );\n }\n );\n\n return (\n <ul role=\"presentation\">\n {this.renderCheckAll()}\n {listGroups}\n </ul>\n );\n }\n\n private renderNoSearchResults(): HTMLUListElement {\n return (\n <div class=\"no-results\">\n <span>{this.noresultslabel}</span>\n </div>\n );\n }\n\n private renderSearchInput(): ZInput {\n return (\n <z-input\n htmlid={`${this.inputid}_search`}\n label={this.searchlabel}\n placeholder={this.searchplaceholder}\n htmltitle={this.searchtitle}\n type={this.inputType}\n value={this.searchValue}\n message={false}\n size={this.size}\n html-aria-autocomplete=\"list\"\n {...this.getComboboxA11yAttributes(true)}\n onKeyUp={(e: KeyboardEvent) => {\n if (e.key === KeyboardCode.ESC) {\n this.closeFilterItems();\n }\n this.handleSelectArrowsNavigation(e);\n }}\n onInputChange={(e: CustomEvent) => {\n this.searchValue = e.detail.value;\n }}\n />\n );\n }\n\n private renderCheckAll(): HTMLDivElement {\n if (!this.hascheckall || this.searchValue) {\n return;\n }\n\n const optionId = \"option-check-all\";\n const allChecked = this.selectedCounter === this.itemsList.length;\n\n const onOptionClick = (): void => this.checkAll(!allChecked);\n\n return (\n <z-list-element\n class=\"check-all-wrapper\"\n role=\"presentation\"\n htmlTabindex={-1}\n dividerType={ListDividerType.ELEMENT}\n size={this.getControlToListSize()}\n >\n <z-icon name={allChecked ? \"checkbox-checked\" : \"checkbox\"} />\n <span\n id={optionId}\n role=\"option\"\n aria-selected={allChecked ? \"true\" : \"false\"}\n tabindex={this.focusedItemId === optionId ? 0 : -1}\n onKeyDown={(e: KeyboardEvent) => this.handleOptionKeyDown(e, onOptionClick, optionId)}\n onClick={onOptionClick}\n >\n {allChecked ? this.uncheckalltext : this.checkalltext}\n </span>\n </z-list-element>\n );\n }\n\n render(): HTMLDivElement {\n return (\n <div\n data-action={`combo-${this.inputid}`}\n class={{open: this.isopen, fixed: this.isfixed, disabled: this.disabled}}\n id={this.inputid}\n >\n {this.renderHeader()}\n {!this.disabled && this.renderContent()}\n </div>\n );\n }\n}\n"],"mappings":"kLAAA,MAAMA,EAAY,q6JAClB,MAAAC,EAAeD,E,MCSFE,EAAS,MAwFpB,UAAAC,GACEC,KAAKC,iBAAmBD,KAAKE,QAAU,SAAWC,KAAKC,MAAMJ,KAAKE,OAASF,KAAKE,MAChFF,KAAKK,gBAAkBL,KAAKC,UAAUK,QAAQC,GAASA,EAAKC,UAASC,OACrET,KAAKU,uB,CAIP,gBAAAC,GACEX,KAAKY,YAAYZ,KAAKa,Y,CAOhB,kBAAAC,GACNd,KAAKe,eAAeC,KAAK,CAACC,GAAIjB,KAAKkB,QAAShB,MAAOF,KAAKC,W,CAG1D,WAAAkB,CAAAC,G,yDAxBQpB,KAAAC,UAAyB,GAEzBD,KAAAqB,UAAuBC,EAAUC,K,aAhF/B,SAASC,M,wDAYE,M,eAIC,M,2GAgBI,mB,YAIjB,M,aAIC,M,iBAIc,M,kBAIA,kB,oBAIE,oB,uBAIN,E,uCAQCC,EAAYC,I,+EASF,G,6BA8B7B1B,KAAK2B,eAAiB3B,KAAK2B,eAAeC,KAAK5B,MAC/CA,KAAK6B,iBAAmB7B,KAAK6B,iBAAiBD,KAAK5B,K,CAGrD,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KqJ,aAAerJ,KAAKa,YAAa,CACzC,M,CAGF,MAAMkG,EAAW,mBACjB,MAAMuC,EAAatJ,KAAKK,kBAAoBL,KAAKC,UAAUQ,OAE3D,MAAMyG,EAAgB,IAAYlH,KAAKqF,UAAUiE,GAEjD,OACEvD,EAAA,kBACEC,MAAM,oBACNN,KAAK,eACL0B,cAAe,EACfC,YAAaC,EAAgBC,QAC7BtF,KAAMjC,KAAKgC,wBAEX+D,EAAA,UAAQf,KAAMsE,EAAa,mBAAqB,aAChDvD,EAAA,QACE9E,GAAI8F,EACJrB,KAAK,SAAQ,gBACE4D,EAAa,OAAS,QACrCjD,SAAUrG,KAAKmE,gBAAkB4C,EAAW,GAAK,EACjDb,UAAY1D,GAAqBxC,KAAKuC,oBAAoBC,EAAG0E,EAAeH,GAC5Ed,QAASiB,GAERoC,EAAatJ,KAAKuJ,eAAiBvJ,KAAKwJ,c,CAMjD,MAAAC,GACE,OACE1D,EAAA,OAAA5C,IAAA,yDACe,SAASnD,KAAKkB,UAC3B8E,MAAO,CAAC0D,KAAM1J,KAAKoD,OAAQuG,MAAO3J,KAAK4J,QAASnC,SAAUzH,KAAKyH,UAC/DxG,GAAIjB,KAAKkB,SAERlB,KAAK8F,gBACJ9F,KAAKyH,UAAYzH,KAAKuG,gB","ignoreList":[]}
|
package/www/build/p-e13b193a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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-ee223a82",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[4,"skip-load-animation"],"showBackdrop":[4,"show-backdrop"],"skipAnimation":[32]},[[2,"click","stopEvent"],[2,"focusin","stopEvent"]],{"variant":["handlePageOverflow"],"open":["onOpenChanged"]}],[6,"z-tag",{"icon":[1],"expandable":[4]}],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"],"role":[513],"ariaLabelledby":[513,"aria-labelledby"]}],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-element",{"alignButton":[513,"align-button"],"clickable":[516],"dividerColor":[1,"divider-color"],"dividerType":[1,"divider-type"],"dividerSize":[1,"divider-size"],"expandable":[516],"expandableStyle":[1,"expandable-style"],"listElementId":[514,"list-element-id"],"size":[513],"color":[513],"disabled":[516],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"],"role":[513],"htmlTabindex":[2,"html-tabindex"],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[2,"z-input",{"htmlid":[1],"type":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"htmlAriaExpanded":[1,"html-aria-expanded"],"htmlAriaControls":[1,"html-aria-controls"],"htmlAriaAutocomplete":[1,"html-aria-autocomplete"],"htmlAriaActivedescendant":[1,"html-aria-activedescendant"],"value":[1025],"disabled":[516],"readonly":[4],"required":[4],"checked":[1028],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"labelPosition":[1,"label-position"],"autocomplete":[1],"role":[1],"hasclearicon":[4],"icon":[1],"min":[2],"minlength":[2],"max":[2],"maxlength":[2],"step":[2],"pattern":[1],"size":[513],"isTyping":[32],"passwordHidden":[32],"isChecked":[64]},[[4,"inputCheck","inputCheckListener"]]],[1,"z-input-message",{"message":[1],"status":[513],"disabled":[516],"statusRole":[32]},null,{"message":["onMessageChange"],"status":["onMessageChange"]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[6,"z-button",{"ariaLabel":[1,"aria-label"],"role":[1],"htmlrole":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"iconPosition":[513,"icon-position"],"size":[513]}],[1,"z-icon",{"name":[1],"height":[8],"width":[8],"iconid":[1],"fill":[1]}]]],["p-b63c8e8b",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-57314d68",[[2,"z-select",{"htmlid":[1],"items":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"readonly":[4],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"autocomplete":[4],"noresultslabel":[1],"hasGroupItems":[4,"has-group-items"],"hasTreeItems":[4,"has-tree-items"],"showChildrenOfMatchingParent":[4,"show-children-of-matching-parent"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"]}]]],["p-7194003a",[[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-bc2fb71e",[[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],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"]}]]],["p-f487290e",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-757415e9",[[6,"z-file-upload",{"type":[513],"buttonVariant":[1,"button-variant"],"acceptedFormat":[1,"accepted-format"],"fileMaxSize":[2,"file-max-size"],"mainTitle":[1,"main-title"],"description":[1],"uploadBtnLabel":[1,"upload-btn-label"],"dragAndDropLabel":[1,"drag-and-drop-label"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"inputName":[1,"input-name"],"showErrors":[4,"show-errors"],"_type":[32],"files":[32],"invalidFiles":[32],"input":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","onFileRemoved"],[0,"fileDropped","fileDroppedListener"]]]]],["p-8c164e0d",[[0,"z-pagination",{"label":[1],"navArrows":[4,"nav-arrows"],"totalPages":[2,"total-pages"],"skip":[2],"edges":[4],"split":[2],"visiblePages":[2,"visible-pages"],"currentPage":[1026,"current-page"],"goToPage":[4,"go-to-page"],"_visiblePages":[32],"isMobile":[32],"goToPageValue":[32]},[[9,"resize","onResize"]],{"_visiblePages":["setPagesContainerWidth"],"visiblePages":["setVisiblePages"],"currentPage":["onPageChanged"],"split":["onSplitChanged"]}]]],["p-4cec3345",[[1,"z-tree-list",{"items":[1],"htmlAriaLabelledby":[513,"html-aria-labelledby"],"htmlSectionTitle":[513,"html-section-title"]},null,{"items":["watchItems"]}]]],["p-2612e3a2",[[1,"z-book-card",{"variant":[513],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"year":[1],"ebookUrl":[1,"ebook-url"],"linkTarget":[1,"link-target"],"fallbackCover":[1,"fallback-cover"],"hasMultipleCovers":[4,"has-multiple-covers"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-342b0eb0",[[1,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[516],"arrowsPosition":[513,"arrows-position"],"progressMode":[1,"progress-mode"],"fixedArrows":[516,"fixed-arrows"],"ghostLoadingHeight":[2,"ghost-loading-height"],"infinite":[4],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},null,{"current":["onIndexChange"],"single":["onSingleModeChange"],"infinite":["onInfiniteModeChange"]}]]],["p-817689d5",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"name":[1],"value":[1],"flatpickrPosition":[32],"inputError":[32]},[[2,"keydown","handleKeyDown"]],{"mode":["setupPickers"]}]]],["p-a905df88",[[2,"z-file",{"fileNumber":[2,"file-number"],"fileName":[1,"file-name"],"allowPopover":[32],"popoverVisible":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]]],["p-e3b82454",[[0,"z-range-picker",{"rangePickerId":[1,"range-picker-id"],"firstAriaLabel":[1,"first-aria-label"],"firstLabel":[1,"first-label"],"secondAriaLabel":[1,"second-aria-label"],"secondLabel":[1,"second-label"],"mode":[1],"firstPickerReadOnly":[4,"first-picker-read-only"],"lastPickerReadOnly":[4,"last-picker-read-only"],"firstPickerPlaceholder":[1,"first-picker-placeholder"],"lastPickerPlaceholder":[1,"last-picker-placeholder"],"flatpickrPosition":[32],"activeInput":[32],"firstInputError":[32],"lastInputError":[32]},[[18,"click","handleClick"],[18,"keyup","handleKeyDown"]],{"firstPickerReadOnly":["setupFirstPickersReadOnly"],"lastPickerReadOnly":["setupLastPickersReadOnly"],"mode":["setupPickers"]}]]],["p-e5407cc1",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-d90d2698",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"showSorting":[513,"show-sorting"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"sorted":[1540],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-b7b972c0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsedLabel":[1,"collapsed-label"],"isCollapsed":[516,"is-collapsed"],"collapsed":[32]}]]],["p-1fd1cf02",[[1,"z-book-card-app",{"logo":[1],"name":[1],"link":[1],"laz":[4],"info":[1]}]]],["p-863fd1c4",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-5f94986f",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-af5e8524",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-dc086eb5",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-31bd2a1c",[[1,"z-result-card",{"cardTitle":[1,"card-title"],"cardSubtitle":[1,"card-subtitle"],"authors":[1],"cover":[1],"fallbackCover":[1,"fallback-cover"],"hasMultipleCovers":[4,"has-multiple-covers"],"isInfoCard":[4,"is-info-card"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-d6a7b7f3",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]},null,{"isDisabled":["onDisabledChange"]}]]],["p-539f99db",[[1,"z-book-card-deprecated",{"variant":[1],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"ribbon":[1],"ribbonIcon":[1,"ribbon-icon"],"ribbonInteractive":[4,"ribbon-interactive"],"borderless":[4],"fallbackCover":[1,"fallback-cover"],"operaTitleTag":[1,"opera-title-tag"],"isMobile":[32],"hasResources":[32],"showResources":[32]}]]],["p-86160fe3",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-ee695830",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-7a4f6a5b",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-2e0923bd",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-5a24e268",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-ceeb3e2a",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-816fd6dc",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-460b2068",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-01f941c2",[[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-6cffbabc",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-5989465b",[[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-fb232d07",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-8bd4a2aa",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-7ceddb7a",[[1,"z-stepper-item",{"index":[514],"href":[513],"pressed":[516],"checked":[516],"disabled":[516]}]]],["p-c778bf87",[[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-e0b88075",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-4aaf0172",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-ac477ae7",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-dc156429",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-deb7f8d7",[[4,"z-aria-alert",{"mode":[1]}]]],["p-2bdac94e",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-240de9aa",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-943db3a8",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-028dd72a",[[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-a2e87cec",[[1,"z-myz-card-footer-sections"]]],["p-28534fb5",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-b3f1b5c1",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-6cff173f",[[1,"z-stepper"]]],["p-ce6e18f9",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-237fcaa9",[[1,"z-tbody"]]],["p-d75f8bbb",[[1,"z-tfoot",{"sticky":[516]}]]],["p-9e3da0b7",[[1,"z-thead",{"sticky":[516],"isFocusable":[516,"is-focusable"]}]]],["p-0a49dd1c",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-4551b0df",[[1,"z-visually-hidden"]]],["p-5a1f98a2",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-94916bdf",[[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-28d83c86",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-2ffdfbb1",[[1,"z-alert",{"type":[1]}]]],["p-4affbb99",[[1,"z-ghost-loading"]]],["p-4a257653",[[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"],"dragging":[32]}],[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"lockPageScroll":[4,"lock-page-scroll"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-f4bac89b",[[1,"z-book-cover",{"cover":[1],"fallbackCover":[1,"fallback-cover"],"multiple":[516],"bordered":[516]}]]],["p-5c5882c6",[[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-78146cef",[[1,"z-popover",{"position":[1537],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]],{"position":["validatePosition"],"open":["onOpen"],"bindTo":["onBindingChange"]}]]]]'),e)}));
|
|
2
|
-
//# sourceMappingURL=web-components-library.esm.js.map
|