chore: update
ci-api / test (push) Successful in 22m17s
ci-web / test (push) Successful in 13m44s

This commit is contained in:
Xor290
2026-08-02 18:34:59 +02:00
parent 6992e505ae
commit c5ee5636ef
34 changed files with 2660 additions and 498 deletions
+26
View File
@@ -0,0 +1,26 @@
import { forwardRef, useState } from 'react'
import { IconButton, Input, InputGroup, InputRightElement, type InputProps } from '@chakra-ui/react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faEye, faEyeSlash } from '@fortawesome/free-solid-svg-icons'
// Input mot de passe avec bascule affichage clair/masqué (icône Font Awesome).
export const PasswordInput = forwardRef<HTMLInputElement, InputProps>((props, ref) => {
const [visible, setVisible] = useState(false)
return (
<InputGroup>
<Input ref={ref} type={visible ? 'text' : 'password'} {...props} />
<InputRightElement>
<IconButton
aria-label={visible ? 'Masquer le mot de passe' : 'Afficher le mot de passe'}
icon={<FontAwesomeIcon icon={visible ? faEyeSlash : faEye} />}
size="sm"
variant="ghost"
tabIndex={-1}
onClick={() => setVisible((v) => !v)}
/>
</InputRightElement>
</InputGroup>
)
})
PasswordInput.displayName = 'PasswordInput'