diff --git a/web/modules/custom/figli_compta_ledger/css/home.css b/web/modules/custom/figli_compta_ledger/css/home.css index 49e48a9..699286c 100644 --- a/web/modules/custom/figli_compta_ledger/css/home.css +++ b/web/modules/custom/figli_compta_ledger/css/home.css @@ -58,13 +58,79 @@ html.gin--dark-mode #figli-home-app { border-radius: 4px; } -/* Compte/Type filters: can't collapse to a + single-line trigger and expand as an overlay -- it's either a + single-line dropdown, or an always-open multi-row list box. Custom + dropdown instead: a trigger showing the current selection, and a + checkbox list overlay shown on hover (pure CSS, no open/close state + needed) -- checkboxes rather than ctrl/shift+click, but same result + (several comptes/types at once) with an even more discoverable + interaction (no keyboard modifier to know about).*/ +#figli-home-app .figli-multiselect { + position: relative; +} +#figli-home-app .figli-multiselect-trigger { + font-size: 0.85rem; + padding: 0.2rem 0.4rem; + background: var(--figli-bg); + color: var(--figli-text); + border: 1px solid var(--figli-border); + border-radius: 4px; width: 9rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + cursor: default; +} +#figli-home-app .figli-multiselect-arrow { + float: right; + color: var(--figli-text-light); +} +#figli-home-app .figli-multiselect-panel { + display: none; + position: absolute; + top: 100%; + left: 0; + z-index: 20; + min-width: 100%; + white-space: nowrap; + background: var(--figli-bg); + color: var(--figli-text); + border: 1px solid var(--figli-border); + border-radius: 4px; + padding: 0.3rem 0.5rem; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); +} +#figli-home-app .figli-multiselect:hover .figli-multiselect-panel { + display: block; +} +#figli-home-app .figli-multiselect-option { + display: flex !important; + flex-direction: row !important; + align-items: center; + gap: 0.35rem; + font-size: 0.8rem; + font-weight: 400; + padding: 0.15rem 0; } #figli-home-app .figli-client-input { diff --git a/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig b/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig index d57dec0..5ecd9a3 100644 --- a/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig +++ b/web/modules/custom/figli_compta_ledger/templates/figli-compta-home.html.twig @@ -20,29 +20,51 @@ {% verbatim %}