/** * Source code string shown in the Storybook Docs tab for the LoginForm story. * * Demonstrates the minimal Form + Field + useZodForm integration pattern. */ declare const formContextWrapperSource = "\nimport {\n Form,\n FormGroup,\n Field,\n FieldLabel,\n FieldControl,\n useZodForm,\n SimpleInput,\n Button,\n Box,\n Text\n} from '@jtl-software/platform-ui-react';\nimport { z } from 'zod';\n\ninterface IFormContextWrapperProps {}\n\n/** Zod schema for the address form used in the useFormContext pattern story */\nconst addressFormSchema = z.object({\n street: z.string().min(1, 'Street is required'),\n city: z.string().min(1, 'City is required'),\n state: z.string().min(1, 'State is required'),\n zipCode: z.string().min(1, 'ZIP code is required'),\n});\n\nconst AddressFieldsWithContext = () => {\n const { watch } = useFormContext>();\n const currentCity = watch('city');\n\n return (\n \n {/* Live city display \u2014 updates as user types */}\n \n \n Current city: {currentCity || '\u2014'}\n \n \n\n \n \n Street\n \n \n \n \n \n City\n \n \n \n \n \n State\n \n \n \n \n \n ZIP Code\n \n \n \n \n \n \n );\n};\n\nconst FormContextWrapper: React.FC = () => {\n const form = useZodForm({\n schema: addressFormSchema,\n defaultValues: { street: '', city: '', state: '', zipCode: '' },\n });\n\n const onSubmit = React.useCallback((data: z.infer) => {\n console.log(data);\n alert('Address submitted!');\n }, []);\n\n return (\n
\n \n \n