Transverse mode competition in narrow-ridge diode lasers