BALANCE SHEET COMPONENTS - Other Long-term Assets (Details) - USD ($) $ in Thousands |
12 Months Ended |
Jun. 30, 2019 |
Jun. 30, 2018 |
| Other Long-term Assets [Abstract] |
|
|
| Intangible assets, net |
$ 3,257
|
$ 460
|
| Private equity investment |
5,000
|
0
|
| Hong Kong tax deposit |
19,960
|
0
|
| Deposit on long term asset |
42,000
|
0
|
| Other long-term assets |
3,724
|
3,331
|
| Other assets, noncurrent |
73,941
|
3,791
|
| Accumulated amortization, intangible assets |
1,600
|
1,300
|
| Income Tax Examination [Line Items] |
|
|
| Tax deposit |
19,960
|
0
|
| Purchase commitment |
|
|
| Income Tax Examination [Line Items] |
|
|
| Deposit on long term asset |
42,000
|
|
| Hong Kong Inland Revenue Department | Tax year 2010 - 2016 |
|
|
| Other Long-term Assets [Abstract] |
|
|
| Hong Kong tax deposit |
20,000
|
|
| Income Tax Examination [Line Items] |
|
|
| Tax deposit |
20,000
|
|
| Payment For tax deposit |
$ 13,400
|
6,600
|
| Hong Kong Inland Revenue Department | Tax year 2010 - 2016 | Prepaid expenses and other current assets |
|
|
| Other Long-term Assets [Abstract] |
|
|
| Hong Kong tax deposit |
|
6,600
|
| Income Tax Examination [Line Items] |
|
|
| Tax deposit |
|
$ 6,600
|