This commit is contained in:
2026-11-03 15:31:25 +02:00
parent 996b5b08cd
commit f3455432cf
27 changed files with 1240 additions and 67 deletions
+3 -1
View File
@@ -3,6 +3,7 @@ import type { ComponentProps, Ref } from 'react';
import { useState } from 'react';
import { Input } from '@/components/ui/input';
import { cn } from '@/lib/utils';
import { useTempoUi } from '@/components/tempo-brand';
export default function PasswordInput({
className,
@@ -10,6 +11,7 @@ export default function PasswordInput({
...props
}: Omit<ComponentProps<'input'>, 'type'> & { ref?: Ref<HTMLInputElement> }) {
const [showPassword, setShowPassword] = useState(false);
const { t } = useTempoUi();
return (
<div className="relative">
@@ -23,7 +25,7 @@ export default function PasswordInput({
type="button"
onClick={() => setShowPassword((prev) => !prev)}
className="text-muted-foreground hover:text-foreground focus-visible:ring-ring absolute inset-y-0 right-0 flex items-center rounded-r-md px-3 focus-visible:ring-[3px] focus-visible:outline-none"
aria-label={showPassword ? 'Ocultar palavra-passe' : 'Mostrar palavra-passe'}
aria-label={t(showPassword ? 'Ocultar palavra-passe' : 'Mostrar palavra-passe')}
tabIndex={-1}
>
{showPassword ? (