@illinois-toolkit/ilw-header-megamenu 0.0.1 → 1.0.1

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.
@@ -1 +1 @@
1
- ilw-header-megamenu[compact]{--ilw-header-megamenu--background: #e8e9eb;--ilw-header-megamenu--flex-direction: column;--ilw-header-megamenu--items--position: relative;--ilw-header-megamenu--items--border: none;--ilw-header-megamenu--items--box-shadow: none;--ilw-header-megamenu--items--width: 100%;--ilw-header-megamenu--font: 600 18px / 28px var(--il-font-sans);--ilw-header-megamenu--grid-template-columns: auto 52px;--ilw-header-megamenu--link-border-left-highlight: 4px solid transparent;--ilw-header-megamenu--link-border-left-highlight--hover: 4px solid var(--il-orange);--ilw-header-megamenu--link-border-left-highlight--focus: 4px solid var(--il-blue);--ilw-header-megamenu--link-border-bottom-highlight: none;--ilw-header-megamenu--link-border-bottom-highlight--hover: none;--ilw-header-megamenu--link-border-bottom-highlight--focus: none;--ilw-header-megamenu--items--position: initial;--ilw-header-megamenu-section--grid-template-columns--header: auto 22px;--ilw-header-megamenu--grid-template-columns: auto 51px}ilw-header-megamenu{all:initial;display:block;background:var(--ilw-header-megamenu--background)}ilw-header-megamenu>ul{all:initial;display:flex;flex-direction:var(--ilw-header-megamenu--flex-direction)}ilw-header-megamenu>ul>li{all:initial;display:block;background:var(--ilw-header-megamenu--background)}ilw-header-megamenu>ul>li>a{all:initial;box-sizing:border-box;height:100%;display:flex;align-items:center;position:relative;padding:6px 20px;font:var(--ilw-header-megamenu--font);background:var(--ilw-header-megamenu--link-background);color:var(--ilw-header-megamenu--link-color);outline:0;cursor:pointer;border-width:0 0 3px 0;border-style:solid;border-color:transparent;border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight);border-left:var(--ilw-header-megamenu--link-border-left-highlight)}ilw-header-megamenu>ul>li>a[aria-current=true],ilw-header-megamenu>ul>li>a[aria-current=page]{border-color:var(--il-blue)}ilw-header-megamenu>ul>li>a:hover{background:var(--ilw-header-megamenu--link-background--hover);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--hover);border-left:var(--ilw-header-megamenu--link-border-left-highlight--hover);color:var(--ilw-header-megamenu--link-color--hover);text-decoration:underline}ilw-header-megamenu>ul>li>a:focus{background:var(--ilw-header-megamenu--link-background--focus);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--focus);border-left:var(--ilw-header-megamenu--link-border-left-highlight--focus)}ilw-header-megamenu[compact]>ul>li>a{border-bottom:1px solid var(--il-storm-lighter-3)}ilw-header-megamenu-section[linked] a[slot=link]{all:initial;box-sizing:border-box;height:100%;display:flex;align-items:center;text-indent:var(--ilw-header-megamenu-section--anchor--text-indent);position:relative;font:var(--ilw-header-megamenu--font);background:var(--ilw-header-megamenu--link-background);color:var(--ilw-header-megamenu--link-color);outline:0;cursor:pointer;padding:9px 2px 6px 20px;border-width:0 0 3px 0;border-style:solid;border-color:transparent;border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight)}ilw-header-megamenu-section[linked] a[slot=link]:hover{background:var(--ilw-header-megamenu--link-background--hover);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--hover);color:var(--ilw-header-megamenu--link-color--hover);text-decoration:underline}ilw-header-megamenu-section[linked] a[slot=link]:focus{background:var(--ilw-header-megamenu--link-background--focus);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--focus)}ilw-header-megamenu-section[linked][aria-current=page] a[slot=link]{border-color:var(--il-blue)}ilw-header-megamenu-section[linked][aria-current=page] a[slot=link]:hover{border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--hover)}ilw-header-megamenu-section[linked][aria-current=page] a[slot=link]:focus{border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--focus)}ilw-header-megamenu-section img{margin:30px;object-fit:cover;width:90%;height:auto;border-radius:30px;grid-column:4;justify-self:right}ilw-header-megamenu-section img.span-2,ilw-header-megamenu-section span[slot=action].span-2{grid-column:3 / span 2}ilw-header-megamenu-section img.span-3,ilw-header-megamenu-section span[slot=action].span-3{grid-column:2 / span 3}ilw-header-megamenu-section img.align-left,ilw-header-megamenu-section span[slot=action].align-left{grid-column:1;justify-self:left}ilw-header-megamenu-section img.span-2.align-left,ilw-header-megamenu-section span[slot=action].span-2.align-left{grid-column:1 / span 2;justify-self:left}ilw-header-megamenu-section img.span-3.align-left,ilw-header-megamenu-section span[slot=action].span-3.align-left{grid-column:1 / span 3;justify-self:left}ilw-header-megamenu-section span[slot=action]{margin:auto;position:relative;width:100%;height:100%;display:flex;justify-content:center;flex-direction:column}ilw-header-megamenu-section span[slot=action] *{display:none}ilw-header-megamenu-section span[slot=action] button:first-of-type{display:block;position:relative;z-index:1;margin:0 auto}ilw-header-megamenu-section span[slot=action] p:first-of-type{display:block;text-align:center;font-size:21px;font-weight:700;color:var(--il-blue);font-family:Source Sans,sans-serif;position:relative;z-index:1}ilw-header-megamenu-section span[slot=action] img:first-of-type{display:block;position:absolute;top:0;left:0;width:100%;height:85%;object-fit:cover;z-index:0;margin:30px 0}ilw-header-megamenu-section span[slot=action].span-2 img:first-of-type,ilw-header-megamenu-section span[slot=action].span-3 img:first-of-type{width:90%;margin:30px}ilw-header-megamenu-section ul{list-style:none;margin:30px 0;padding-left:0;display:grid;grid-template-columns:repeat(4,minmax(0,320px));grid-template-rows:repeat(5,34px);grid-auto-flow:column;max-width:100vw}ilw-header-megamenu-section ul li{list-style:none;padding-left:30px}ilw-header-megamenu-section ul li span{display:inline-block;text-indent:var(--ilw-header-megamenu-section--anchor--text-indent)}ilw-header-megamenu-section ul li ul{display:inherit}ilw-header-megamenu-section ul li ul a{font-weight:400}ilw-header-megamenu-section ul li a{--ilw-header-megamenu--link-border-left-highlight: 4px solid transparent;--ilw-header-megamenu--link-border-left-highlight--hover: 4px solid var(--il-orange);--ilw-header-megamenu--link-border-left-highlight--focus: 4px solid var(--il-blue);--ilw-header-megamenu--link-border-bottom-highlight: initial;--ilw-header-megamenu--link-border-bottom-highlight--focus: initial;--ilw-header-megamenu--link-border-bottom-highlight--hover: initial;all:initial;box-sizing:border-box;text-indent:var(--ilw-header-megamenu-section--anchor--text-indent);display:block;position:relative;padding:var(--ilw-header-megamenu-section--anchor--padding);font:var(--ilw-header-megamenu--font);font-weight:700;background:transparent;color:var(--il-blue);outline:0;cursor:pointer;border-top:var(--ilw-header-megamenu-section--anchor--border);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight)}ilw-header-megamenu-section ul li a:hover{background:var(--ilw-header-megamenu--link-background--hover);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--hover);color:var(--ilw-header-megamenu--link-color--hover);text-decoration:underline}ilw-header-megamenu-section ul li a:focus{background:var(--ilw-header-megamenu--link-background--sub--focus);border-bottom:var(--ilw-header-megamenu--link-border-left-highlight--focus)}ilw-header-megamenu-section div ul:nth-child(n+5),ilw-header-megamenu-section div img:nth-child(n+5),ilw-header-megamenu-section div span:nth-child(n+5),ilw-header-megamenu-section>ul>li>ul{display:none}ilw-header-megamenu-section div{display:grid;grid-template-columns:repeat(4,minmax(0,320px));max-width:100vw;grid-auto-flow:column}ilw-header-megamenu-section div ul{border-left:solid 2px var(--il-storm-85, #d5d3d3)}ilw-header-megamenu-section div ul:first-child{border:none}ilw-header-megamenu-section div ul{display:block}ilw-header-megamenu-section div ul li{border-right:none}ilw-header-megamenu-section div ul li ul{margin-top:0;margin-bottom:0;border:none}ilw-header-megamenu-section div ul li ul li{border-right:none}ilw-header-megamenu-section ilw-header-megamenu-section{--ilw-header-megamenu--items--top: 0;--ilw-header-megamenu--items--left: 250px;--ilw-header-megamenu--link-border-left-highlight: 4px solid transparent;--ilw-header-megamenu--link-border-left-highlight--hover: 4px solid var(--il-orange);--ilw-header-megamenu--link-border-left-highlight--focus: 4px solid var(--il-blue);--ilw-header-megamenu--link-border-bottom-highlight: initial;--ilw-header-megamenu--link-border-bottom-highlight--hover: initial;--ilw-header-megamenu--link-border-bottom-highlight--focus: initial;--ilw-header-megamenu--grid-template-columns: auto 55px;--ilw-header-megamenu-section--transform: rotate(270deg);--ilw-header-megamenu-section--transform--selected: rotate(90deg)}ilw-header-megamenu[compact] ilw-header-megamenu-section{display:block;border-bottom:1px solid var(--il-storm-lighter-3)}ilw-header-megamenu[compact] ilw-header-megamenu-section a:focus{background:var(--ilw-header-megamenu--link-background--sub--focus);border-left:var(--ilw-header-megamenu--link-border-left-highlight--focus)}ilw-header-megamenu[compact] ilw-header-megamenu-section span[slot=action]{grid-column:auto;height:auto}ilw-header-megamenu[compact] ilw-header-megamenu-section span[slot=action] button{margin-bottom:20px}ilw-header-megamenu[compact] ilw-header-megamenu-section span[slot=action].span-3 img,ilw-header-megamenu[compact] ilw-header-megamenu-section span[slot=action].span-2 img,ilw-header-megamenu[compact] ilw-header-megamenu-section span[slot=action] img{margin:auto 0;width:100%;height:100%}ilw-header-megamenu[compact] ilw-header-megamenu-section img{display:none}ilw-header-megamenu[compact] ilw-header-megamenu-section div{display:block}ilw-header-megamenu[compact] ilw-header-megamenu-section ul{display:inherit;padding:0;margin:0}ilw-header-megamenu[compact] ilw-header-megamenu-section ul li{--ilw-header-megamenu-section--anchor--text-indent: 20px;border-top:1px solid var(--il-storm-lighter-3);background:var(--il-storm-lighter-4);padding-left:0}ilw-header-megamenu[compact] ilw-header-megamenu-section ul li a:focus{background:var(--ilw-header-megamenu--link-background--sub--focus);border-left:var(--ilw-header-megamenu--link-border-left-highlight--focus);border-bottom:none}ilw-header-megamenu[compact] ilw-header-megamenu-section ul li ul li a{padding-left:45px}ilw-header-megamenu[compact] ilw-header-megamenu-section ilw-header-megamenu-section{border-bottom:none;--ilw-header-megamenu-section--transform: none;--ilw-header-megamenu-section--transform--selected: rotate(180deg);--ilw-header-megamenu--grid-template-columns: auto 51px}ilw-header-megamenu[compact] ilw-header-megamenu-section ilw-header-megamenu-section ul a,ilw-header-megamenu[compact] ilw-header-megamenu-section ilw-header-megamenu-section ul button{--ilw-header-megamenu-section--anchor--text-indent: 40px}ul>span[action],li>span[action],ul>img,li>img,ul li:nth-child(n+21){display:none}.no-border{border:none}
1
+ ilw-header-megamenu[compact]{--ilw-header-megamenu--background: #e8e9eb;--ilw-header-megamenu--flex-direction: column;--ilw-header-megamenu--items--position: relative;--ilw-header-megamenu--items--border: none;--ilw-header-megamenu--items--box-shadow: none;--ilw-header-megamenu--items--width: 100%;--ilw-header-megamenu--font: 600 18px / 28px var(--il-font-sans);--ilw-header-megamenu--grid-template-columns: auto 52px;--ilw-header-megamenu--link-border-left-highlight: 4px solid transparent;--ilw-header-megamenu--link-border-left-highlight--hover: 4px solid var(--il-orange);--ilw-header-megamenu--link-border-left-highlight--focus: 4px solid var(--il-blue);--ilw-header-megamenu--link-color--focus: var(--il-blue);--ilw-header-megamenu--link-border-bottom-highlight: none;--ilw-header-megamenu--link-border-bottom-highlight--hover: none;--ilw-header-megamenu--link-border-bottom-highlight--focus: none;--ilw-header-megamenu--items--position: initial;--ilw-header-megamenu-section--grid-template-columns--header: auto 22px;--ilw-header-megamenu--grid-template-columns: auto 51px}ilw-header-megamenu{all:initial;display:block;background:var(--ilw-header-megamenu--background)}ilw-header-megamenu>ul{all:initial;display:flex;flex-direction:var(--ilw-header-megamenu--flex-direction)}ilw-header-megamenu>ul>li{all:initial;display:block;background:var(--ilw-header-megamenu--background)}ilw-header-megamenu>ul>li>a{all:initial;box-sizing:border-box;height:100%;display:flex;align-items:center;position:relative;padding:6px 20px;font:var(--ilw-header-megamenu--font);background:var(--ilw-header-megamenu--link-background);color:var(--ilw-header-megamenu--link-color);outline:0;cursor:pointer;border-width:0 0 3px 0;border-style:solid;border-color:transparent;border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight);border-left:var(--ilw-header-megamenu--link-border-left-highlight)}ilw-header-megamenu>ul>li>a[aria-current=true],ilw-header-megamenu>ul>li>a[aria-current=page]{border-color:var(--il-blue)}ilw-header-megamenu>ul>li>a:hover{background:var(--ilw-header-megamenu--link-background--hover);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--hover);border-left:var(--ilw-header-megamenu--link-border-left-highlight--hover);color:var(--ilw-header-megamenu--link-color--hover);text-decoration:underline}ilw-header-megamenu>ul>li>a:focus{background:var(--ilw-header-megamenu--link-background--focus);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--focus);border-left:var(--ilw-header-megamenu--link-border-left-highlight--focus);color:var(--ilw-header-megamenu--link-color--focus)}ilw-header-megamenu[compact]>ul>li>a{border-bottom:1px solid var(--il-storm-lighter-3)}ilw-header-megamenu-section img{display:none}ilw-header-megamenu-section span[slot=action-right],ilw-header-megamenu-section span[slot=action-left]{position:relative}ilw-header-megamenu-section span[slot=action-right] img,ilw-header-megamenu-section span[slot=action-left] img{display:inline;margin:36px;object-fit:cover;border-radius:30px;width:calc(100% - 72px);height:auto}ilw-header-megamenu-section span[slot=action-right]:has(p+button) img,ilw-header-megamenu-section span[slot=action-left]:has(p+button) img{display:block;position:absolute;top:0;left:0;margin:36px;height:calc(100% - 72px);width:calc(100% - 72px);object-fit:cover}ilw-header-megamenu-section span[slot=action-right] p:first-of-type,ilw-header-megamenu-section span[slot=action-left] p:first-of-type{display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;font-size:21px;font-weight:700;color:var(--il-blue);font-family:Source Sans,sans-serif;margin-top:-30px;width:50%;z-index:1}ilw-header-megamenu-section span[slot=action-right] button:first-of-type,ilw-header-megamenu-section span[slot=action-left] button:first-of-type{display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1;margin-top:30px}ilw-header-megamenu-section ul{list-style:none;margin:30px 0;padding-left:0;border-right:solid 2px var(--il-storm-85, #d5d3d3)}ilw-header-megamenu-section ul li{list-style:none;padding-left:30px}ilw-header-megamenu-section ul li span{display:inline-block;text-indent:var(--ilw-header-megamenu-section--anchor--text-indent)}ilw-header-megamenu-section ul li ul{display:inherit;margin:0;border:none}ilw-header-megamenu-section ul li ul a{font-weight:400}ilw-header-megamenu-section ul li ul:nth-of-type(4n){border-right:none!important}ilw-header-megamenu-section ul li a{--ilw-header-megamenu--link-border-left-highlight: 4px solid transparent;--ilw-header-megamenu--link-border-left-highlight--hover: 4px solid var(--il-orange);--ilw-header-megamenu--link-border-left-highlight--focus: 4px solid var(--il-blue);--ilw-header-megamenu--link-color--focus: var(--il-blue);--ilw-header-megamenu--link-border-bottom-highlight: 4px solid transparent;--ilw-header-megamenu--link-border-bottom-highlight--focus: initial;--ilw-header-megamenu--link-border-bottom-highlight--hover: 4px solid transparent;all:initial;box-sizing:border-box;text-indent:var(--ilw-header-megamenu-section--anchor--text-indent);display:block;position:relative;padding:var(--ilw-header-megamenu-section--anchor--padding);font:var(--ilw-header-megamenu--font);font-weight:700;background:transparent;color:var(--ilw-header-megamenu--link-color);outline:0;cursor:pointer;border-top:var(--ilw-header-megamenu-section--anchor--border);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight)}ilw-header-megamenu-section ul li a:hover{background:var(--ilw-header-megamenu--link-background--hover);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--hover);color:var(--ilw-header-megamenu--link-color--hover);text-decoration:underline}ilw-header-megamenu-section ul li a:focus{background:var(--ilw-header-megamenu--link-background--sub--focus);border-bottom:var(--ilw-header-megamenu--link-border-left-highlight--focus);color:var(--ilw-header-megamenu--link-color--focus)}ilw-header-megamenu-section li>img,ilw-header-megamenu-section ul li:nth-child(n+21){display:none}ilw-header-megamenu-section .no-border{border:none}ilw-header-megamenu-section ilw-header-megamenu-section{--ilw-header-megamenu--items--top: 0;--ilw-header-megamenu--items--left: 250px;--ilw-header-megamenu--link-border-left-highlight: 4px solid transparent;--ilw-header-megamenu--link-border-left-highlight--hover: 4px solid var(--il-orange);--ilw-header-megamenu--link-border-left-highlight--focus: 4px solid var(--il-blue);--ilw-header-megamenu--link-border-bottom-highlight: initial;--ilw-header-megamenu--link-border-bottom-highlight--hover: initial;--ilw-header-megamenu--link-border-bottom-highlight--focus: initial;--ilw-header-megamenu--grid-template-columns: auto 55px;--ilw-header-megamenu-section--transform: rotate(270deg);--ilw-header-megamenu-section--transform--selected: rotate(90deg)}ilw-header-megamenu[compact] ilw-header-megamenu-section{display:block;border-bottom:1px solid var(--il-storm-lighter-3)}ilw-header-megamenu[compact] ilw-header-megamenu-section a:focus{background:var(--ilw-header-megamenu--link-background--sub--focus);border-left:var(--ilw-header-megamenu--link-border-left-highlight--focus);color:var(--ilw-header-megamenu--link-color--focus)}ilw-header-megamenu[compact] ilw-header-megamenu-section span[slot=action-left],ilw-header-megamenu[compact] ilw-header-megamenu-section span[slot=action-right]{display:block;min-height:250px}ilw-header-megamenu[compact] ilw-header-megamenu-section div{display:block}ilw-header-megamenu[compact] ilw-header-megamenu-section ul{display:inherit;padding:0;margin:0}ilw-header-megamenu[compact] ilw-header-megamenu-section ul li{--ilw-header-megamenu-section--anchor--text-indent: 20px;border-top:1px solid var(--il-storm-lighter-3);background:var(--il-storm-lighter-4);padding-left:0}ilw-header-megamenu[compact] ilw-header-megamenu-section ul li a{border-left:var(--ilw-header-megamenu--link-border-left-highlight);border-bottom:none}ilw-header-megamenu[compact] ilw-header-megamenu-section ul li a:focus{background:var(--ilw-header-megamenu--link-background--sub--focus);border-left:var(--ilw-header-megamenu--link-border-left-highlight--focus);border-bottom:none;color:var(--ilw-header-megamenu--link-color--focus)}ilw-header-megamenu[compact] ilw-header-megamenu-section ul li ul li a{padding-left:45px}ilw-header-megamenu[compact] ilw-header-megamenu-section ilw-header-megamenu-section{border-bottom:none;--ilw-header-megamenu-section--transform: none;--ilw-header-megamenu-section--transform--selected: rotate(180deg);--ilw-header-megamenu--grid-template-columns: auto 51px}ilw-header-megamenu[compact] ilw-header-megamenu-section ilw-header-megamenu-section ul a,ilw-header-megamenu[compact] ilw-header-megamenu-section ilw-header-megamenu-section ul button{--ilw-header-megamenu-section--anchor--text-indent: 40px}
@@ -1,17 +1,17 @@
1
- import { LitElement as f, unsafeCSS as v, html as h } from "lit";
2
- import { property as s, customElement as k } from "lit/decorators.js";
3
- const x = "@layer base{:host{--ilw-header-megamenu--link-color: var(--il-blue);--ilw-header-megamenu--link-color--hover: var(--il-altgeld);--ilw-header-megamenu--link-background: transparent;--ilw-header-megamenu--link-background--hover: white;--ilw-header-megamenu--link-background--focus: var(--il-industrial-lighter-4);--ilw-header-megamenu--link-background--sub--focus: var(--il-industrial-lighter-4);--ilw-header-megamenu--link-border-bottom-highlight: 4px solid transparent;--ilw-header-megamenu--link-border-bottom-highlight--hover: 4px solid var(--il-orange);--ilw-header-megamenu--link-border-bottom-highlight--focus: 4px solid var(--il-blue);--ilw-header-megamenu--link-border-left-highlight: none;--ilw-header-megamenu--link-border-left-highlight--focus: none;--ilw-header-megamenu--background: #E8E9EB;--ilw-header-megamenu--flex-direction: row;--ilw-header-megamenu--items--position: absolute;--ilw-header-megamenu--items--border: 1px solid rgb(0, 0, 0, .01);--ilw-header-megamenu--items--box-shadow: 0 0 4px #00000040;--ilw-header-megamenu--items--width: 1270px;--ilw-header-megamenu--items--top: initial;--ilw-header-megamenu--items--left: calc(var(--ilw-margin--side) - 39px);--ilw-header-megamenu--font: 700 16px/22px var(--il-font-sans);--ilw-header-megamenu--grid-template-columns: auto auto;--ilw-header-megamenu-section--grid-template-columns--header: auto 24px;--ilw-header-megamenu-section--anchor--padding: 6px 20px;--ilw-header-megamenu-section--anchor--border: none;--ilw-header-megamenu-section--anchor--text-indent: 0;--ilw-header-megamenu-section--transform: none;--ilw-header-megamenu-section--transform--selected: rotate(180deg)}}div.parent.full{padding-top:6px;margin:0 calc(var(--ilw-margin--side) - 9px)}";
4
- var E = Object.defineProperty, y = Object.getOwnPropertyDescriptor, p = (e, t, n, o) => {
5
- for (var i = o > 1 ? void 0 : o ? y(t, n) : t, l = e.length - 1, r; l >= 0; l--)
6
- (r = e[l]) && (i = (o ? r(t, n, i) : r(i)) || i);
7
- return o && i && E(t, n, i), i;
1
+ import { LitElement as f, unsafeCSS as v, html as c } from "lit";
2
+ import { property as d, customElement as x } from "lit/decorators.js";
3
+ const k = "@layer base{:host{--ilw-header-megamenu--link-color: var(--il-blue);--ilw-header-megamenu--link-color--hover: var(--il-altgeld);--ilw-header-megamenu--link-background: transparent;--ilw-header-megamenu--link-background--hover: white;--ilw-header-megamenu--link-background--focus: var(--ilw-color--focus--background);--ilw-header-megamenu--link-background--sub--focus: var(--ilw-color--focus--background);--ilw-header-megamenu--link-color--focus: var(--il-blue);--ilw-header-megamenu--link-border-bottom-highlight: 4px solid transparent;--ilw-header-megamenu--link-border-bottom-highlight--hover: 4px solid var(--il-orange);--ilw-header-megamenu--link-border-bottom-highlight--focus: 4px solid var(--il-blue);--ilw-header-megamenu--link-border-left-highlight: none;--ilw-header-megamenu--link-border-left-highlight--focus: none;--ilw-header-megamenu--background: #E8E9EB;--ilw-header-megamenu--flex-direction: row;--ilw-header-megamenu--items--position: absolute;--ilw-header-megamenu--items--border: 1px solid rgb(0, 0, 0, .01);--ilw-header-megamenu--items--box-shadow: 0 0 4px #00000040;--ilw-header-megamenu--items--width: 1270px;--ilw-header-megamenu--items--top: initial;--ilw-header-megamenu--items--left: calc(var(--ilw-margin--side) - 39px);--ilw-header-megamenu--font: 700 16px/22px var(--il-font-sans);--ilw-header-megamenu--grid-template-columns: auto auto;--ilw-header-megamenu-section--grid-template-columns--header: auto 24px;--ilw-header-megamenu-section--anchor--padding: 6px 20px;--ilw-header-megamenu-section--anchor--border: none;--ilw-header-megamenu-section--anchor--text-indent: 0;--ilw-header-megamenu-section--transform: none;--ilw-header-megamenu-section--transform--selected: rotate(180deg)}}div.parent.full{padding-top:6px;margin:0 calc(var(--ilw-margin--side) - 9px)}";
4
+ var y = Object.defineProperty, E = Object.getOwnPropertyDescriptor, p = (e, i, o, n) => {
5
+ for (var t = n > 1 ? void 0 : n ? E(i, o) : i, l = e.length - 1, r; l >= 0; l--)
6
+ (r = e[l]) && (t = (n ? r(i, o, t) : r(t)) || t);
7
+ return n && t && y(i, o, t), t;
8
8
  };
9
9
  let m = class extends f {
10
10
  constructor() {
11
11
  super(), this.compact = !1, this.width = 990, this.addEventListener("keydown", this.handleWindowKeydown.bind(this)), this.handleWindowResize = this.handleWindowResize.bind(this), this.handleWindowClick = this.handleWindowClick.bind(this);
12
12
  }
13
13
  static get styles() {
14
- return v(x);
14
+ return v(k);
15
15
  }
16
16
  connectedCallback() {
17
17
  super.connectedCallback(), window.addEventListener("click", this.handleWindowClick.bind(this)), window.addEventListener("resize", this.handleWindowResize), this.handleWindowResize();
@@ -29,24 +29,32 @@ let m = class extends f {
29
29
  this.closeAllExceptOneSections(e.target);
30
30
  }
31
31
  gotoPreviousSection() {
32
- let e = null, t = document.activeElement;
33
- if (t != null) {
34
- if (t.closest("li") && t.closest("li").previousElementSibling) {
35
- const n = t.closest("li").previousElementSibling;
36
- n && n.children.length > 0 && (e = n.children[0]);
37
- }
38
- e && e.tagName === "ILW-HEADER-MEGAMENU-SECTION" ? e.setFocus(!0) : e.focus();
39
- }
32
+ const e = document.activeElement;
33
+ if (!e) return;
34
+ const i = e.closest(
35
+ "ilw-header-megamenu-section"
36
+ ) || e.closest("li a");
37
+ if (!i) return;
38
+ const n = i.parentElement?.previousElementSibling;
39
+ if (!n) return;
40
+ const t = n.querySelector(
41
+ "ilw-header-megamenu-section"
42
+ ) || n.querySelector("a");
43
+ t && ("setFocus" in t ? t.setFocus() : t.focus());
40
44
  }
41
45
  gotoNextSection() {
42
- let e = null, t = document.activeElement;
43
- if (t != null) {
44
- if (t.closest("li") && t.closest("li").nextElementSibling) {
45
- const n = t.closest("li").nextElementSibling;
46
- n && n.children.length > 0 && (e = n.children[0]);
47
- }
48
- e && e.tagName === "ILW-HEADER-MEGAMENU-SECTION" ? e.setFocus() : e.focus();
49
- }
46
+ const e = document.activeElement;
47
+ if (!e) return;
48
+ const i = e.closest(
49
+ "ilw-header-megamenu-section"
50
+ ) || e.closest("li a");
51
+ if (!i) return;
52
+ const n = i.parentElement?.nextElementSibling;
53
+ if (!n) return;
54
+ const t = n.querySelector(
55
+ "ilw-header-megamenu-section"
56
+ ) || n.querySelector("a");
57
+ t && ("setFocus" in t ? t.setFocus() : t.focus());
50
58
  }
51
59
  handleWindowResize() {
52
60
  (this.offsetWidth == 0 ? window.innerWidth : this.offsetWidth) < this.width ? this.compact || this.setCompactTrue() : this.compact && this.setCompactFalse();
@@ -65,88 +73,78 @@ let m = class extends f {
65
73
  return this.querySelectorAll("ilw-header-megamenu-section");
66
74
  }
67
75
  closeAllExceptOneSections(e) {
68
- this.getSections().forEach((t) => {
69
- (e == null || e != t) && (t.expanded = !1);
76
+ this.getSections().forEach((i) => {
77
+ (e == null || e != i) && (i.expanded = !1);
70
78
  });
71
79
  }
72
80
  render() {
73
- return h`
81
+ return c`
74
82
  <nav aria-label="Header Menu Navigation" @ilw-header-megamenu-section-expanded=${this.handleNavigationSectionToggleClick}>
75
- <div class="parent ${this.compact ? "compact" : "full"}"><slot></slot></div>
83
+ <div class="parent ${this.compact ? "compact" : "full"}">
84
+ <slot></slot>
85
+ </div>
76
86
  </nav>
77
87
  `;
78
88
  }
79
89
  };
80
90
  p([
81
- s({
91
+ d({
82
92
  type: Boolean,
83
93
  reflect: !0
84
94
  })
85
95
  ], m.prototype, "compact", 2);
86
96
  p([
87
- s({
97
+ d({
88
98
  type: Number
89
99
  })
90
100
  ], m.prototype, "width", 2);
91
101
  m = p([
92
- k("ilw-header-megamenu")
102
+ x("ilw-header-megamenu")
93
103
  ], m);
94
- const S = '#items{display:none}#items.expanded{all:initial;box-sizing:border-box;flex-direction:column;border:var(--ilw-header-megamenu--items--border);box-shadow:var(--ilw-header-megamenu--items--box-shadow);width:var(--ilw-header-megamenu--items--width);max-width:100vw + 39px;position:var(--ilw-header-megamenu--items--position);display:grid;left:var(--ilw-header-megamenu--items--left);top:var(--ilw-header-megamenu--items--top);z-index:100;background:#fff}.parent{height:100%}button,.link{all:initial;box-sizing:border-box;display:block;position:relative;padding:var(--ilw-header-megamenu-section--anchor--padding);font:var(--ilw-header-megamenu--font);background:var(--ilw-header-megamenu--link-background);color:var(--ilw-header-megamenu--link-color);fill:var(--ilw-header-megamenu--link-color);border-width:0 0 3px 0;border-style:solid;border-color:transparent;outline:0;cursor:pointer;height:100%;width:100%;border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight)}:is(button,.link) svg{padding:2px;transform:var(--ilw-header-megamenu-section--transform)}:is(button,.link).current{border-color:var(--il-blue)}:is(button,.link):hover{background:var(--ilw-header-megamenu--link-background--hover);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--hover);color:var(--ilw-header-megamenu--link-color--hover);fill:var(--ilw-header-megamenu--link-color--hover);text-decoration:underline}:is(button,.link):hover svg{outline:2px dotted var(--il-altgeld)}:is(button,.link):focus{background:var(--ilw-header-megamenu--link-background--focus);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--focus);border-left:var(--ilw-header-megamenu--link-border-left-highlight--focus)}button[aria-expanded=true]{text-decoration:underline;color:var(--ilw-header-megamenu--link-color--hover);background:var(--ilw-header-megamenu--link-background--hover)}button[aria-expanded=true]:focus{background:var(--ilw-header-megamenu--link-background--hover);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--hover)}button[aria-expanded=true] svg{fill:var(--ilw-header-megamenu--link-color--hover);transform:var(--ilw-header-megamenu-section--transform--selected);background:var(--ilw-header-megamenu--link-background--hover)}button[aria-expanded=true] svg:focus{background:var(--ilw-header-megamenu--link-background--hover)}.header{position:relative;display:grid;grid-template-columns:var(--ilw-header-megamenu-section--grid-template-columns--header);grid-template-areas:"label icon";grid-gap:4px}.header-link.current button{border-color:var(--il-blue)}.header-link{position:relative;display:grid;grid-template-columns:var(--ilw-header-megamenu--grid-template-columns);grid-template-areas:"label icon";align-items:center;height:100%}.header-link.highlighted{background:var(--ilw-header-megamenu--link-background--hover)}.header-link .link{padding:6px 0 6px 20px}.header-link button{padding:6px 20px 6px 8px}.label,.link{box-sizing:border-box;display:block;position:relative;grid-area:label}.icon,.header-link button{align-self:center;align-items:center;justify-content:center;grid-area:icon}.icon{display:flex}.arrow{display:block;height:14px;width:14px}.submenu.parent button:hover .label ::slotted(span[slot="label"]),.submenu.parent button:focus .label ::slotted(span[slot="label"]){text-decoration:underline}.menu.parent .header-link.highlighted button,.menu.parent .header-link.highlighted ::slotted(a[slot="link"]){border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--focus)!important}.submenu.parent button.arrow-only:hover,.submenu.parent button.arrow-only:focus{border-left:4px solid transparent!important}.menu.parent .compact button.arrow-only:hover,.menu.parent .compact button.arrow-only:focus{border-left:4px solid transparent!important}';
95
- var A = Object.defineProperty, C = Object.getOwnPropertyDescriptor, d = (e, t, n, o) => {
96
- for (var i = o > 1 ? void 0 : o ? C(t, n) : t, l = e.length - 1, r; l >= 0; l--)
97
- (r = e[l]) && (i = (o ? r(t, n, i) : r(i)) || i);
98
- return o && i && A(t, n, i), i;
104
+ const S = '#items{display:none}#items.expanded{all:initial;box-sizing:border-box;flex-direction:column;border:var(--ilw-header-megamenu--items--border);box-shadow:var(--ilw-header-megamenu--items--box-shadow);width:var(--ilw-header-megamenu--items--width);max-width:100vw + 39px;position:var(--ilw-header-megamenu--items--position);display:grid;left:var(--ilw-header-megamenu--items--left);top:var(--ilw-header-megamenu--items--top);z-index:100;background:#fff}.parent{height:100%}button,.link{all:initial;box-sizing:border-box;display:block;position:relative;padding:var(--ilw-header-megamenu-section--anchor--padding);font:var(--ilw-header-megamenu--font);background:var(--ilw-header-megamenu--link-background);color:var(--ilw-header-megamenu--link-color);fill:var(--ilw-header-megamenu--link-color);border-width:0 0 3px 0;border-style:solid;border-color:transparent;outline:0;cursor:pointer;height:100%;width:100%;border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight);border-left:var(--ilw-header-megamenu--link-border-left-highlight)}:is(button,.link) svg{padding:2px;transform:var(--ilw-header-megamenu-section--transform)}:is(button,.link).current{border-color:var(--il-blue)}:is(button,.link):hover{background:var(--ilw-header-megamenu--link-background--hover);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--hover);color:var(--ilw-header-megamenu--link-color--hover);fill:var(--ilw-header-megamenu--link-color--hover);text-decoration:underline}:is(button,.link):hover svg{outline:2px dotted var(--il-altgeld)}:is(button,.link):focus{background:var(--ilw-header-megamenu--link-background--focus);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--focus);border-left:var(--ilw-header-megamenu--link-border-left-highlight--focus);color:var(--ilw-header-megamenu--link-color--focus);fill:var(--ilw-header-megamenu--link-color--focus);outline:0}:is(button,.link):focus:hover svg{outline:2px dotted var(--il-blue)}button[aria-expanded=true]{text-decoration:underline;color:var(--ilw-header-megamenu--link-color--hover);background:var(--ilw-header-megamenu--link-background--hover)}button[aria-expanded=true]:focus{background:var(--ilw-header-megamenu--link-background--hover);border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--hover)}button[aria-expanded=true] svg{fill:var(--ilw-header-megamenu--link-color--hover);transform:var(--ilw-header-megamenu-section--transform--selected);background:var(--ilw-header-megamenu--link-background--hover)}button[aria-expanded=true] svg:focus{background:var(--ilw-header-megamenu--link-background--hover);color:var(--il-blue)}.header{position:relative;display:grid;grid-template-columns:var(--ilw-header-megamenu-section--grid-template-columns--header);grid-template-areas:"label icon";grid-gap:4px}.header-link.current button{border-color:var(--il-blue)}.header-link{position:relative;display:grid;grid-template-columns:var(--ilw-header-megamenu--grid-template-columns);grid-template-areas:"label icon";align-items:center;height:100%}.header-link.highlighted{background:var(--ilw-header-megamenu--link-background--hover)}.header-link .link{padding:6px 0 6px 20px}.header-link button{padding:6px 20px 6px 6px}.label,.link{box-sizing:border-box;display:block;position:relative;grid-area:label}.icon,.header-link button{align-self:center;align-items:center;justify-content:center;grid-area:icon}.icon{display:flex}.arrow{display:block;height:14px;width:14px}.submenu.parent button:hover .label ::slotted(span[slot="label"]),.submenu.parent button:focus .label ::slotted(span[slot="label"]){text-decoration:underline}.menu.parent .header-link.highlighted button,.menu.parent .header-link.highlighted ::slotted(a[slot="link"]){border-bottom:var(--ilw-header-megamenu--link-border-bottom-highlight--focus)!important}.submenu.parent button.arrow-only:hover,.submenu.parent button.arrow-only:focus{border-left:4px solid transparent!important;color:var(--il-blue)}.menu.parent .compact button.arrow-only:hover,.menu.parent .compact button.arrow-only:focus{border-left:4px solid var(--il-blue)!important;color:var(--il-blue)}:host(.solo-list) ::slotted(ul){display:grid;grid-template-columns:repeat(4,minmax(0,320px));grid-template-rows:repeat(5,34px);grid-auto-flow:column;max-width:100vw}div.list-wrapper{display:grid;grid-template-columns:repeat(4,minmax(0,320px));max-width:100vw;overflow:hidden}:host-context(ilw-header-megamenu[compact]) .list-wrapper{all:unset}::slotted(ul:last-of-type){border:none!important}::slotted([slot="action-right"]){grid-column:4}::slotted([slot="action-right"].span-2){grid-column:3 / span 2;justify-self:auto}::slotted([slot="action-right"].span-3){grid-column:2 / span 3;justify-self:auto}::slotted([slot="action-left"]){grid-column:1}::slotted([slot="action-left"].span-2){grid-column:1 / span 2}::slotted([slot="action-left"].span-3){grid-column:1 / span 3}.hidden{display:none}';
105
+ var A = Object.defineProperty, C = Object.getOwnPropertyDescriptor, u = (e, i, o, n) => {
106
+ for (var t = n > 1 ? void 0 : n ? C(i, o) : i, l = e.length - 1, r; l >= 0; l--)
107
+ (r = e[l]) && (t = (n ? r(i, o, t) : r(t)) || t);
108
+ return n && t && A(i, o, t), t;
99
109
  };
100
- let a = class extends f {
110
+ let s = class extends f {
101
111
  constructor() {
102
- super(), this.current = !1, this.compact = !1, this.right = !1, this.expanded = !1, this.mouseover = !1, this.linked = !1, this.addEventListener("keydown", this.handleWindowKeydown.bind(this));
112
+ super(...arguments), this.current = !1, this.compact = !1, this.expanded = !1, this.mouseover = !1;
103
113
  }
104
114
  static get styles() {
105
115
  return v(S);
106
116
  }
107
- connectedCallback() {
108
- super.connectedCallback();
109
- }
110
117
  handleToggleClick(e) {
111
118
  this.expanded = !this.expanded, this.dispatchEvent(new CustomEvent("ilw-header-megamenu-section-expanded", { detail: !this.expanded, bubbles: !0, composed: !0 }));
112
119
  }
113
120
  handleWindowKeydown(e) {
114
- e.key === "ArrowDown" ? (e.stopPropagation(), e.preventDefault(), this.moveToNextItem(), this.closeAllExceptOneSections(e.target)) : e.key === "ArrowRight" || e.key === "ArrowLeft" ? this.isOnAnchorInLinked() && e.key === "ArrowRight" ? (e.stopPropagation(), e.preventDefault(), this.expanded = !1, this.setFocus(!0)) : this.isOnButtonInLinked() && e.key === "ArrowLeft" ? (e.stopPropagation(), e.preventDefault(), this.expanded = !1, this.setFocus()) : this.isOnButtonInLinked() && e.key === "ArrowRight" ? this.expanded = !1 : this.isOnAnchorInLinked() && e.key === "ArrowLeft" ? this.expanded = !1 : (this.expanded = !1, this.setFocus()) : e.key === "ArrowUp" ? (e.stopPropagation(), e.preventDefault(), this.moveToPreviousItem(), this.closeAllExceptOneSections(e.target)) : e.key === "Escape" && this.expanded && (e.stopPropagation(), this.setFocus(), this.expanded = !1);
121
+ e.key === "ArrowDown" ? (e.stopPropagation(), e.preventDefault(), this.moveToNextItem(), this.closeAllExceptOneSections(e.target)) : e.key === "ArrowUp" ? (e.stopPropagation(), e.preventDefault(), this.moveToPreviousItem(), this.closeAllExceptOneSections(e.target)) : e.key === "Escape" && this.expanded && (e.stopPropagation(), this.setFocus(), this.expanded = !1);
115
122
  }
116
- isEmbedded() {
117
- return this.parentElement && this.parentElement.closest("ilw-header-megamenu-section") != null;
118
- }
119
- isOnAnchorInLinked() {
120
- return this.linked && document.activeElement && document.activeElement.tagName === "A";
121
- }
122
- isOnButtonInLinked() {
123
- return this.linked && document.activeElement && document.activeElement.tagName === "ILW-HEADER-MEGAMENU-SECTION";
124
- }
125
- setFocus(e = !1) {
126
- let t = null;
127
- this.linked && !e ? t = this.querySelector("a") : this.shadowRoot && (t = this.shadowRoot.querySelector("a"), t == null && (t = this.shadowRoot.querySelector("button"))), t?.focus();
123
+ setFocus() {
124
+ const e = this.shadowRoot?.querySelector("button, a");
125
+ e && e.focus();
128
126
  }
129
127
  moveToNextItem() {
130
- !this.expanded && !this.isEmbedded() && (this.expanded = !0);
128
+ this.expanded || (this.expanded = !0);
131
129
  const e = document.activeElement;
132
130
  if (!e) return;
133
- const t = e.closest("ILW-HEADER-MEGAMENU-SECTION");
134
- if (!t) return;
135
- const n = Array.from(t.querySelectorAll("a, button")), o = n.indexOf(e);
136
- let i = o + 1;
137
- o === -1 && (i = 0), i >= 0 && i < n.length && n[i].focus();
131
+ const i = e.closest("ILW-HEADER-MEGAMENU-SECTION");
132
+ if (!i) return;
133
+ const o = Array.from(i.querySelectorAll("a, button")), n = o.indexOf(e);
134
+ let t = n + 1;
135
+ n === -1 && (t = 0), t >= 0 && t < o.length && o[t].focus();
138
136
  }
139
137
  moveToPreviousItem() {
140
138
  const e = document.activeElement;
141
139
  if (!e) return;
142
- const t = e.closest("ILW-HEADER-MEGAMENU-SECTION");
143
- if (!t) return;
144
- const n = Array.from(t.querySelectorAll("a, button")), o = n.indexOf(e);
145
- let i = o - 1;
146
- o === -1 && (i = n.length - 1), i >= 0 && i < n.length && n[i].focus();
140
+ const i = e.closest("ILW-HEADER-MEGAMENU-SECTION");
141
+ if (!i) return;
142
+ const o = Array.from(i.querySelectorAll("a, button")), n = o.indexOf(e);
143
+ let t = n - 1;
144
+ n === -1 && (t = o.length - 1), t >= 0 && t < o.length && o[t].focus();
147
145
  }
148
146
  renderArrow() {
149
- return h`<svg class="arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40.4 23.82" aria-hidden="true">
147
+ return c`<svg class="arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40.4 23.82" aria-hidden="true">
150
148
  <path id="chevron" d="m39.34,1.06c-1.41-1.41-3.7-1.41-5.12,0l-14.02,14.02L6.18,1.06C4.76-.35,2.47-.35,1.06,1.06s-1.41,3.7,0,5.12l16.58,16.58c1.41,1.41,3.7,1.41,5.12,0L39.34,6.18c1.41-1.41,1.41-3.7,0-5.12Z"/>
151
149
  </svg>`;
152
150
  }
@@ -160,89 +158,79 @@ let a = class extends f {
160
158
  return this.querySelectorAll("ilw-header-megamenu-section");
161
159
  }
162
160
  closeAllExceptOneSections(e) {
163
- this.getSections().forEach((t) => {
164
- (e == null || e != t) && (t.expanded = !1);
161
+ this.getSections().forEach((i) => {
162
+ (e == null || e != i) && (i.expanded = !1);
165
163
  });
166
164
  }
165
+ hasSlotContent(e) {
166
+ const i = this.shadowRoot.querySelector(`slot[name="${e}"]`);
167
+ return i ? i.assignedNodes({ flatten: !0 }).length > 0 : !1;
168
+ }
167
169
  render() {
168
- const e = this.querySelector('span[slot="action"]');
169
- let t = null;
170
+ const e = this.querySelector('span[slot="action-left"], span[slot="action-right"]');
171
+ let i = null;
170
172
  if (e) {
171
173
  const r = e.querySelector("p")?.textContent?.trim() || "";
172
- let c = e.querySelector("a, button");
173
- r && (t = `action-${r.replace(/\s+/g, "-")}`, e.id = t), c && t && c.setAttribute("aria-labelledby", t);
174
+ let a = e.querySelector("a, button");
175
+ r && (i = `action-${r.replace(/\s+/g, "-")}`, e.id = i), a && i && a.setAttribute("aria-describedby", i);
174
176
  }
175
177
  document.querySelectorAll("ilw-header-megamenu-section").forEach((r) => {
176
- const c = r.querySelectorAll("ilw-header-megamenu-section > ul > li"), b = c.length;
178
+ const a = r.querySelectorAll("ilw-header-megamenu-section.solo-list > ul > li"), b = a.length;
177
179
  if (b === 5) {
178
- c.forEach((u, w) => {
179
- u.style.borderRight = "none";
180
+ a.forEach((h, w) => {
181
+ h.style.borderRight = "none";
180
182
  });
181
183
  return;
182
184
  }
183
185
  let g = Math.floor(b / 5) * 5;
184
- g = Math.min(g, 15), c.forEach((u, w) => {
185
- w + 1 <= g ? u.style.borderRight = "solid 2px var(--il-storm-85, #d5d3d3)" : u.style.borderRight = "none";
186
+ g = Math.min(g, 15), a.forEach((h, w) => {
187
+ w + 1 <= g ? h.style.borderRight = "solid 2px var(--il-storm-85, #d5d3d3)" : h.style.borderRight = "none";
186
188
  });
187
189
  });
188
- let o = this.parentElement != null && this.parentElement.closest("ilw-header-megamenu-section") != null;
190
+ let n = this.parentElement != null && this.parentElement.closest("ilw-header-megamenu-section") != null;
189
191
  this.current = this.current || this.getAttribute("aria-current") != null && (this.getAttribute("aria-current") === "page" || this.getAttribute("aria-current") === "true");
190
- var i = h`
191
- <div class="header-link ${this.mouseover ? "highlighted" : ""} ${this.compact ? "compact" : ""} ${this.current ? "current" : ""}" @mouseover="${this.toggleMouseOver.bind(this)}" @mouseout="${this.toggleMouseOver.bind(this)}">
192
- <slot name="link"></slot>
193
- <button class="arrow-only" @click=${this.handleToggleClick.bind(this)} aria-expanded=${this.expanded ? "true" : "false"} aria-label=${this.querySelector('a[slot="link"]')?.textContent + " submenu"} aria-controls="items">
194
- ${this.renderArrow()}
195
- </button>
192
+ const l = !this.classList.contains("solo-list");
193
+ return c`
194
+ <div class="${n ? "submenu" : "menu"} parent" @ilw-header-megamenu-section-expanded=${this.handleNavigationSectionToggleClick} @keydown=${this.handleWindowKeydown}>
195
+ <button class="${this.current ? "current" : ""}" @click=${this.handleToggleClick.bind(this)} aria-expanded=${this.expanded ? "true" : "false"} aria-controls="items">
196
+ <div class="header">
197
+ <div class="label"><slot name="label"></slot> </div>
198
+ <div class="icon">${this.renderArrow()}</div>
196
199
  </div>
197
- `, l = h`
198
- <button class="${this.current ? "current" : ""}" @click=${this.handleToggleClick.bind(this)} aria-expanded=${this.expanded ? "true" : "false"} aria-controls="items">
199
- <div class="header">
200
- <div class="label"><slot name="label"></slot> </div>
201
- <div class="icon">${this.renderArrow()}</div>
202
- </div>
203
- </button>
204
- `;
205
- return h`
206
- <div class="${o ? "submenu" : "menu"} parent" @ilw-header-megamenu-section-expanded=${this.handleNavigationSectionToggleClick}>
207
- ${this.linked ? i : l}
208
- <div id="items" class="${this.expanded ? "expanded" : ""} ${this.right ? "right" : ""}">
209
- <slot></slot>
200
+ </button>
201
+ <div id="items" class="${this.expanded ? "expanded" : ""}">
202
+ ${l ? c`
203
+ <div class="list-wrapper">
204
+ <slot name="action-left"></slot>
205
+ <slot id="list-slot"></slot>
206
+ <slot name="action-right"></slot>
207
+ </div>
208
+ ` : c`<slot id="list-slot"></slot>`}
210
209
  </div>
211
210
  </div>
212
211
  `;
213
212
  }
214
213
  };
215
- d([
216
- s({
217
- type: Boolean
218
- })
219
- ], a.prototype, "current", 2);
220
- d([
221
- s({
222
- type: Boolean
223
- })
224
- ], a.prototype, "compact", 2);
225
- d([
226
- s({
214
+ u([
215
+ d({
227
216
  type: Boolean
228
217
  })
229
- ], a.prototype, "right", 2);
230
- d([
231
- s({
218
+ ], s.prototype, "current", 2);
219
+ u([
220
+ d({
232
221
  type: Boolean
233
222
  })
234
- ], a.prototype, "expanded", 2);
235
- d([
236
- s({
223
+ ], s.prototype, "compact", 2);
224
+ u([
225
+ d({
237
226
  type: Boolean
238
227
  })
239
- ], a.prototype, "mouseover", 2);
240
- d([
241
- s({
242
- reflect: !0,
228
+ ], s.prototype, "expanded", 2);
229
+ u([
230
+ d({
243
231
  type: Boolean
244
232
  })
245
- ], a.prototype, "linked", 2);
246
- a = d([
247
- k("ilw-header-megamenu-section")
248
- ], a);
233
+ ], s.prototype, "mouseover", 2);
234
+ s = u([
235
+ x("ilw-header-megamenu-section")
236
+ ], s);
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
- {
2
- "name": "@illinois-toolkit/ilw-header-megamenu",
3
- "description": "Mega Menu for the top of the page.",
4
- "repository": "github:web-illinois/ilw-header-megamenu",
5
- "private": false,
6
- "license": "MIT",
7
- "version": "0.0.1",
8
- "type": "module",
9
- "files": [
10
- "src/**",
11
- "dist/**",
12
- "builder/**"
13
- ],
14
- "exports": {
15
- ".": {
16
- "import": "./dist/ilw-header-megamenu.js",
17
- "require": "./dist/ilw-header-megamenu.cjs",
18
- "default": "./dist/ilw-header-megamenu.js"
19
- },
20
- "./ilw-header-megamenu.css": {
21
- "import": "./dist/ilw-header-megamenu.css"
22
- }
23
- },
24
- "main": "./dist/ilw-header-megamenu.js",
25
- "module": "./dist/ilw-header-megamenu.js",
26
- "scripts": {
27
- "dev": "vite",
28
- "build": "tsc --noEmit && vite build --config vite.transpile.config.ts --emptyOutDir && vite build --config vite.build.config.ts --emptyOutDir",
29
- "preview": "vite preview",
30
- "prepack": "npm run build",
31
- "test:axe": "playwright test",
32
- "test:axe:github": "playwright test --config playwright.ci.config.ts",
33
- "test": "vitest run --browser.headless",
34
- "test:browser": "vitest watch --browser chromium"
35
- },
36
- "dependencies": {
37
- "lit": "3.1.3"
38
- },
39
- "devDependencies": {
40
- "@illinois-toolkit/ilw-core": "^1.0.5",
41
- "@playwright/test": "^1.57.0",
42
- "@vitest/browser": "^3.2.4",
43
- "playwright": "^1.57.0",
44
- "typescript": "^5.9.2",
45
- "vite": "^7.2.4",
46
- "vite-plugin-dts": "^4.5.4",
47
- "vitest-browser-lit": "^0.1.0"
48
- }
49
- }
1
+ {
2
+ "name": "@illinois-toolkit/ilw-header-megamenu",
3
+ "description": "Mega Menu for the top of the page.",
4
+ "repository": "github:web-illinois/ilw-header-megamenu",
5
+ "private": false,
6
+ "license": "MIT",
7
+ "version": "1.0.1",
8
+ "type": "module",
9
+ "files": [
10
+ "src/**",
11
+ "dist/**",
12
+ "builder/**"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "import": "./dist/ilw-header-megamenu.js",
17
+ "require": "./dist/ilw-header-megamenu.cjs",
18
+ "default": "./dist/ilw-header-megamenu.js"
19
+ },
20
+ "./ilw-header-megamenu.css": {
21
+ "import": "./dist/ilw-header-megamenu.css"
22
+ }
23
+ },
24
+ "main": "./dist/ilw-header-megamenu.js",
25
+ "module": "./dist/ilw-header-megamenu.js",
26
+ "scripts": {
27
+ "dev": "vite",
28
+ "build": "tsc --noEmit && vite build --config vite.transpile.config.ts --emptyOutDir && vite build --config vite.build.config.ts --emptyOutDir",
29
+ "preview": "vite preview",
30
+ "prepack": "npm run build",
31
+ "test:axe": "playwright test",
32
+ "test:axe:github": "playwright test --config playwright.ci.config.ts",
33
+ "test": "vitest run --browser.headless",
34
+ "test:browser": "vitest watch --browser chromium"
35
+ },
36
+ "dependencies": {
37
+ "lit": "3.1.3"
38
+ },
39
+ "devDependencies": {
40
+ "@illinois-toolkit/ilw-core": "^1.0.5",
41
+ "@playwright/test": "^1.57.0",
42
+ "@vitest/browser": "^3.2.4",
43
+ "playwright": "^1.57.0",
44
+ "typescript": "^5.9.2",
45
+ "vite": "^7.2.4",
46
+ "vite-plugin-dts": "^4.5.4",
47
+ "vitest-browser-lit": "^0.1.0"
48
+ }
49
+ }