Look at some of the threads about brake system issues under problems and troubleshooting. I have had what you describe happen to my 2015 at least four times. I still had brakes, but they engaged abruptly when the pedal was pressed far enough. I have LEAF Spy Pro so I was able to read and clear the DTCs (diagnostic trouble codes) each time it happened. The DTCs were all related to CAN bus communication errors so it appears that something corrupted the communication between modules and left the ABS module, brake control module, and others in improper states. I had to clear DTCs, disconnect 12-volts battery for a minute, then clear DTCs again before the brakes and ABS/traction control systems would work normally. The situation happened after charging a couple of times and while parked at my office twice so far. My cases were not related to a weak 12-volts battery, but a weak battery can cause it.
Silver LEAF 2011 SL rear ended (totaled) by in-attentive driver 1/4/2015 at 50,422 miles
Silver LEAF 2015 SL purchased 2/7/2015