I found this but it is specific to public toilets:
Section 307
Privacy
307.1 Public toilet entry.
Entry to public toilets should be designed with offset entries, cubicles, vestibules or lobbies capable of allowing entry and exiting without making physical contact with surfaces such as walls, doors or people. Occupants
in waiting areas or halls should not be able to see through such entry area into the actual toilet. Toilet cubicles, urinals and mirrors should be sited away from the line of sight from the main entrance. Mirrors should be sighted away from sanitary fixtures (water closets, urinals, etc.) whenever possible.
In my opinion clear glass windows could be a good idea to prevent people opening a door into someone's face. Providing the window doesn't give visibility to the actual toilet area this would be perfectly acceptable.