[#MUI-30] Création d'un composant email (#44)

| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
|                  |                 |

## Description de la PR

## Modification du .env

## Check list

- [ ] Pas de régression
- [ ] TU/TI/TF rédigée
- [ ] TU/TI/TF OK
- [ ] CHANGELOG modifié

Reviewed-on: #44
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #44.
This commit is contained in:
2026-05-11 08:54:31 +00:00
committed by Autin
parent eb21827686
commit 1ffe63827d
19 changed files with 1000 additions and 31 deletions

View File

@@ -139,4 +139,16 @@ describe('MalioCheckbox', () => {
expect(wrapper.get('p').text()).toBe('Valid')
expect(wrapper.get('p').classes()).toContain('text-m-success')
})
it('uses muted label color when unchecked', () => {
const wrapper = mountCheckbox({label: 'Accept terms', modelValue: false})
expect(wrapper.get('label').classes()).toContain('text-m-muted')
})
it('uses black label color when checked', () => {
const wrapper = mountCheckbox({label: 'Accept terms', modelValue: true})
expect(wrapper.get('label').classes()).toContain('text-black')
})
})

View File

@@ -108,7 +108,8 @@ const mergedInputClass = computed(() =>
const mergedLabelClass = computed(() =>
twMerge(
'cbx text-black text-lg',
'cbx text-lg',
isChecked.value ? 'text-black' : 'text-m-muted',
disabled.value ? 'cursor-not-allowed text-black/60' : '',
hasError.value ? 'text-m-error' : '',
hasSuccess.value ? 'text-m-success' : '',
@@ -161,10 +162,14 @@ const onChange = (event: Event) => {
height: 18px;
flex: 0 0 18px;
transform: scale(1);
border: 2px solid rgb(0, 0, 0);
border: 2px solid rgb(var(--m-muted) / 1);
transition: all 0.1s ease;
}
.inp-cbx:checked + .cbx span:first-child {
border-color: rgb(0, 0, 0);
}
.cbx span:first-child svg {
position: absolute;
top: 2px;