Ancient Chinese historians kept extensive records, but it's difficult to separate fact from legend. The first explicitly Chinese polity we have verifiable archaeological evidence of is the Shang Dynasty in approximately 1600BC. In this period, China was divided among a vast collection of tribes, each speaking different languages and having vastly different customs. The Shang Dynasty never achieved pre-eminence throughout China, and was primarily concentrated on the banks of the Yellow River, engaging in diplomatic relations as broad equals with surrounding tribes.
The Shang Dynasty was replaced by the Zhou Dynasty in c.1050BC, which rapidly folded surrounding tribes into a dynasty which would last more than 700 years with varying degrees of centralisation and civil war. The hallmark of the Zhou was their adoption, refinement, and codification of Shang Dynasty rituals, aesthetic and customs. This was considered beautiful (華 Hua) and refined (夏 Xia), giving rise to the first definition of Chineseness (Huaxia) as we know it, namely adherence to the rituals and customs of the Zhou. This was actually a very small set of rituals, for instance revering ancestors and the royal casting of the nine cauldrons.
Consequently, Warring State scholars argued strongly that Huaxia could be broadly applicable to almost anyone who respected a very limited set of rituals. This enabled Chineseness to expand rapidly, folding in even non-Sinic language speakers like the Wu Hu into a homogenous Chineseness. It also enabled the concurrent development of strong parallel cultures among the constituent states of the Zhou empire. For example, the Book of Documents written during the Zhou Dynasty documents the different types of dress in each different state, different rituals for honouring ancestors, different languages and even different ways of writing the same words.
It should finally be noted that at least initially, Huaxia-ness was not seen as superior per se. Confucianism and it's obsession with ritual was a very late development and did not become the norm until much later. Mohist texts contain numerous treaties attacking this obsession with ritual, on the grounds that each non-Huaxia tribe had different rituals and it would be absurd to consider the entire country immoral based on that. Legalist texts also argue that certain non-Huaxia tribes were well-administered because of the intelligence of their policymakers. There is no implication of non-civilisation, barbarianism, and certainly not immorality.