What do smritis and dharma shastras say about giving away one's children (boy/girl) to someone else as daana (i.e charity) or as a worker?
What is the take on giving children as daana? Not specific about kanyaa
Donating the offspring, whether it is a son or a daughter, is considered as illegitimate. Exception is when it comes to marriage, but Kanya Danam is to be understood in that context as to how it is significant.
It is definitely not the same as say Bhu/Anna/Go/Vastra Danam.
Here is a reference from Apasthambha Dharma Sutras 2.14:
The custom of donating or selling one’s children is not recognized as legitimate. It is said in the Veda that at the time of marriage the groom should voluntarily give a gift to the bride’s father in order to fulfil the Law: ‘Therefore, the groom should give one hundred cows together with a chariot to the bride’s father. The latter should repudiate that gift.’ The term ‘sale’ used in connection with this rite is only a figure of speech, for their union is brought about through the Law.
to someone else as daana (i.e charity) or as a worker?
.... whatever might be the reason, as already made quite clear from the verses given above - Not allowed.
If it is the case of selling the offspring - then also not allowed. It is an Upapataka (minor sin resulting in Jatibrahmsa - loss of caste).
So, donating (giving away) one's own children, whether it's daughter or son, is generally forbidden by the Smritis.