feat(ui) : required cohérent + astérisque label + sanitisation email (MUI-41) #60

Merged
tristan merged 51 commits from feature/MUI-41-props-required-asterisque-dans-le-label-sur-les-co into develop 2026-06-04 06:42:20 +00:00
3 changed files with 40 additions and 0 deletions
Showing only changes of commit 2d8639a913 - Show all commits
@@ -84,6 +84,24 @@
:success="dynamicSuccess"
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Email obligatoire</h2>
<MalioInputEmail
v-model="requiredEmail"
label="Email obligatoire"
:required="true"
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Email normalisé (minuscules)</h2>
<MalioInputEmail
v-model="lowercaseEmail"
label="Email normalisé (minuscules)"
:lowercase="true"
/>
</div>
</div>
</template>
@@ -92,6 +110,8 @@ import { computed, ref } from 'vue'
const emailValue = ref('')
const dynamicEmail = ref('')
const requiredEmail = ref('')
const lowercaseEmail = ref('')
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
const isDynamicValid = computed(() => emailRegex.test(dynamicEmail.value))
@@ -108,6 +108,14 @@
icon-size="20"
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Champ obligatoire</h2>
<MalioInputText
label="Champ obligatoire"
:required="true"
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Avec masque</h2>
<MalioInputText
@@ -82,6 +82,17 @@
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Sélection obligatoire</h2>
<MalioSelect
v-model="requiredValue"
:options="options"
label="Sélection obligatoire"
:required="true"
empty-option-label="Aucune selection"
/>
</div>
<div class="rounded-lg border p-4">
<h2 class="mb-4 text-xl font-bold">Peu d'elements (2)</h2>
<MalioSelect
@@ -151,6 +162,7 @@ const longOptions = [
{label: 'Republique tcheque', value: 'cz'},
]
const requiredValue = ref<string | number | null>(null)
const basicValue = ref<string | number | null>(null)
const labelValue = ref<string | number | null>(null)
const selectedValue = ref<string | number | null>('fr')