@pfm-platform/goals-ui-mui 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +876 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +143 -0
- package/dist/index.d.ts +143 -0
- package/dist/index.js +864 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/GoalCreateForm.tsx","../src/components/GoalDeleteButton.tsx","../src/components/GoalEditForm.tsx","../src/components/GoalList.tsx","../src/components/GoalSummary.tsx","../src/components/GoalProgressCard.tsx","../src/components/GoalMilestoneTracker.tsx"],"names":["useState","useCreateSavingsGoal","useCreatePayoffGoal","Paper","jsx","Typography","jsxs","Box","FormControl","InputLabel","Select","MenuItem","TextField","Alert","Button","CircularProgress","useDeleteSavingsGoal","useDeletePayoffGoal","Fragment","Tooltip","IconButton","DeleteIcon","Dialog","DialogTitle","DialogContent","DialogContentText","DialogActions","useUpdateSavingsGoal","useUpdatePayoffGoal","useGoalProgress","Card","CardContent","List","ListItem","Chip","LinearProgress","Grid","Avatar","TrendingUp","Flag","EmojiEvents","Timer","Stars","Stepper","Step","StepLabel","CheckCircle","RadioButtonUnchecked","StepContent"],"mappings":";;;;;;;;;;;;;;;AAyBO,SAAS,cAAA,CAAe;AAAA,EAC7B,MAAA;AAAA,EACA;AACF,CAAA,EAAwB;AACtB,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAIA,eAAmB,SAAS,CAAA;AAC5D,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAIA,eAAS,EAAE,CAAA;AACnC,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAIA,eAAS,EAAE,CAAA;AAC7C,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAIA,eAAS,EAAE,CAAA;AACjD,EAAA,MAAM,CAAC,k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A,EACF,CAAA;AAEJ","file":"index.cjs","sourcesContent":["import { useState } from 'react';\nimport {\n Box,\n Button,\n TextField,\n Alert,\n CircularProgress,\n Paper,\n Typography,\n FormControl,\n InputLabel,\n Select,\n MenuItem,\n type SelectChangeEvent,\n} from '@mui/material';\nimport { useCreateSavingsGoal, useCreatePayoffGoal } from '@pfm-platform/goals-data-access';\nimport type { GoalCreate } from '@pfm-platform/shared';\n\nexport interface GoalCreateFormProps {\n userId: string;\n onSuccess?: () => void;\n}\n\ntype GoalType = 'savings' | 'payoff';\n\nexport function GoalCreateForm({\n userId,\n onSuccess,\n}: GoalCreateFormProps) {\n const [goalType, setGoalType] = useState<GoalType>('savings');\n const [name, setName] = useState('');\n const [imageName, setImageName] = useState('');\n const [targetValue, setTargetValue] = useState('');\n const [targetCompletionOn, setTargetCompletionOn] = useState('');\n const [error, setError] = useState<string | null>(null);\n\n const createSavingsGoal = useCreateSavingsGoal({\n onSuccess: () => {\n resetForm();\n onSuccess?.();\n },\n onError: (err) => {\n setError(err instanceof Error ? err.message : 'Failed to create savings goal');\n },\n });\n\n const createPayoffGoal = useCreatePayoffGoal({\n onSuccess: () => {\n resetForm();\n onSuccess?.();\n },\n onError: (err) => {\n setError(err instanceof Error ? err.message : 'Failed to create payoff goal');\n },\n });\n\n const resetForm = () => {\n setName('');\n setImageName('');\n setTargetValue('');\n setTargetCompletionOn('');\n setError(null);\n };\n\n const handleGoalTypeChange = (event: SelectChangeEvent<GoalType>) => {\n setGoalType(event.target.value as GoalType);\n setError(null);\n };\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n\n /* v8 ignore next 15 - defensive validation, button disabled prevents reaching this */\n if (!name.trim()) {\n setError('Goal name is required');\n return;\n }\n\n if (!imageName.trim()) {\n setError('Image name is required');\n return;\n }\n\n const amount = parseFloat(targetValue);\n if (isNaN(amount) || amount <= 0) {\n setError('Target value must be a positive number');\n return;\n }\n\n // Format to exactly 2 decimal places for string validation\n const formattedAmount = amount.toFixed(2);\n\n const data: GoalCreate = {\n name: name.trim(),\n image_name: imageName.trim(),\n target_value: formattedAmount,\n target_completion_on: targetCompletionOn || undefined,\n };\n\n if (goalType === 'savings') {\n createSavingsGoal.mutate({ userId, data });\n } else {\n createPayoffGoal.mutate({ userId, data });\n }\n };\n\n const isPending = createSavingsGoal.isPending || createPayoffGoal.isPending;\n\n return (\n <Paper sx={{ p: 3 }}>\n <Typography variant=\"h6\" gutterBottom>\n Create Goal\n </Typography>\n <Box\n component=\"form\"\n onSubmit={handleSubmit}\n sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}\n >\n <FormControl fullWidth disabled={isPending}>\n <InputLabel id=\"goal-type-label\">Goal Type</InputLabel>\n <Select\n labelId=\"goal-type-label\"\n id=\"goal-type\"\n value={goalType}\n label=\"Goal Type\"\n onChange={handleGoalTypeChange}\n >\n <MenuItem value=\"savings\">Savings Goal (Save TO a target)</MenuItem>\n <MenuItem value=\"payoff\">Payoff Goal (Pay DOWN debt)</MenuItem>\n </Select>\n </FormControl>\n\n <TextField\n label=\"Goal Name\"\n value={name}\n onChange={(e) => {\n setName(e.target.value);\n setError(null);\n }}\n required\n fullWidth\n disabled={isPending}\n error={!!error && !name.trim()}\n helperText={\n goalType === 'savings'\n ? \"Enter a name for your savings goal (e.g., 'Emergency Fund', 'Vacation')\"\n : \"Enter a name for your payoff goal (e.g., 'Credit Card Debt', 'Student Loan')\"\n }\n inputProps={{\n maxLength: 255,\n }}\n />\n\n <TextField\n label=\"Image Name\"\n value={imageName}\n onChange={(e) => {\n setImageName(e.target.value);\n setError(null);\n }}\n required\n fullWidth\n disabled={isPending}\n error={!!error && !imageName.trim()}\n helperText={\n goalType === 'savings'\n ? \"Enter image name (e.g., 'piggy_bank', 'vacation', 'house')\"\n : \"Enter image name (e.g., 'credit_card', 'loan', 'debt')\"\n }\n />\n\n <TextField\n label={goalType === 'savings' ? 'Target Amount' : 'Debt Amount'}\n type=\"number\"\n value={targetValue}\n onChange={(e) => {\n setTargetValue(e.target.value);\n setError(null);\n }}\n required\n fullWidth\n disabled={isPending}\n error={!!error && (isNaN(parseFloat(targetValue)) || parseFloat(targetValue) <= 0)}\n helperText={\n goalType === 'savings'\n ? 'Enter the target amount to save (e.g., 5000.00)'\n : 'Enter the total debt amount to pay off (e.g., 3000.00)'\n }\n inputProps={{\n min: 0.01,\n step: 0.01,\n }}\n />\n\n <TextField\n label=\"Target Completion Date (optional)\"\n type=\"date\"\n value={targetCompletionOn}\n onChange={(e) => {\n setTargetCompletionOn(e.target.value);\n setError(null);\n }}\n fullWidth\n disabled={isPending}\n helperText=\"Enter the date you want to complete this goal by (YYYY-MM-DD)\"\n InputLabelProps={{\n shrink: true,\n }}\n />\n\n {error && (\n <Alert severity=\"error\" onClose={() => setError(null)}>\n {error}\n </Alert>\n )}\n\n <Box sx={{ display: 'flex', gap: 1 }}>\n <Button\n type=\"submit\"\n variant=\"contained\"\n disabled={isPending || !name.trim() || !imageName.trim() || !targetValue}\n startIcon={isPending ? <CircularProgress size={20} /> : null}\n >\n {isPending\n ? 'Creating...'\n : `Create ${goalType === 'savings' ? 'Savings' : 'Payoff'} Goal`}\n </Button>\n </Box>\n </Box>\n </Paper>\n );\n}\n","import { useState } from 'react';\nimport {\n IconButton,\n Dialog,\n DialogTitle,\n DialogContent,\n DialogContentText,\n DialogActions,\n Button,\n Tooltip,\n} from '@mui/material';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport { useDeleteSavingsGoal, useDeletePayoffGoal } from '@pfm-platform/goals-data-access';\n\nexport interface GoalDeleteButtonProps {\n userId: string;\n goalId: number;\n goalName: string;\n goalType: 'savings' | 'payoff';\n}\n\nexport function GoalDeleteButton({\n userId,\n goalId,\n goalName,\n goalType,\n}: GoalDeleteButtonProps) {\n const [open, setOpen] = useState(false);\n\n const deleteSavingsGoal = useDeleteSavingsGoal({\n onSuccess: () => {\n setOpen(false);\n },\n });\n\n const deletePayoffGoal = useDeletePayoffGoal({\n onSuccess: () => {\n setOpen(false);\n },\n });\n\n const handleDelete = () => {\n if (goalType === 'savings') {\n deleteSavingsGoal.mutate({ userId, goalId });\n } else {\n deletePayoffGoal.mutate({ userId, goalId });\n }\n };\n\n const isPending = deleteSavingsGoal.isPending || deletePayoffGoal.isPending;\n\n return (\n <>\n <Tooltip title=\"Delete goal\">\n <IconButton\n onClick={() => setOpen(true)}\n color=\"error\"\n size=\"small\"\n aria-label={`delete ${goalType} goal ${goalName}`}\n >\n <DeleteIcon />\n </IconButton>\n </Tooltip>\n\n <Dialog\n open={open}\n onClose={() => !isPending && setOpen(false)}\n aria-labelledby=\"delete-goal-dialog-title\"\n >\n <DialogTitle id=\"delete-goal-dialog-title\">\n Delete {goalType === 'savings' ? 'Savings' : 'Payoff'} Goal?\n </DialogTitle>\n <DialogContent>\n <DialogContentText>\n Are you sure you want to delete the {goalType} goal \"{goalName}\"? This action cannot be undone.\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n onClick={() => setOpen(false)}\n disabled={isPending}\n >\n Cancel\n </Button>\n <Button\n onClick={handleDelete}\n color=\"error\"\n variant=\"contained\"\n disabled={isPending}\n autoFocus\n >\n {isPending ? 'Deleting...' : 'Delete'}\n </Button>\n </DialogActions>\n </Dialog>\n </>\n );\n}\n","import { useState } from 'react';\nimport {\n Box,\n Button,\n TextField,\n Alert,\n CircularProgress,\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n} from '@mui/material';\nimport { useUpdateSavingsGoal, useUpdatePayoffGoal } from '@pfm-platform/goals-data-access';\nimport type { SavingsGoal, PayoffGoal, GoalUpdate } from '@pfm-platform/shared';\n\nexport interface GoalEditFormProps {\n userId: string;\n goal: SavingsGoal | PayoffGoal;\n goalType: 'savings' | 'payoff';\n open: boolean;\n onClose: () => void;\n}\n\nexport function GoalEditForm({\n userId,\n goal,\n goalType,\n open,\n onClose,\n}: GoalEditFormProps) {\n const [name, setName] = useState(goal.name);\n const [imageName, setImageName] = useState(goal.image_name);\n const [targetValue, setTargetValue] = useState(goal.target_value);\n const [targetCompletionOn, setTargetCompletionOn] = useState(\n goal.target_completion_on || ''\n );\n const [error, setError] = useState<string | null>(null);\n\n const updateSavingsGoal = useUpdateSavingsGoal({\n onSuccess: () => {\n setError(null);\n onClose();\n },\n onError: (err) => {\n setError(err instanceof Error ? err.message : 'Failed to update savings goal');\n },\n });\n\n const updatePayoffGoal = useUpdatePayoffGoal({\n onSuccess: () => {\n setError(null);\n onClose();\n },\n onError: (err) => {\n setError(err instanceof Error ? err.message : 'Failed to update payoff goal');\n },\n });\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n\n /* v8 ignore next 15 - defensive validation, button disabled prevents reaching this */\n if (!name.trim()) {\n setError('Goal name is required');\n return;\n }\n\n if (!imageName.trim()) {\n setError('Image name is required');\n return;\n }\n\n const amount = parseFloat(targetValue);\n if (isNaN(amount) || amount <= 0) {\n setError('Target value must be a positive number');\n return;\n }\n\n // Format to exactly 2 decimal places for string validation\n const formattedAmount = amount.toFixed(2);\n\n const data: GoalUpdate = {\n id: goal.id,\n name: name.trim(),\n image_name: imageName.trim(),\n target_value: formattedAmount,\n target_completion_on: targetCompletionOn || undefined,\n };\n\n if (goalType === 'savings') {\n updateSavingsGoal.mutate({ userId, goalId: goal.id, data });\n } else {\n updatePayoffGoal.mutate({ userId, goalId: goal.id, data });\n }\n };\n\n const isPending = updateSavingsGoal.isPending || updatePayoffGoal.isPending;\n\n const handleClose = () => {\n if (!isPending) {\n onClose();\n }\n };\n\n return (\n <Dialog\n open={open}\n onClose={handleClose}\n maxWidth=\"sm\"\n fullWidth\n aria-labelledby=\"edit-goal-dialog-title\"\n >\n <form onSubmit={handleSubmit}>\n <DialogTitle id=\"edit-goal-dialog-title\">\n Edit {goalType === 'savings' ? 'Savings' : 'Payoff'} Goal\n </DialogTitle>\n <DialogContent>\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, pt: 1 }}>\n <TextField\n label=\"Goal Name\"\n value={name}\n onChange={(e) => {\n setName(e.target.value);\n setError(null);\n }}\n required\n fullWidth\n disabled={isPending}\n error={!!error && !name.trim()}\n helperText=\"Enter a name for your goal\"\n inputProps={{\n maxLength: 255,\n }}\n />\n\n <TextField\n label=\"Image Name\"\n value={imageName}\n onChange={(e) => {\n setImageName(e.target.value);\n setError(null);\n }}\n required\n fullWidth\n disabled={isPending}\n error={!!error && !imageName.trim()}\n helperText=\"Enter image name\"\n />\n\n <TextField\n label={goalType === 'savings' ? 'Target Amount' : 'Debt Amount'}\n type=\"number\"\n value={targetValue}\n onChange={(e) => {\n setTargetValue(e.target.value);\n setError(null);\n }}\n required\n fullWidth\n disabled={isPending}\n error={!!error && (isNaN(parseFloat(targetValue)) || parseFloat(targetValue) <= 0)}\n helperText=\"Enter the target amount\"\n inputProps={{\n min: 0.01,\n step: 0.01,\n }}\n />\n\n <TextField\n label=\"Target Completion Date (optional)\"\n type=\"date\"\n value={targetCompletionOn}\n onChange={(e) => {\n setTargetCompletionOn(e.target.value);\n setError(null);\n }}\n fullWidth\n disabled={isPending}\n helperText=\"Enter the target completion date (YYYY-MM-DD)\"\n InputLabelProps={{\n shrink: true,\n }}\n />\n\n {error && (\n <Alert severity=\"error\" onClose={() => setError(null)}>\n {error}\n </Alert>\n )}\n </Box>\n </DialogContent>\n <DialogActions>\n <Button onClick={handleClose} disabled={isPending}>\n Cancel\n </Button>\n <Button\n type=\"submit\"\n variant=\"contained\"\n disabled={isPending || !name.trim() || !imageName.trim() || !targetValue}\n startIcon={isPending ? <CircularProgress size={20} /> : null}\n >\n {isPending ? 'Saving...' : 'Save Changes'}\n </Button>\n </DialogActions>\n </form>\n </Dialog>\n );\n}\n","import { Box, Card, CardContent, List, ListItem, Typography, LinearProgress, Chip } from '@mui/material';\nimport { useGoalProgress } from '@pfm-platform/goals-feature';\n\nexport interface GoalListProps {\n userId: string;\n /** Filter by goal type (savings/payoff) */\n type?: 'savings' | 'payoff';\n /** Custom title for the list */\n title?: string;\n /** Currency symbol to display */\n currencySymbol?: string;\n /** Maximum number of goals to display */\n maxItems?: number;\n}\n\n/**\n * GoalList component displays goals with progress bars.\n * Shows goal name, type, amounts, and visual progress indicator.\n */\nexport function GoalList({\n userId,\n type,\n title = 'Goals',\n currencySymbol = '$',\n maxItems,\n}: GoalListProps) {\n const goals = useGoalProgress({ userId, type });\n\n if (!goals) {\n return (\n <Card>\n <CardContent>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\">\n Loading goals...\n </Typography>\n </CardContent>\n </Card>\n );\n }\n\n const displayGoals = maxItems ? goals.slice(0, maxItems) : goals;\n\n return (\n <Card>\n <CardContent>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n {displayGoals.length === 0 ? (\n <Typography variant=\"body2\" color=\"text.secondary\">\n No goals found\n </Typography>\n ) : (\n <List disablePadding>\n {displayGoals.map((goal, index) => (\n <ListItem\n key={goal.id}\n divider={index < displayGoals.length - 1}\n sx={{ px: 0, display: 'flex', flexDirection: 'column', alignItems: 'flex-start' }}\n >\n <Box sx={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between', mb: 0.5 }}>\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\n <Typography variant=\"body2\" fontWeight=\"medium\">\n {goal.name}\n </Typography>\n <Chip\n label={goal.type}\n size=\"small\"\n color={goal.type === 'savings' ? 'success' : 'warning'}\n variant=\"outlined\"\n />\n </Box>\n <Typography variant=\"body2\" fontWeight=\"medium\">\n {currencySymbol}{goal.currentValue.toFixed(2)} / {currencySymbol}{goal.targetValue.toFixed(2)}\n </Typography>\n </Box>\n <Box sx={{ width: '100%' }}>\n <LinearProgress\n variant=\"determinate\"\n value={Math.min(goal.percentComplete, 100)}\n color={goal.percentComplete >= 100 ? 'success' : 'primary'}\n sx={{ height: 8, borderRadius: 1 }}\n />\n <Typography variant=\"caption\" color=\"text.secondary\">\n {goal.percentComplete.toFixed(1)}% • {currencySymbol}{goal.remaining.toFixed(2)} remaining • {currencySymbol}{goal.monthlyContribution.toFixed(2)}/month\n </Typography>\n </Box>\n </ListItem>\n ))}\n </List>\n )}\n </CardContent>\n </Card>\n );\n}\n","import { Box, Card, CardContent, Grid, Typography, LinearProgress } from '@mui/material';\nimport { useGoalProgress } from '@pfm-platform/goals-feature';\n\nexport interface GoalSummaryProps {\n userId: string;\n /** Filter by goal type (savings/payoff) */\n type?: 'savings' | 'payoff';\n /** Custom title for the summary */\n title?: string;\n /** Currency symbol to display */\n currencySymbol?: string;\n}\n\n/**\n * GoalSummary component displays aggregate goal statistics.\n * Shows total goals, current value, target value, and overall progress.\n */\nexport function GoalSummary({\n userId,\n type,\n title = 'Goal Summary',\n currencySymbol = '$',\n}: GoalSummaryProps) {\n const goals = useGoalProgress({ userId, type });\n\n if (!goals) {\n return (\n <Card>\n <CardContent>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\">\n Loading goal summary...\n </Typography>\n </CardContent>\n </Card>\n );\n }\n\n if (goals.length === 0) {\n return (\n <Card>\n <CardContent>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\">\n No goals found\n </Typography>\n </CardContent>\n </Card>\n );\n }\n\n // Calculate aggregate statistics\n const totalGoals = goals.length;\n const totalCurrent = goals.reduce((sum, goal) => sum + goal.currentValue, 0);\n const totalTarget = goals.reduce((sum, goal) => sum + goal.targetValue, 0);\n const totalRemaining = totalTarget - totalCurrent;\n const percentComplete = totalTarget > 0 ? (totalCurrent / totalTarget) * 100 : 0;\n const totalMonthlyContribution = goals.reduce((sum, goal) => sum + goal.monthlyContribution, 0);\n\n return (\n <Card>\n <CardContent>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n <Grid container spacing={2}>\n <Grid size={6}>\n <Box>\n <Typography variant=\"body2\" color=\"text.secondary\" gutterBottom>\n Total Goals\n </Typography>\n <Typography variant=\"h5\">{totalGoals}</Typography>\n </Box>\n </Grid>\n <Grid size={6}>\n <Box>\n <Typography variant=\"body2\" color=\"text.secondary\" gutterBottom>\n Target Amount\n </Typography>\n <Typography variant=\"h5\">\n {currencySymbol}{totalTarget.toFixed(2)}\n </Typography>\n </Box>\n </Grid>\n <Grid size={6}>\n <Box>\n <Typography variant=\"body2\" color=\"text.secondary\" gutterBottom>\n Current Amount\n </Typography>\n <Typography variant=\"h6\" color=\"primary.main\">\n {currencySymbol}{totalCurrent.toFixed(2)}\n </Typography>\n </Box>\n </Grid>\n <Grid size={6}>\n <Box>\n <Typography variant=\"body2\" color=\"text.secondary\" gutterBottom>\n Remaining\n </Typography>\n <Typography variant=\"h6\">\n {currencySymbol}{totalRemaining.toFixed(2)}\n </Typography>\n </Box>\n </Grid>\n <Grid size={12}>\n <Box>\n <Typography variant=\"body2\" color=\"text.secondary\" gutterBottom>\n Monthly Contribution\n </Typography>\n <Typography variant=\"h6\" color=\"success.main\">\n {currencySymbol}{totalMonthlyContribution.toFixed(2)}/month\n </Typography>\n </Box>\n </Grid>\n <Grid size={12}>\n <Box>\n <Box sx={{ display: 'flex', justifyContent: 'space-between', mb: 0.5 }}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n Overall Progress\n </Typography>\n <Typography variant=\"body2\" fontWeight=\"medium\">\n {percentComplete.toFixed(1)}%\n </Typography>\n </Box>\n <LinearProgress\n variant=\"determinate\"\n value={Math.min(percentComplete, 100)}\n color={percentComplete >= 100 ? 'success' : 'primary'}\n sx={{ height: 10, borderRadius: 1 }}\n />\n </Box>\n </Grid>\n </Grid>\n </CardContent>\n </Card>\n );\n}\n","import {\n Card,\n CardContent,\n Box,\n Typography,\n LinearProgress,\n Chip,\n Avatar,\n} from '@mui/material';\nimport {\n TrendingUp,\n EmojiEvents,\n Flag,\n Timer,\n} from '@mui/icons-material';\n\nexport interface GoalProgressCardProps {\n /** Goal name */\n name: string;\n /** Current value/progress */\n currentValue: string;\n /** Target value */\n targetValue: string;\n /** Initial value (for payoff goals) */\n initialValue?: string;\n /** Percent complete (0-100) */\n percentComplete: number;\n /** Goal type */\n goalType: 'savings' | 'payoff';\n /** Optional image URL */\n imageUrl?: string;\n /** Currency symbol */\n currencySymbol?: string;\n /** Whether goal is complete */\n complete?: boolean;\n /** Estimated months remaining */\n monthsRemaining?: number;\n /** Monthly contribution amount */\n monthlyContribution?: string;\n}\n\n/**\n * GoalProgressCard component displays individual goal progress.\n * Shows visual progress indicator with key metrics and status.\n *\n * @example\n * ```tsx\n * <GoalProgressCard\n * name=\"Emergency Fund\"\n * currentValue=\"5000.00\"\n * targetValue=\"10000.00\"\n * percentComplete={50}\n * goalType=\"savings\"\n * currencySymbol=\"$\"\n * />\n * ```\n */\nexport function GoalProgressCard({\n name,\n currentValue,\n targetValue,\n initialValue: _initialValue,\n percentComplete,\n goalType,\n imageUrl,\n currencySymbol = '$',\n complete = false,\n monthsRemaining,\n monthlyContribution,\n}: GoalProgressCardProps) {\n const current = parseFloat(currentValue);\n const target = parseFloat(targetValue);\n\n const remaining = goalType === 'savings' ? target - current : current;\n const progressColor = complete\n ? 'success'\n : percentComplete >= 75\n ? 'primary'\n : percentComplete >= 50\n ? 'info'\n : percentComplete >= 25\n ? 'warning'\n : 'error';\n\n const formatCurrency = (amount: number): string => {\n return `${currencySymbol}${amount.toFixed(2)}`;\n };\n\n return (\n <Card>\n <CardContent>\n {/* Header with Image and Name */}\n <Box display=\"flex\" alignItems=\"flex-start\" gap={2} mb={2}>\n {imageUrl && (\n <Avatar\n src={imageUrl}\n alt={name}\n sx={{ width: 56, height: 56 }}\n variant=\"rounded\"\n />\n )}\n <Box flex={1}>\n <Typography variant=\"h6\" gutterBottom>\n {name}\n </Typography>\n <Chip\n label={goalType === 'savings' ? 'Savings Goal' : 'Payoff Goal'}\n size=\"small\"\n color={goalType === 'savings' ? 'success' : 'warning'}\n icon={goalType === 'savings' ? <TrendingUp /> : <Flag />}\n />\n </Box>\n {complete && (\n <EmojiEvents color=\"success\" sx={{ fontSize: 40 }} />\n )}\n </Box>\n\n {/* Progress Bar */}\n <Box sx={{ mb: 2 }}>\n <Box display=\"flex\" justifyContent=\"space-between\" mb={1}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n Progress\n </Typography>\n <Typography variant=\"body2\" fontWeight=\"bold\" color={`${progressColor}.main`}>\n {percentComplete}%\n </Typography>\n </Box>\n <LinearProgress\n variant=\"determinate\"\n value={Math.min(percentComplete, 100)}\n color={progressColor}\n sx={{ height: 8, borderRadius: 4 }}\n />\n </Box>\n\n {/* Amounts */}\n <Box\n display=\"grid\"\n gridTemplateColumns=\"1fr 1fr\"\n gap={2}\n sx={{ mb: 2 }}\n >\n <Box>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {goalType === 'savings' ? 'Current' : 'Remaining'}\n </Typography>\n <Typography variant=\"h6\" color=\"text.primary\">\n {formatCurrency(goalType === 'savings' ? current : remaining)}\n </Typography>\n </Box>\n <Box>\n <Typography variant=\"caption\" color=\"text.secondary\">\n Target\n </Typography>\n <Typography variant=\"h6\" color=\"text.primary\">\n {formatCurrency(target)}\n </Typography>\n </Box>\n </Box>\n\n {/* Additional Info */}\n <Box display=\"flex\" flexDirection=\"column\" gap={1}>\n {monthlyContribution && parseFloat(monthlyContribution) > 0 && (\n <Box display=\"flex\" alignItems=\"center\" gap={1}>\n <TrendingUp fontSize=\"small\" color=\"action\" />\n <Typography variant=\"caption\" color=\"text.secondary\">\n {formatCurrency(parseFloat(monthlyContribution))}/month\n </Typography>\n </Box>\n )}\n\n {monthsRemaining !== undefined && monthsRemaining > 0 && !complete && (\n <Box display=\"flex\" alignItems=\"center\" gap={1}>\n <Timer fontSize=\"small\" color=\"action\" />\n <Typography variant=\"caption\" color=\"text.secondary\">\n ~{monthsRemaining} {monthsRemaining === 1 ? 'month' : 'months'} remaining\n </Typography>\n </Box>\n )}\n\n {complete && (\n <Chip\n label=\"Goal Achieved!\"\n color=\"success\"\n size=\"small\"\n icon={<EmojiEvents />}\n sx={{ mt: 1 }}\n />\n )}\n\n {!complete && remaining > 0 && (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {formatCurrency(remaining)} to go\n </Typography>\n )}\n </Box>\n </CardContent>\n </Card>\n );\n}\n","import {\n Card,\n CardContent,\n Box,\n Typography,\n Stepper,\n Step,\n StepLabel,\n StepContent,\n Chip,\n LinearProgress,\n} from '@mui/material';\nimport {\n CheckCircle,\n RadioButtonUnchecked,\n Stars,\n} from '@mui/icons-material';\n\nexport interface Milestone {\n /** Milestone name */\n name: string;\n /** Target percentage (0-100) */\n targetPercent: number;\n /** Whether milestone is achieved */\n achieved: boolean;\n /** Optional description */\n description?: string;\n /** Optional reward/benefit */\n reward?: string;\n}\n\nexport interface GoalMilestoneTrackerProps {\n /** Goal name */\n goalName: string;\n /** Current progress percentage */\n currentPercent: number;\n /** Milestones to track */\n milestones?: Milestone[];\n /** Show progress bar */\n showProgressBar?: boolean;\n}\n\n/**\n * GoalMilestoneTracker component displays goal progress with milestone markers.\n * Shows achievement badges and upcoming milestones.\n *\n * @example\n * ```tsx\n * <GoalMilestoneTracker\n * goalName=\"Emergency Fund\"\n * currentPercent={65}\n * milestones={[\n * { name: \"25% Milestone\", targetPercent: 25, achieved: true },\n * { name: \"50% Milestone\", targetPercent: 50, achieved: true },\n * { name: \"75% Milestone\", targetPercent: 75, achieved: false },\n * { name: \"Goal Complete\", targetPercent: 100, achieved: false },\n * ]}\n * />\n * ```\n */\nexport function GoalMilestoneTracker({\n goalName,\n currentPercent,\n milestones,\n showProgressBar = true,\n}: GoalMilestoneTrackerProps) {\n // Default milestones if none provided\n const defaultMilestones: Milestone[] = [\n {\n name: '25% Complete',\n targetPercent: 25,\n achieved: currentPercent >= 25,\n description: 'Great start!',\n },\n {\n name: '50% Complete',\n targetPercent: 50,\n achieved: currentPercent >= 50,\n description: 'Halfway there!',\n },\n {\n name: '75% Complete',\n targetPercent: 75,\n achieved: currentPercent >= 75,\n description: 'Almost done!',\n },\n {\n name: 'Goal Achieved',\n targetPercent: 100,\n achieved: currentPercent >= 100,\n description: 'Congratulations!',\n reward: '🎉',\n },\n ];\n\n const activeMilestones = milestones || defaultMilestones;\n const achievedCount = activeMilestones.filter((m) => m.achieved).length;\n const currentMilestoneIndex = activeMilestones.findIndex((m) => !m.achieved);\n const nextMilestone =\n currentMilestoneIndex >= 0 ? activeMilestones[currentMilestoneIndex] : null;\n\n return (\n <Card>\n <CardContent>\n {/* Header */}\n <Box display=\"flex\" alignItems=\"center\" justifyContent=\"space-between\" mb={2}>\n <Typography variant=\"h6\">Milestones</Typography>\n <Chip\n label={`${achievedCount}/${activeMilestones.length}`}\n color={achievedCount === activeMilestones.length ? 'success' : 'primary'}\n size=\"small\"\n />\n </Box>\n\n {/* Overall Progress */}\n {showProgressBar && (\n <Box sx={{ mb: 3 }}>\n <Box display=\"flex\" justifyContent=\"space-between\" mb={1}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {goalName}\n </Typography>\n <Typography variant=\"body2\" fontWeight=\"bold\">\n {currentPercent}%\n </Typography>\n </Box>\n <LinearProgress\n variant=\"determinate\"\n value={Math.min(currentPercent, 100)}\n color={currentPercent >= 100 ? 'success' : 'primary'}\n sx={{ height: 8, borderRadius: 4 }}\n />\n </Box>\n )}\n\n {/* Next Milestone Alert */}\n {nextMilestone && (\n <Box\n sx={{\n p: 2,\n mb: 2,\n bgcolor: 'primary.light',\n borderRadius: 1,\n display: 'flex',\n alignItems: 'center',\n gap: 1,\n }}\n >\n <Stars color=\"primary\" />\n <Box>\n <Typography variant=\"subtitle2\" color=\"primary.dark\">\n Next Milestone: {nextMilestone.name}\n </Typography>\n <Typography variant=\"caption\" color=\"primary.dark\">\n {nextMilestone.targetPercent - currentPercent}% to go\n </Typography>\n </Box>\n </Box>\n )}\n\n {/* Milestone Stepper */}\n <Stepper orientation=\"vertical\" activeStep={currentMilestoneIndex}>\n {activeMilestones.map((milestone) => (\n <Step key={milestone.name} completed={milestone.achieved}>\n <StepLabel\n optional={\n milestone.reward && milestone.achieved ? (\n <Typography variant=\"caption\">{milestone.reward}</Typography>\n ) : null\n }\n StepIconComponent={() =>\n milestone.achieved ? (\n <CheckCircle color=\"success\" />\n ) : (\n <RadioButtonUnchecked color=\"action\" />\n )\n }\n >\n <Box display=\"flex\" alignItems=\"center\" gap={1}>\n <Typography variant=\"body2\" fontWeight={milestone.achieved ? 'bold' : 'normal'}>\n {milestone.name}\n </Typography>\n <Typography variant=\"caption\" color=\"text.secondary\">\n ({milestone.targetPercent}%)\n </Typography>\n </Box>\n </StepLabel>\n <StepContent>\n {milestone.description && (\n <Typography variant=\"caption\" color=\"text.secondary\" paragraph>\n {milestone.description}\n </Typography>\n )}\n {milestone.achieved && (\n <Chip\n label=\"Achieved\"\n color=\"success\"\n size=\"small\"\n icon={<CheckCircle />}\n />\n )}\n </StepContent>\n </Step>\n ))}\n </Stepper>\n\n {/* Achievement Summary */}\n {achievedCount === activeMilestones.length && (\n <Box\n sx={{\n mt: 2,\n p: 2,\n bgcolor: 'success.light',\n borderRadius: 1,\n textAlign: 'center',\n }}\n >\n <Typography variant=\"h6\" color=\"success.dark\" gutterBottom>\n 🎉 All Milestones Achieved! 🎉\n </Typography>\n <Typography variant=\"body2\" color=\"success.dark\">\n Congratulations on reaching your goal!\n </Typography>\n </Box>\n )}\n </CardContent>\n </Card>\n );\n}\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { SavingsGoal, PayoffGoal } from '@pfm-platform/shared';
|
|
3
|
+
|
|
4
|
+
interface GoalCreateFormProps {
|
|
5
|
+
userId: string;
|
|
6
|
+
onSuccess?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare function GoalCreateForm({ userId, onSuccess, }: GoalCreateFormProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
interface GoalDeleteButtonProps {
|
|
11
|
+
userId: string;
|
|
12
|
+
goalId: number;
|
|
13
|
+
goalName: string;
|
|
14
|
+
goalType: 'savings' | 'payoff';
|
|
15
|
+
}
|
|
16
|
+
declare function GoalDeleteButton({ userId, goalId, goalName, goalType, }: GoalDeleteButtonProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
interface GoalEditFormProps {
|
|
19
|
+
userId: string;
|
|
20
|
+
goal: SavingsGoal | PayoffGoal;
|
|
21
|
+
goalType: 'savings' | 'payoff';
|
|
22
|
+
open: boolean;
|
|
23
|
+
onClose: () => void;
|
|
24
|
+
}
|
|
25
|
+
declare function GoalEditForm({ userId, goal, goalType, open, onClose, }: GoalEditFormProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
interface GoalListProps {
|
|
28
|
+
userId: string;
|
|
29
|
+
/** Filter by goal type (savings/payoff) */
|
|
30
|
+
type?: 'savings' | 'payoff';
|
|
31
|
+
/** Custom title for the list */
|
|
32
|
+
title?: string;
|
|
33
|
+
/** Currency symbol to display */
|
|
34
|
+
currencySymbol?: string;
|
|
35
|
+
/** Maximum number of goals to display */
|
|
36
|
+
maxItems?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* GoalList component displays goals with progress bars.
|
|
40
|
+
* Shows goal name, type, amounts, and visual progress indicator.
|
|
41
|
+
*/
|
|
42
|
+
declare function GoalList({ userId, type, title, currencySymbol, maxItems, }: GoalListProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
interface GoalSummaryProps {
|
|
45
|
+
userId: string;
|
|
46
|
+
/** Filter by goal type (savings/payoff) */
|
|
47
|
+
type?: 'savings' | 'payoff';
|
|
48
|
+
/** Custom title for the summary */
|
|
49
|
+
title?: string;
|
|
50
|
+
/** Currency symbol to display */
|
|
51
|
+
currencySymbol?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* GoalSummary component displays aggregate goal statistics.
|
|
55
|
+
* Shows total goals, current value, target value, and overall progress.
|
|
56
|
+
*/
|
|
57
|
+
declare function GoalSummary({ userId, type, title, currencySymbol, }: GoalSummaryProps): react_jsx_runtime.JSX.Element;
|
|
58
|
+
|
|
59
|
+
interface GoalProgressCardProps {
|
|
60
|
+
/** Goal name */
|
|
61
|
+
name: string;
|
|
62
|
+
/** Current value/progress */
|
|
63
|
+
currentValue: string;
|
|
64
|
+
/** Target value */
|
|
65
|
+
targetValue: string;
|
|
66
|
+
/** Initial value (for payoff goals) */
|
|
67
|
+
initialValue?: string;
|
|
68
|
+
/** Percent complete (0-100) */
|
|
69
|
+
percentComplete: number;
|
|
70
|
+
/** Goal type */
|
|
71
|
+
goalType: 'savings' | 'payoff';
|
|
72
|
+
/** Optional image URL */
|
|
73
|
+
imageUrl?: string;
|
|
74
|
+
/** Currency symbol */
|
|
75
|
+
currencySymbol?: string;
|
|
76
|
+
/** Whether goal is complete */
|
|
77
|
+
complete?: boolean;
|
|
78
|
+
/** Estimated months remaining */
|
|
79
|
+
monthsRemaining?: number;
|
|
80
|
+
/** Monthly contribution amount */
|
|
81
|
+
monthlyContribution?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* GoalProgressCard component displays individual goal progress.
|
|
85
|
+
* Shows visual progress indicator with key metrics and status.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```tsx
|
|
89
|
+
* <GoalProgressCard
|
|
90
|
+
* name="Emergency Fund"
|
|
91
|
+
* currentValue="5000.00"
|
|
92
|
+
* targetValue="10000.00"
|
|
93
|
+
* percentComplete={50}
|
|
94
|
+
* goalType="savings"
|
|
95
|
+
* currencySymbol="$"
|
|
96
|
+
* />
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
declare function GoalProgressCard({ name, currentValue, targetValue, initialValue: _initialValue, percentComplete, goalType, imageUrl, currencySymbol, complete, monthsRemaining, monthlyContribution, }: GoalProgressCardProps): react_jsx_runtime.JSX.Element;
|
|
100
|
+
|
|
101
|
+
interface Milestone {
|
|
102
|
+
/** Milestone name */
|
|
103
|
+
name: string;
|
|
104
|
+
/** Target percentage (0-100) */
|
|
105
|
+
targetPercent: number;
|
|
106
|
+
/** Whether milestone is achieved */
|
|
107
|
+
achieved: boolean;
|
|
108
|
+
/** Optional description */
|
|
109
|
+
description?: string;
|
|
110
|
+
/** Optional reward/benefit */
|
|
111
|
+
reward?: string;
|
|
112
|
+
}
|
|
113
|
+
interface GoalMilestoneTrackerProps {
|
|
114
|
+
/** Goal name */
|
|
115
|
+
goalName: string;
|
|
116
|
+
/** Current progress percentage */
|
|
117
|
+
currentPercent: number;
|
|
118
|
+
/** Milestones to track */
|
|
119
|
+
milestones?: Milestone[];
|
|
120
|
+
/** Show progress bar */
|
|
121
|
+
showProgressBar?: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* GoalMilestoneTracker component displays goal progress with milestone markers.
|
|
125
|
+
* Shows achievement badges and upcoming milestones.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* <GoalMilestoneTracker
|
|
130
|
+
* goalName="Emergency Fund"
|
|
131
|
+
* currentPercent={65}
|
|
132
|
+
* milestones={[
|
|
133
|
+
* { name: "25% Milestone", targetPercent: 25, achieved: true },
|
|
134
|
+
* { name: "50% Milestone", targetPercent: 50, achieved: true },
|
|
135
|
+
* { name: "75% Milestone", targetPercent: 75, achieved: false },
|
|
136
|
+
* { name: "Goal Complete", targetPercent: 100, achieved: false },
|
|
137
|
+
* ]}
|
|
138
|
+
* />
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
declare function GoalMilestoneTracker({ goalName, currentPercent, milestones, showProgressBar, }: GoalMilestoneTrackerProps): react_jsx_runtime.JSX.Element;
|
|
142
|
+
|
|
143
|
+
export { GoalCreateForm, type GoalCreateFormProps, GoalDeleteButton, type GoalDeleteButtonProps, GoalEditForm, type GoalEditFormProps, GoalList, type GoalListProps, GoalMilestoneTracker, type GoalMilestoneTrackerProps, GoalProgressCard, type GoalProgressCardProps, GoalSummary, type GoalSummaryProps, type Milestone };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { SavingsGoal, PayoffGoal } from '@pfm-platform/shared';
|
|
3
|
+
|
|
4
|
+
interface GoalCreateFormProps {
|
|
5
|
+
userId: string;
|
|
6
|
+
onSuccess?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare function GoalCreateForm({ userId, onSuccess, }: GoalCreateFormProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
interface GoalDeleteButtonProps {
|
|
11
|
+
userId: string;
|
|
12
|
+
goalId: number;
|
|
13
|
+
goalName: string;
|
|
14
|
+
goalType: 'savings' | 'payoff';
|
|
15
|
+
}
|
|
16
|
+
declare function GoalDeleteButton({ userId, goalId, goalName, goalType, }: GoalDeleteButtonProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
interface GoalEditFormProps {
|
|
19
|
+
userId: string;
|
|
20
|
+
goal: SavingsGoal | PayoffGoal;
|
|
21
|
+
goalType: 'savings' | 'payoff';
|
|
22
|
+
open: boolean;
|
|
23
|
+
onClose: () => void;
|
|
24
|
+
}
|
|
25
|
+
declare function GoalEditForm({ userId, goal, goalType, open, onClose, }: GoalEditFormProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
interface GoalListProps {
|
|
28
|
+
userId: string;
|
|
29
|
+
/** Filter by goal type (savings/payoff) */
|
|
30
|
+
type?: 'savings' | 'payoff';
|
|
31
|
+
/** Custom title for the list */
|
|
32
|
+
title?: string;
|
|
33
|
+
/** Currency symbol to display */
|
|
34
|
+
currencySymbol?: string;
|
|
35
|
+
/** Maximum number of goals to display */
|
|
36
|
+
maxItems?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* GoalList component displays goals with progress bars.
|
|
40
|
+
* Shows goal name, type, amounts, and visual progress indicator.
|
|
41
|
+
*/
|
|
42
|
+
declare function GoalList({ userId, type, title, currencySymbol, maxItems, }: GoalListProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
interface GoalSummaryProps {
|
|
45
|
+
userId: string;
|
|
46
|
+
/** Filter by goal type (savings/payoff) */
|
|
47
|
+
type?: 'savings' | 'payoff';
|
|
48
|
+
/** Custom title for the summary */
|
|
49
|
+
title?: string;
|
|
50
|
+
/** Currency symbol to display */
|
|
51
|
+
currencySymbol?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* GoalSummary component displays aggregate goal statistics.
|
|
55
|
+
* Shows total goals, current value, target value, and overall progress.
|
|
56
|
+
*/
|
|
57
|
+
declare function GoalSummary({ userId, type, title, currencySymbol, }: GoalSummaryProps): react_jsx_runtime.JSX.Element;
|
|
58
|
+
|
|
59
|
+
interface GoalProgressCardProps {
|
|
60
|
+
/** Goal name */
|
|
61
|
+
name: string;
|
|
62
|
+
/** Current value/progress */
|
|
63
|
+
currentValue: string;
|
|
64
|
+
/** Target value */
|
|
65
|
+
targetValue: string;
|
|
66
|
+
/** Initial value (for payoff goals) */
|
|
67
|
+
initialValue?: string;
|
|
68
|
+
/** Percent complete (0-100) */
|
|
69
|
+
percentComplete: number;
|
|
70
|
+
/** Goal type */
|
|
71
|
+
goalType: 'savings' | 'payoff';
|
|
72
|
+
/** Optional image URL */
|
|
73
|
+
imageUrl?: string;
|
|
74
|
+
/** Currency symbol */
|
|
75
|
+
currencySymbol?: string;
|
|
76
|
+
/** Whether goal is complete */
|
|
77
|
+
complete?: boolean;
|
|
78
|
+
/** Estimated months remaining */
|
|
79
|
+
monthsRemaining?: number;
|
|
80
|
+
/** Monthly contribution amount */
|
|
81
|
+
monthlyContribution?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* GoalProgressCard component displays individual goal progress.
|
|
85
|
+
* Shows visual progress indicator with key metrics and status.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```tsx
|
|
89
|
+
* <GoalProgressCard
|
|
90
|
+
* name="Emergency Fund"
|
|
91
|
+
* currentValue="5000.00"
|
|
92
|
+
* targetValue="10000.00"
|
|
93
|
+
* percentComplete={50}
|
|
94
|
+
* goalType="savings"
|
|
95
|
+
* currencySymbol="$"
|
|
96
|
+
* />
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
declare function GoalProgressCard({ name, currentValue, targetValue, initialValue: _initialValue, percentComplete, goalType, imageUrl, currencySymbol, complete, monthsRemaining, monthlyContribution, }: GoalProgressCardProps): react_jsx_runtime.JSX.Element;
|
|
100
|
+
|
|
101
|
+
interface Milestone {
|
|
102
|
+
/** Milestone name */
|
|
103
|
+
name: string;
|
|
104
|
+
/** Target percentage (0-100) */
|
|
105
|
+
targetPercent: number;
|
|
106
|
+
/** Whether milestone is achieved */
|
|
107
|
+
achieved: boolean;
|
|
108
|
+
/** Optional description */
|
|
109
|
+
description?: string;
|
|
110
|
+
/** Optional reward/benefit */
|
|
111
|
+
reward?: string;
|
|
112
|
+
}
|
|
113
|
+
interface GoalMilestoneTrackerProps {
|
|
114
|
+
/** Goal name */
|
|
115
|
+
goalName: string;
|
|
116
|
+
/** Current progress percentage */
|
|
117
|
+
currentPercent: number;
|
|
118
|
+
/** Milestones to track */
|
|
119
|
+
milestones?: Milestone[];
|
|
120
|
+
/** Show progress bar */
|
|
121
|
+
showProgressBar?: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* GoalMilestoneTracker component displays goal progress with milestone markers.
|
|
125
|
+
* Shows achievement badges and upcoming milestones.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* <GoalMilestoneTracker
|
|
130
|
+
* goalName="Emergency Fund"
|
|
131
|
+
* currentPercent={65}
|
|
132
|
+
* milestones={[
|
|
133
|
+
* { name: "25% Milestone", targetPercent: 25, achieved: true },
|
|
134
|
+
* { name: "50% Milestone", targetPercent: 50, achieved: true },
|
|
135
|
+
* { name: "75% Milestone", targetPercent: 75, achieved: false },
|
|
136
|
+
* { name: "Goal Complete", targetPercent: 100, achieved: false },
|
|
137
|
+
* ]}
|
|
138
|
+
* />
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
declare function GoalMilestoneTracker({ goalName, currentPercent, milestones, showProgressBar, }: GoalMilestoneTrackerProps): react_jsx_runtime.JSX.Element;
|
|
142
|
+
|
|
143
|
+
export { GoalCreateForm, type GoalCreateFormProps, GoalDeleteButton, type GoalDeleteButtonProps, GoalEditForm, type GoalEditFormProps, GoalList, type GoalListProps, GoalMilestoneTracker, type GoalMilestoneTrackerProps, GoalProgressCard, type GoalProgressCardProps, GoalSummary, type GoalSummaryProps, type Milestone };
|