diff --git a/package.json b/package.json index 0433ff0..b8c03e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/tp-popup", - "version": "1.4.0", + "version": "1.5.0", "description": "", "main": "tp-popup.js", "scripts": { diff --git a/tp-popup-menu-content.js b/tp-popup-menu-content.js new file mode 100644 index 0000000..5774459 --- /dev/null +++ b/tp-popup-menu-content.js @@ -0,0 +1,42 @@ +/** +@license +Copyright (c) 2026 trading_peter +This program is available under Apache License Version 2.0 +*/ + +// tp-popup-menu-content — non-interactive content block for tp-popup-menu. +// Integrates plain content (hints, descriptions, small previews) into a +// popup menu with the same horizontal rhythm as tp-popup-menu-item, without +// item chrome (no hover, no pointer cursor). Styling hooks: +// --tp-popup-menu-content-color, --tp-popup-menu-content-font-size. + +import { LitElement, html, css } from 'lit'; + +class TpPopupMenuContent extends LitElement { + static get styles() { + return [ + css` + :host { + display: block; + } + + .wrap { + padding: 6px 12px; + color: var(--tp-popup-menu-content-color, #666); + font-size: var(--tp-popup-menu-content-font-size, 12px); + line-height: 1.45; + } + ` + ]; + } + + render() { + return html` +
+ +
+ `; + } +} + +window.customElements.define('tp-popup-menu-content', TpPopupMenuContent);