I don't think anyone is arguing that the parties completely switched, but both parties used to be much more ideologically diverse and have both liberal and conservative factions. There was a robust liberal wing of the GOP that was primarily based in the Northeast, along with a large contingent of conservative Democrats mostly from the South.
Now, most Northeastern liberals are Democrats and most Southern conservatives are Republicans.
The Republicans also had quasi-socialist (in the Western world rather than Eastern world sense) figures such as Robert La Follette Sr, Fiorello La Guardia and Henry Wallace (before he became a Democrat).That was LONG before the Civil Rights Act (and the supposed "party switch") occurred.