In word formation, there is a rule known as Right Hand Head Rule, which states that the component that comes to the right side of a complex word determines the base meaning and the grammatical category (parts of speech) of the whole word, and is called the head. This applies to Japanese as well. In all of your examples, 好き and 嫌い are the heads of the respective examples, which are na-adjectives (adjectival nouns). That is why the whole word becomes a na-adjective.
However, for the combinations with 嫌い, there is an alternative way to derive them. That is, besides the na-adjective 嫌い, there is a verb 嫌う, whose stem is 'kiraw-'. The stem is often used as a noun, and it can create compounds as well. Again following the right hand head rule, the created compound becomes a noun (e.g. 'mizu-giraw-'). Whenever there is a stranded consonant in Japanese, a vowel is inserted to make it compatible with Japanese phonology, and particularly for wago, the inserted vowel is 'i'. So the compound becomes 'mizugirawi'. A phonological rule in Japanese further comverts 'wi' into 'i', and the compound noun 水嫌い appears, which will take の.