Phase-field modeling of hydraulic fracture