/**
* Password Strength Indicator - FakeMUI Component
* Shows visual feedback for password strength with progress bar and message
*/
import React from 'react';
import { LinearProgress, Box, Typography } from '../fakemui';
import styles from '../../scss/components/feedback/password-strength.module.scss';
export interface PasswordStrengthIndicatorProps {
/** Password value to evaluate */
password: string;
/** Strength score (0-4) */
strength: number;
/** Strength message (e.g. "Weak", "Strong") */
message: string;
/** Hint text shown below indicator */
hint?: string;
/** Additional CSS class */
className?: string;
[key: string]: any;
}
/**
* PasswordStrengthIndicator
*
* Displays a color-coded progress bar and message indicating password strength.
*
* @example
* ```tsx
*
* ```
*/
export const PasswordStrengthIndicator: React.FC = ({
password,
strength,
message,
hint,
className,
...rest
}) => {
if (!password) return null;
// Map strength to color
const getColor = () => {
if (strength <= 1) return 'error';
if (strength <= 2) return 'warning';
return 'success';
};
return (
{message}
{hint && (
{hint}
)}
);
};