Optical properties of excitonic complexes in monolayer transition-metal dichalcogenides