feat : composant MalioDate (datepicker) avec calendrier, vue mois, bornes et effacement (#MUI-33)

Sous-composants internes (CalendarHeader, MonthGrid, MonthPicker), composant
public Date.vue, tests d'intégration, story Histoire et page playground.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 08:28:01 +02:00
parent d65884dc44
commit 9479c649be
7 changed files with 840 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<template>
<div
data-test="month-picker"
class="grid grid-cols-4 gap-2 p-3"
>
<button
v-for="(name, index) in monthsShort"
:key="name"
type="button"
data-test="month"
:data-month="index"
class="rounded py-3 text-sm transition-colors duration-100"
:class="index === selectedMonth
? 'bg-m-primary text-white'
: 'text-black hover:bg-m-primary/10'"
@click="emit('select', index)"
>
{{ name }}
</button>
</div>
</template>
<script setup lang="ts">
defineOptions({name: 'MalioDateMonthPicker'})
defineProps<{selectedMonth?: number}>()
const emit = defineEmits<{(e: 'select', month: number): void}>()
const monthsShort = ['Janv', 'Févr', 'Mars', 'Avr', 'Mai', 'Juin',
'Juil', 'Août', 'Sept', 'Oct', 'Nov', 'Déc']
</script>