| Financial Statement Components  - Consolidated Statements of Operations (Details) - USD ($) $ in Thousands | 12 Months Ended | ||
|---|---|---|---|
| Jun. 30, 2019 | Jun. 30, 2018 | Jun. 30, 2017 | |
| Other expense (income), net: | |||
| Interest income | $ (40,367) | $ (36,869) | $ (23,270) | 
| Foreign exchange (gains) losses, net | (322) | 708 | 641 | 
| Net realized losses (gains) on sale of investments | 1,294 | 209 | (191) | 
| Other | 7,933 | 5,470 | 5,998 | 
| Other expense (income), net | $ (31,462) | $ (30,482) | $ (16,822) | 
| X | ||||||||||
| 
- Definition Other Expense (Income), Net No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount before tax of foreign currency transaction realized and unrealized gain (loss) recognized in the income statement. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount before accretion (amortization) of purchase discount (premium) of interest income on nonoperating securities. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount of income (expense) related to nonoperating activities, classified as other. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition The net realized gains or losses on investments during the period, not including gains or losses on securities separately or otherwise categorized as trading, available-for-sale, or held-to-maturity. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 |