We propose a transport theory for the kinetic evolution of solar-wind electrons in the heliosphere. We derive a gyro-averaged kinetic transport equation that accounts for the spherical expansion of the solar wind and the geometry of the Parker-spiral magnetic field. To solve our three-dimensional kinetic equation, we develop a mathematical approach that combines the Crank-Nicolson scheme in velocity space and a finite-difference Euler scheme in configuration space. We initialize our model with isotropic electron distribution functions and calculate the kinetic expansion at heliocentric distances from 5 to 20 solar radii. In our kinetic model, the electrons evolve mainly through the combination of the ballistic particle streaming, the magnetic mirror force, and the electric field. By applying fits to our numerical results, we quantify the parameters of the electron strahl and core part of the electron velocity distributions. The strahl fit parameters show that the density of the electron strahl is around 7% of the total electron density at a distance of 20 solar radii, the strahl bulk velocity and strahl temperature parallel to the background magnetic field stay approximately constant beyond a distance of 15 solar radii, and β s (i.e., the ratio between strahl parallel thermal pressure to the magnetic pressure) is approximately constant with heliocentric distance at a value of about 0.02. We compare our results with data measured by Parker Solar Probe. Furthermore, we provide theoretical evidence that the electron strahl is not scattered by the oblique fast-magnetosonic/whistler instability in the near-Sun environment.