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', -)