Transparency and perfect absorption of all-dielectric resonant metasurfaces governed by the transverse Kerker effect