The stamp is your deadline
Mauritius writes your permitted end date into your passport on arrival. Check the stamp before you leave the desk. Your onward travel needs to leave on or before that date, and the stamp is what immigration will check on departure.
Combining Mauritius with Réunion or Rodrigues
A short hop to Réunion counts as leaving Mauritius, so a flight there can serve as the onward leg. Réunion is French territory with its own entry rules, so check those too. Rodrigues is part of Mauritius, so a flight there doesn't count.
Passport
Valid for the length of your stay, with one blank page.