From c96cb5112dc9510b561c8ced2f0603bc90d0c6fa Mon Sep 17 00:00:00 2001 From: tristan Date: Wed, 20 May 2026 11:13:08 +0200 Subject: [PATCH] feat : ajustements visuels du datepicker selon maquette (#MUI-33) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - nouveau token couleur m-primary-light (#EFEFFD) - popover en largeur du champ, shadow au lieu de bordure, collé au champ - frames semaine (35x45) et jours alignés à 45px, cercle centré, font-medium - colonne semaine étroite + marge, numéros en black/60 (semaine courante en black) - vue mois en toutes lettres sur 3 colonnes, blocs 45px - label bleu et grossissement calibré du champ à l'ouverture - header sans hover, chevrons et titre plaqués en haut Co-Authored-By: Claude Opus 4.7 (1M context) --- .playground/pages/composant/date/date.vue | 81 +++++++++++-------- app/assets/css/malio.css | 1 + app/components/malio/date/Date.vue | 21 +++-- .../malio/date/internal/CalendarHeader.vue | 22 ++--- .../malio/date/internal/MonthGrid.vue | 38 +++++---- .../malio/date/internal/MonthPicker.vue | 22 ++--- tailwind.config.ts | 1 + 7 files changed, 107 insertions(+), 79 deletions(-) diff --git a/.playground/pages/composant/date/date.vue b/.playground/pages/composant/date/date.vue index 382d982..320a5b2 100644 --- a/.playground/pages/composant/date/date.vue +++ b/.playground/pages/composant/date/date.vue @@ -1,41 +1,55 @@ @@ -49,5 +63,6 @@ const todayIso = toIso(now) const maxIso = toIso(new Date(now.getTime() + 30 * 86400000)) const value = ref(null) +const erpValue = ref(null) const bounded = ref(null) diff --git a/app/assets/css/malio.css b/app/assets/css/malio.css index fbdb860..e9207a2 100644 --- a/app/assets/css/malio.css +++ b/app/assets/css/malio.css @@ -6,6 +6,7 @@ :root { /* ── Globales ── */ --m-primary: 34 39 131; /* #222783 - Bleu Malio */ + --m-primary-light: 239 239 253; /* #EFEFFD - Teinte claire du primary (fonds doux) */ --m-bg: 243 244 248; /* #F3F4F8 - Fond de page */ --m-surface: 243 244 248; /* #F3F4F8 - Fond hover/cartes */ --m-text: 15 23 42; /* #0F172A */ diff --git a/app/components/malio/date/Date.vue b/app/components/malio/date/Date.vue index ae80a9f..cb50a8a 100644 --- a/app/components/malio/date/Date.vue +++ b/app/components/malio/date/Date.vue @@ -49,9 +49,9 @@ @@ -60,8 +60,7 @@ v-if="isOpen" data-test="popover" role="dialog" - class="absolute left-0 top-[calc(100%-4px)] z-20 min-w-[320px] rounded-b-md border border-t-0 bg-white" - :class="popoverBorderClass" + class="absolute left-0 right-0 top-full z-20 box-border w-full rounded-b-md bg-white p-[10px] shadow-[0_4px_4px_0_rgba(0,0,0,0.25)]" > const mergedInputClass = computed(() => twMerge( - 'floating-input peer min-h-[40px] w-full cursor-pointer rounded-md border bg-white py-1 pl-3 pr-10 text-lg outline-none placeholder:text-transparent', + 'floating-input peer min-h-[40px] w-full cursor-pointer rounded-md border bg-white py-1 pl-3 pr-10 text-lg outline-none transition-[padding] duration-150 placeholder:text-transparent', isFilled.value ? 'border-black' : 'border-m-muted', props.disabled ? 'cursor-not-allowed text-black/60 border-m-muted' : '', hasError.value @@ -261,7 +260,7 @@ const mergedInputClass = computed(() => : hasSuccess.value ? 'border-m-success' : 'focus:border-m-primary', - isOpen.value ? '!rounded-b-none !border-b-0 border-m-primary' : '', + isOpen.value ? 'border-m-primary !py-[9px] !rounded-b-none' : '', props.inputClass, ), ) @@ -274,7 +273,9 @@ const mergedLabelClass = computed(() => ? 'text-m-danger' : hasSuccess.value ? 'text-m-success' - : 'peer-placeholder-shown:text-m-muted text-black', + : isOpen.value + ? 'text-m-primary' + : 'peer-placeholder-shown:text-m-muted text-black', props.labelClass, ), ) @@ -286,10 +287,6 @@ const iconStateClass = computed(() => { if (isFilled.value) return 'text-black' return 'text-m-muted' }) - -const popoverBorderClass = computed(() => - hasError.value ? 'border-m-danger' : hasSuccess.value ? 'border-m-success' : 'border-m-primary', -)