When I had my baby I was also a resident SM, with a season-long contract and not covered by the union. I worked in ballet, and had my own office and wasn't in rehearsal all the time.
For myself, I planned my little one for the off season. My last day of work was May 11, he was born on June 8 and I returned to work on August 20. As far as "maternity leave" - I was unemployed, but collecting disability, per California state law. Not sure how that would have worked with my company, if I had him during the season. Our dancers are permitted 1 year of unpaid leave with a guarantee to return to the company after that year. There is no language about staff maternity leave in our staff handbook.
I was able to bring him with me 2-3 days a week (we only work 5 days a week). Two days he was with a nanny at our home and sometimes my husband would stay home on Fridays. Family stayed with us during performances, and eventually around the 9 month mark, it got too hard to keep my son at the office. Thankfully it was near the end of the season and we worked something out (I can't remember what).
So, as far as what made me decide how long to take - it was when my contract started up. I was extremely dedicated to that company and just made it work. In hindsight, I probably should've taken more time. You are going to be the only person to decide what is best for you, and you probably aren't going to know until you've had the baby. Trust your instincts and your body - and enjoy the little one while you can. I can't believe mine is almost 4!