UNPKG

@scania/tegel

Version:
21 lines (17 loc) 1.88 kB
import { r as registerInstance, h, H as Host } from './index-9xxNGlso.js'; const popoverMenuItemCss = () => `:host{box-sizing:border-box;display:block}:host *{box-sizing:border-box}:host .wrapper{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);color:var(--tds-popover-menu-color);position:relative;width:100%;display:flex;align-items:center;transition:background-color var(--tds-motion-duration-fast-02) var(--tds-motion-easing-easy)}:host .wrapper:hover{cursor:pointer;background-color:var(--tds-popover-menu-background-hover)}:host .wrapper.disabled{cursor:not-allowed;color:var(--tds-popover-menu-divider-disabled-color)}:host .wrapper.disabled:hover{background-color:inherit}:host .wrapper.disabled ::slotted(tds-icon){color:var(--tds-popover-menu-divider-disabled-icon-color)}:host .wrapper.disabled ::slotted(*){pointer-events:none}:host ::slotted(*:not(tds-icon)){all:unset;width:100%;display:inline-flex;display:flex;align-items:center;gap:10px;padding:10px 16px}:host ::slotted(*:focus-visible)::before{z-index:-1;content:"";display:block;position:absolute;width:calc(100% - 4px);height:100%;top:0;left:2px;outline:1px solid var(--tds-blue-400);outline-offset:1px}`; const TdsPopoverMenuItem = class { constructor(hostRef) { registerInstance(this, hostRef); /** Disables the Popover Menu Item */ this.disabled = false; } render() { return (h(Host, { key: '0b67b639198463251e4db6c86822be9d0bd648f9', role: "menuitem", "aria-disabled": this.disabled ? 'true' : 'false' }, h("div", { key: 'fd2145d0fbe009d302df767914031c135adbadb3', class: { wrapper: true, disabled: this.disabled, } }, h("slot", { key: '450e914fa54653021bde8f388fa2ffd68df3b3a6' })))); } }; TdsPopoverMenuItem.style = popoverMenuItemCss(); export { TdsPopoverMenuItem as tds_popover_menu_item };