- Paragraphe {{ n }} — contenu long pour forcer le scroll et montrer que le footer reste fixé en bas du viewport.
+ Paragraphe {{ n }} — contenu long pour forcer le scroll et montrer que seul le body défile, le footer restant fixé en bas.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b5b0e97..260de2c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -41,5 +41,6 @@ Liste des évolutions de la librairie Malio layer UI
* [#MUI-35] Refonte du composant drawer : slots `#header`/`#footer`, prop `side` (droite/gauche), `dismissable`, `closeOnEscape`, classes d'override, focus-trap, scroll-lock et fermeture au clavier. **Breaking** : la prop `title` est remplacée par le slot `#header`.
### Fixed
+* Drawer : le slot `#footer` est désormais rendu hors de la zone scrollable (épinglé en bas, comme la modal) ; seul le body défile et la scrollbar ne s'étend plus derrière le footer
* Hauteur des boutons de pagination du datatable alignée sur le select (40px)
* Distribution de `tailwind.config.ts` aux projets consommateurs avec paths `content` absolus
diff --git a/COMPONENTS.md b/COMPONENTS.md
index 6fe7b65..72182c8 100644
--- a/COMPONENTS.md
+++ b/COMPONENTS.md
@@ -813,14 +813,14 @@ Panneau latéral (drawer) qui s'ouvre depuis la droite ou la gauche avec backdro
| `overlayClass` | `string` | `''` | Classes CSS backdrop (twMerge) |
| `headerClass` | `string` | `''` | Classes CSS barre header (twMerge) |
| `bodyClass` | `string` | `''` | Classes CSS zone scrollable (twMerge) |
-| `footerClass` | `string` | `''` | Classes CSS wrapper du footer (aucune position imposée) |
+| `footerClass` | `string` | `''` | Classes CSS du footer fixe (twMerge) |
**Events :** `update:modelValue(value: boolean)`, `close()`
**Slots :**
-- `header` — en-tête (titre, etc.). S'il est absent et que `showClose` est `true`, seule la croix est affichée.
-- `default` — contenu (zone scrollable).
-- `footer` — rendu dans la zone scrollable, sans positionnement imposé : le consommateur choisit (`sticky bottom-0`, `fixed`, ou rien).
+- `header` — en-tête (titre, etc.), fixe en haut. S'il est absent et que `showClose` est `true`, seule la croix est affichée.
+- `default` — contenu (zone scrollable : seul le body défile).
+- `footer` — actions (boutons). Rendu en bas du panneau, fixe, hors de la zone scrollable. N'apparaît que si le slot est fourni.
```vue
@@ -836,14 +836,12 @@ Panneau latéral (drawer) qui s'ouvre depuis la droite ou la gauche avec backdro
Drawer large depuis la gauche
-
+
Formulaire
-
-
-
+
diff --git a/app/components/malio/drawer/Drawer.test.ts b/app/components/malio/drawer/Drawer.test.ts
index b58d91c..fb2c5b4 100644
--- a/app/components/malio/drawer/Drawer.test.ts
+++ b/app/components/malio/drawer/Drawer.test.ts
@@ -152,12 +152,13 @@ describe('MalioDrawer', () => {
expect(wrapper.find('[data-test="header"]').classes()).toContain('bg-m-primary')
})
- it('renders the #footer slot inside the body (scrollable zone)', () => {
+ it('renders the #footer slot in a footer pinned below the body', () => {
const wrapper = mountComponent(
{ modelValue: true },
{ footer: '' },
)
- expect(wrapper.find('[data-test="body"] [data-test="footer"] [data-test="save"]').exists()).toBe(true)
+ expect(wrapper.find('[data-test="body"] [data-test="footer"]').exists()).toBe(false)
+ expect(wrapper.find('[data-test="footer"] [data-test="save"]').exists()).toBe(true)
})
it('does not render the footer wrapper when no #footer slot', () => {
@@ -170,14 +171,12 @@ describe('MalioDrawer', () => {
expect(wrapper.find('[data-test="body"]').classes()).toContain('px-10')
})
- it('applies footerClass to the footer wrapper', () => {
+ it('applies footerClass to the footer', () => {
const wrapper = mountComponent(
- { modelValue: true, footerClass: 'sticky bottom-0' },
+ { modelValue: true, footerClass: 'justify-end' },
{ footer: 'pied' },
)
- const footer = wrapper.find('[data-test="footer"]')
- expect(footer.classes()).toContain('sticky')
- expect(footer.classes()).toContain('bottom-0')
+ expect(wrapper.find('[data-test="footer"]').classes()).toContain('justify-end')
})
it('aligns to the right by default', () => {
diff --git a/app/components/malio/drawer/Drawer.vue b/app/components/malio/drawer/Drawer.vue
index fab2d87..dbaebac 100644
--- a/app/components/malio/drawer/Drawer.vue
+++ b/app/components/malio/drawer/Drawer.vue
@@ -64,13 +64,13 @@
data-test="body"
>
-