  We study the transverse-momentum spectrum of quarkonium production from
single light-parton fragmentation mechanism. In the case of semi-inclusive deep
inelastic scattering, we observe that there are two possible initiating
processes, namely photon-gluon fusion and light-quark fragmentation. For the
second case we derive the factorization theorem, which involves a new hadronic
quantity: the quarkonium transverse-momentum-dependent fragmentation functions
in NRQCD. We calculate their matching onto the non-perturbative long distance
matrix elements at the lowest order in the strong-coupling constant (${\mathcal
O}(\alpha_s^2)$). Focusing on the case of the electron-ion collider, we make a
comparative phenomenological study of the two production mechanisms and find
the regions of the phase space where one is dominant over the other.
