chore: update templ and templui

This commit is contained in:
juancwu 2026-04-12 16:07:06 +00:00
commit 61eaa268ab
89 changed files with 25776 additions and 8231 deletions

20
assets/js/dropdown.js Normal file
View file

@ -0,0 +1,20 @@
(function () {
'use strict';
document.addEventListener('click', (e) => {
const item = e.target.closest('[data-tui-dropdown-item]');
if (!item ||
item.hasAttribute('data-tui-dropdown-submenu-trigger') ||
item.getAttribute('data-tui-dropdown-prevent-close') === 'true') return;
const popoverRoot = item.closest('[data-tui-popover-root]');
const popoverContent = popoverRoot?.querySelector(':scope > [data-tui-popover-content]');
if (!popoverContent?.matches(':popover-open')) return;
try {
popoverContent.hidePopover();
} catch {
// ignore
}
});
})();