diff --git a/CHANGELOG.md b/CHANGELOG.md index af76a51..5876ad3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,7 +58,7 @@ Liste des évolutions de la librairie Malio layer UI * [#MUI-45] MalioDate : prop `markedDates` (`Record<"YYYY-MM-DD", 'success' | 'danger'>`) appliquant un fond tokenisé par jour dans la grille (générique, fourni par le consommateur ; précédence sélection/`today` > variante marquée > défaut) + event `month-change` (`{ month: 0-11, year }`) émis à l'ouverture du popover et à chaque navigation de mois. Sert l'écran *Heures* de SIRH (jours validés en vert, chargement du mois visible à la volée). ### Changed -* Sidebar : les liens de navigation passent le **texte en `m-primary` au survol** (`hover:text-m-primary`, en plus du fond `hover:bg-m-surface` existant). +* Sidebar : états visuels des liens de navigation — **survol** : highlight pleine largeur entièrement porté par le `
  • ` (fond `m-primary` à 10 % + texte `m-primary` + semi-bold, `hover:bg-m-primary/10 hover:text-m-primary hover:font-semibold`, espacement `pt-1 pb-1`). La couleur de base (`text-black`) est aussi sur le `
  • ` et le `` ne fige plus sa couleur (il hérite) : sinon, sur les bandes `pt-1`/`pb-1` situées hors du ``, le fond devenait bleu mais le texte restait noir. **Lien actif** : texte `m-primary` + semi-bold, sans fond (`active-class="!text-m-primary font-semibold"` ; `!important` car `active-class` est hors `twMerge`). * DataTable : libellés de pagination en français — `Préc.` / `Suiv.` (étaient `Prev` / `Next`) ; aria-labels déjà en français inchangés. * MalioButton : dimensions par défaut `w-[180px]` / `h-[38px]` (étaient `w-[200px]` / `h-[40px]`). * DataTable : tailles par défaut revues — texte header `16px` (était `20px`), texte body `14px` (était `18px`), sélecteur de lignes et boutons de pagination (Prev / numéros / Next) alignés à `30px` de haut, padding de `12px` entre le bas du tableau et la barre de pagination, texte header et body passés en noir (`text-black`, étaient `text-m-primary`). diff --git a/app/components/malio/sidebar/Sidebar.test.ts b/app/components/malio/sidebar/Sidebar.test.ts index 006b055..5f5f2d7 100644 --- a/app/components/malio/sidebar/Sidebar.test.ts +++ b/app/components/malio/sidebar/Sidebar.test.ts @@ -89,10 +89,27 @@ describe('MalioSidebar', () => { expect(links[2].attributes('href')).toBe('/fournisseurs') }) - it('applique un hover primary sur le texte des liens', () => { + it('hover : fond + couleur + semi-bold tous portés par le
  • (texte non figé sur le )', () => { const wrapper = mountComponent({sections}) - const link = wrapper.find('a') - expect(link.classes()).toContain('hover:text-m-primary') + const li = wrapper.find('li') + expect(li.classes()).toContain('hover:bg-m-primary/10') + expect(li.classes()).toContain('hover:text-m-primary') + expect(li.classes()).toContain('hover:font-semibold') + expect(li.classes()).toContain('text-black') + expect(li.classes()).toContain('pt-1') + expect(li.classes()).toContain('pb-1') + // Le ne fige PAS sa couleur (sinon le texte resterait noir sur les bandes + // pt-1/pb-1 hors du alors que le fond du
  • est bleu). + expect(wrapper.find('a').classes()).not.toContain('text-black') + expect(wrapper.find('a').classes()).not.toContain('hover:text-m-primary') + }) + + it('actif : texte primary + semi-bold, sans fond, via active-class', () => { + const wrapper = mountComponent({sections}) + const activeClass = wrapper.find('a').attributes('active-class') ?? '' + expect(activeClass).toContain('text-m-primary') + expect(activeClass).toContain('font-semibold') + expect(activeClass).not.toContain('bg-') }) it('renders section icons via IconifyIcon', () => { diff --git a/app/components/malio/sidebar/Sidebar.vue b/app/components/malio/sidebar/Sidebar.vue index 383d5af..d6f8be7 100644 --- a/app/components/malio/sidebar/Sidebar.vue +++ b/app/components/malio/sidebar/Sidebar.vue @@ -49,12 +49,13 @@