It was one of several emergencies triggered by a storm that dropped more than a half-inch of rain in some parts of the Inland Empire.
San Bernardino County fire officials said the collapse at Parts Unlimited in the 11000 block of Mulberry Avenue occurred because about a foot of water had collected on the flat roof due to clogged drains.
The roof fell about 20 feet, sending so much debris and water into the 1,000-square-foot office that it pushed file cabinets into the parking lot.
"It was basically like a waterfall coming down into the office," said San Bernardino County Fire Department spokeswoman Tracey Martinez.
An employee had walked out of the office to the warehouse shortly before the collapse, escaping injury.
"She's pretty lucky. She was pretty shaken up," Martinez said.
No other employees were in the office at the time.
The impact triggered the building's fire alarm at 4:56 p.m. Firefighters shored up the structure to prevent further damage.
"We just tried to make it safer," Martinez said.
The storm brought rain, lightning, hail to the area and some snow to the local mountains.
Some areas, such as San Bernardino, Lake Arrowhead, Chino Hills and Wrightwood measured more than a quarter-inch of rain. Angelus Oaks reported receiving more than a half-inch.
Lightning struck a Rancho Cucamonga home on Thursday afternoon, igniting a small fire. No one was home.
The storm also caused flooding to a couple of homes in Fontana, as well as roads and freeways.
Despite the drastic change in weather, Martinez said residents should remain cautious about the upcoming Santa Ana wind season and the potential for fires.
"We don't want people to become complacent," she said. "We expect the weather to warm up again."
Contact Melissa via email or by phone at 909-386-3878. Get the latest crime and public safety news on Twitter @IECrime.