Sahih Muslim 1490 a
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لاَ يَحِلُّ لاِمْرَأَةٍ تُؤْمِنُ بِاللَّهِ وَالْيَوْمِ الآخِرِ - أَوْ تُؤْمِنُ بِاللَّهِ وَرَسُولِهِ - أَنْ تُحِدَّ عَلَى مَيِّتٍ فَوْقَ ثَلاَثَةِ أَيَّامٍ إِلاَّ عَلَى زَوْجِهَا "
Safiyya bint Abu 'Ubaid reported on the authority of Hafsa or 'A'isha (Allah be pleased with thein) or from both of them that Allah's Messenger (ﷺ) said:
It is not permissible for a woman believing in Allah and the Hereafter (or believing in Allah and His Messenger) that she should observe mourning for the dead beyond three days except in case of her husband.
Full reference and source
Sahih Muslim 1490 a In-book : Book 18, Hadith 80 USC-MSA web (English) : Book 9, Hadith 3545 (deprecated)
View source on Sunnah.com (opens in a new tab)