A generalization of Kruskal–Katona’s theorem