Welcome to the site !!
You might want to contact Trail Tech , it sounds like something went to ground or a dead short , is this a unit with the little battery pack built into it behind the headlight ?? , if so , its possible that something shorted direct to ground in the wires going TO the CDI , that is the only thing i can think of that could do that , as usually when the bike is off so is the power load , so it has to be a direct short somewhere and it got real hot either while riding , or afterwards if a battery was involved , as that is the only way to pass power after the bike is off and the stator is not putting out , is thru a battery , either way the stator is toast , but hopefully Trail Tech will cover it , or at least maybe take the unit and test it , and hopefully replace it with a new unit... , unfortunately that means your bike is down till one of the above happens ...