-> Refonte du système de GESTION DES ROULEMENTS de matériels roulants -> Cartographie Infra + Widget
2 lines
7.3 KiB
JavaScript
2 lines
7.3 KiB
JavaScript
import{r as o,c as e,h as t,H as a,g as c}from"./p-32e583ea.js";import{c as s,d as n,i,a as r,s as l}from"./p-52d77e1f.js";import{c as m}from"./p-0017d766.js";const d=':host{--wcs-com-nav-category-label-mobile-font-weight:var(--wcs-semantic-font-weight-medium);--wcs-com-nav-category-label-mobile-color:var(--wcs-semantic-color-text-primary);--wcs-com-nav-category-label-font-size:var(--wcs-semantic-font-size-label-1);--wcs-com-nav-category-label-desktop-font-weight:var(--wcs-semantic-font-weight-roman);--wcs-com-nav-category-label-desktop-color:var(--wcs-semantic-color-text-primary);--wcs-com-nav-category-label-desktop-gap:var(--wcs-semantic-spacing-base);--wcs-com-nav-category-label-desktop-focus-outline-color:var(--wcs-semantic-color-border-focus-base);--wcs-com-nav-category-item-mobile-color:var(--wcs-semantic-color-text-primary);--wcs-com-nav-category-item-mobile-font-weight:var(--wcs-semantic-font-weight-roman);--wcs-com-nav-category-item-mobile-spacing-top:var(--wcs-semantic-spacing-large);--wcs-com-nav-category-item-mobile-spacing-left:calc(var(--wcs-semantic-spacing-base) * 3);--wcs-com-nav-category-item-mobile-gap:calc(var(--wcs-semantic-spacing-base) * 1.5);--wcs-com-nav-category-desktop-menu-background-color:transparent;--wcs-com-nav-category-desktop-menu-border-left-width:var(--wcs-semantic-border-width-default);--wcs-com-nav-category-desktop-menu-border-left-color:var(--wcs-semantic-color-border-secondary);--wcs-com-nav-category-desktop-menu-background-indicator-color:transparent;--wcs-com-nav-category-desktop-menu-gap:calc(var(--wcs-semantic-spacing-base) * 3);--wcs-com-nav-category-item-desktop-color:var(--wcs-semantic-color-text-primary);--wcs-com-nav-category-item-desktop-font-weight:var(--wcs-semantic-font-weight-roman);--wcs-com-nav-category-desktop-menu-padding-top:50px;--wcs-com-nav-category-desktop-menu-padding-bottom:50px;--wcs-com-nav-category-desktop-menu-padding-left:50px;--wcs-com-nav-category-desktop-menu-padding-right:0;display:block;height:fit-content}:host button{background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:initial}:host .label-container{margin:0;font-size:var(--wcs-com-nav-category-label-font-size);font-weight:var(--wcs-com-nav-category-label-mobile-font-weight);display:block;color:var(--wcs-com-nav-category-label-mobile-color)}:host .label-container .arrow-container{display:none}:host .label-container .arrow-icon{display:none}:host .item-container{display:flex;flex-direction:column;gap:var(--wcs-com-nav-category-item-mobile-gap);margin-left:var(--wcs-com-nav-category-item-mobile-spacing-left);margin-top:var(--wcs-com-nav-category-item-mobile-spacing-top)}:host .item-container ::slotted(wcs-com-nav-item){color:var(--wcs-com-nav-category-item-mobile-color);font-weight:var(--wcs-com-nav-category-item-mobile-font-weight)}@media (min-width: 576px){:host{padding-bottom:unset}:host .item-container:not([data-open]){display:none}:host button{cursor:pointer}:host .label-container{display:flex;align-items:center;gap:var(--wcs-com-nav-category-label-desktop-gap);font-weight:var(--wcs-com-nav-category-label-desktop-font-weight);cursor:pointer;user-select:none;padding-left:unset;color:var(--wcs-com-nav-category-label-desktop-color)}:host .label-container .arrow-icon{display:inline-block;font-family:icons;font-size:0.6rem;line-height:1;box-sizing:border-box}:host .label-container .arrow-container{display:unset}:host .label-container:focus-visible{outline:var(--wcs-semantic-border-width-large) dashed var(--wcs-com-nav-category-label-desktop-focus-outline-color);outline-offset:0.1rem;border-radius:5px}@supports not selector(.label-container:focus-visible){:host .label-container:focus-within{outline:var(--wcs-semantic-border-width-large) dashed var(--wcs-com-nav-category-label-desktop-focus-outline-color);outline-offset:0.1rem;border-radius:5px}}:host button.label-container[aria-expanded=true]:after{position:absolute;left:calc(50% + var(--wcs-com-content-max-width) / 8 - 0.5625rem);z-index:2;display:block;width:1.125rem;height:1.125rem;content:"";background-color:var(--wcs-com-nav-category-desktop-menu-background-indicator-color);transform:rotate(45deg)}:host .item-container[data-open]{position:absolute;border-left:solid var(--wcs-com-nav-category-desktop-menu-border-left-width) var(--wcs-com-nav-category-desktop-menu-border-left-color);left:calc(50% + var(--wcs-com-content-max-width) / 8);top:0;right:0;padding:var(--wcs-com-nav-category-desktop-menu-padding-top) var(--wcs-com-nav-category-desktop-menu-padding-right) var(--wcs-com-nav-category-desktop-menu-padding-bottom) var(--wcs-com-nav-category-desktop-menu-padding-left);background-blend-mode:multiply;background-color:var(--wcs-com-nav-category-desktop-menu-background-color);box-sizing:border-box;height:100%;margin-left:unset;margin-top:unset;display:flex;flex-direction:column;gap:var(--wcs-com-nav-category-desktop-menu-gap);align-items:start}:host .item-container[data-open] ::slotted(wcs-com-nav-item){color:var(--wcs-com-nav-category-item-desktop-color);font-weight:var(--wcs-com-nav-category-item-desktop-font-weight)}:host .item-container[data-open] ::slotted(wcs-com-nav-item:focus-within){outline:var(--wcs-semantic-border-width-large) dashed var(--wcs-com-nav-category-item-desktop-color);outline-offset:0.1rem;border-radius:2px}}';const g=d;const p=["title"];const w=class{constructor(t){o(this,t);this.wcsCategoryOpened=e(this,"wcsCategoryOpened",7);this.inheritedAttributes={};this.categoryItemsId=`wcs-com-nav-category-items`;this.label=undefined;this.categoryOpen=false;this.currentActiveSizing="desktop"}onWindowClickEvent(o){if(this.categoryOpen)this.categoryOpen=false}onSubmenuOpened(o){if(o.detail.categoryElement!==this.el){this.categoryOpen=false}}componentDidLoad(){if(!this.resizeObserver){this.resizeObserver=m(this);this.resizeObserver.observe(document.body)}}handleCategoryItemsKeyDown(o){if(s(o)||n(o)){this.handleItemClick(o)}}componentWillLoad(){this.inheritedAttributes=Object.assign(Object.assign({},i(this.el)),r(this.el,p))}async setAriaAttribute(o,e){l(this.nativeButton,o,e)}async close(){this.categoryOpen=false}async open(){this.categoryOpen=true}onClick(o){o.stopPropagation();this.wcsCategoryOpened.emit({categoryElement:this.el})}handleItemClick(o){if(o.target.tagName==="A"){this.close()}}disconnectedCallback(){var o;(o=this.resizeObserver)===null||o===void 0?void 0:o.disconnect()}render(){return t(a,{key:"0b5d69d30228c1585c17d74bf8183f6fe91c1696",role:"listitem",onClick:o=>this.onClick(o)},this.currentActiveSizing==="mobile"?t("h3",{role:"presentation",class:"label-container"},t("span",{class:"label"},this.label)):t("button",Object.assign({class:"label-container","aria-controls":this.categoryItemsId,"aria-expanded":this.categoryOpen?"true":"false",ref:o=>this.nativeButton=o,onClick:o=>this.categoryOpen=!this.categoryOpen},this.inheritedAttributes),t("span",{class:"label"},this.label),t("span",{class:"arrow-container"},t("span",{"aria-hidden":"true",class:"arrow-icon"},""))),t("div",{key:"8269a3a8eb304343e6beef3cfde1e20976e02bbb",class:"item-container",role:"list","aria-label":this.label,id:this.categoryItemsId,tabIndex:-1,"data-open":this.categoryOpen,onKeyDown:o=>this.handleCategoryItemsKeyDown(o),onClick:o=>this.handleItemClick(o)},t("slot",{key:"0cd3f5916499f4e14d554e7fe963a2a384c4b39d"})))}get el(){return c(this)}};w.style=g;export{w as wcs_com_nav_category};
|
|
//# sourceMappingURL=p-ad286030.entry.js.map
|