A charity ball has raised more than £30,000 for neonatal intensive care units (NICUs) and family support.