Sugar intake for a stage 2 diabetes

Without having Diabetes I have 40 grams of sugar per day. That is a total from both table sugar and from fruits and veg.

The 40 grams is the recommended amount I should have per day. My first question is, the 40 grams per day, is that the recommendation from both types of sugar?

The second question, what would the amounts be if I had stage 2 diabetes?

Thanks
Bob