The Dallas Mavericks withstood a 40-point barrage by Kobe Bryant for a 112-105 home win over the Los Angeles Lakers.