Iceland's Prime Minister Sigmundur David Gunnlaugsson is to resign, his party said on Tuesday, becoming the first casualty of leaked documents from a Panamanian law firm.