fix(ui): token w-m-btn-action partagé + fix alignement pagination DataTable (#59)
Release / release (push) Successful in 1m36s
Release / release (push) Successful in 1m36s
## Description Deux changements regroupés : ### 1. Nouveau token Tailwind partagé `w-m-btn-action` (150px) Exposé via `tailwind.config.ts` du layer + CSS var `--m-btn-action-width` dans `malio.css`. Utilisable côté projet consommateur pour les boutons d'action (`<MalioButton button-class="w-m-btn-action" />`), et themable en redéfinissant la CSS var dans son propre `:root`. Convention alignée sur les couleurs `m-btn-primary` / `m-btn-secondary` / `m-btn-danger` (préfixe `m-btn-`). ### 2. Fix alignement pagination DataTable Régression visuelle après l'introduction du `min-h-[1rem]` sur la zone message du MalioSelect (qui ajoute ~20px sous le field). La barre pagination du DataTable embarquait un MalioSelect pour le `perPage` à côté d'éléments centrés (span « Lignes : » + nav boutons Prev/Page/Next), faisant dériver l'alignement vertical. **Fix** : - La barre pagination passe en `items-center` - Le MalioSelect du sélecteur perPage est encapsulé dans un wrapper `h-12` qui borne sa taille flex à la hauteur du field — le slot vide déborde invisiblement en dessous - Tous les centres alignés exactement sur le field (y=24) ## Check list - [x] Pas de régression - [x] TU/TI/TF rédigée (34/34 tests DataTable OK) - [x] TU/TI/TF OK - [x] CHANGELOG modifié 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr> Co-authored-by: matthieu <matthieu@yuno.malio.fr> Reviewed-on: #59 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #59.
This commit is contained in:
@@ -57,25 +57,27 @@
|
||||
|
||||
<div
|
||||
v-if="totalItems > 0"
|
||||
class="flex justify-between pt-2"
|
||||
class="flex items-center justify-between pt-2"
|
||||
data-test="pagination"
|
||||
>
|
||||
<div class="flex gap-4">
|
||||
<span class="whitespace-nowrap text-[16px] text-black self-center">Lignes :</span>
|
||||
<MalioSelect
|
||||
:model-value="perPage"
|
||||
:options="perPageSelectOptions"
|
||||
min-width="w-20 !mt-0"
|
||||
rounded="rounded"
|
||||
text-field="text-sm"
|
||||
text-value="text-sm"
|
||||
text-label="text-xs"
|
||||
data-test="per-page-select"
|
||||
@update:model-value="onPerPageChange"
|
||||
/>
|
||||
<div class="flex items-center gap-4">
|
||||
<span class="whitespace-nowrap text-[16px] text-black">Lignes :</span>
|
||||
<div class="h-12">
|
||||
<MalioSelect
|
||||
:model-value="perPage"
|
||||
:options="perPageSelectOptions"
|
||||
group-class="w-20"
|
||||
rounded="rounded"
|
||||
text-field="text-sm"
|
||||
text-value="text-sm"
|
||||
text-label="text-xs"
|
||||
data-test="per-page-select"
|
||||
@update:model-value="onPerPageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav aria-label="Pagination" class="flex gap-1" data-test="pagination-nav">
|
||||
<nav aria-label="Pagination" class="flex items-center gap-1" data-test="pagination-nav">
|
||||
<MalioButton
|
||||
variant="tertiary"
|
||||
label="Prev"
|
||||
|
||||
Reference in New Issue
Block a user