According to the following paper there are only two locations for the foreplane that don't cause excessive interference with the main wing and thus deterioration of lift/drag ratio in a Delta Canard configuration:
Low and far forward or high and close to the wing.
It is stated that this was found out in years of Investigation prior to finalisation of the design.
You see exactly these two layouts in the Typhoon and Rafale, respectively:
Rafale has the canard close to the main wing. Dihedral serves to move the tip of the canard high above the main plane without messing up the fuselage shape/cross section.
Typhoon has the other layout: Low canard and with anhedral they move the tip down to the level of the main plane despite the chin inlet for the engines.
Dihedral/anhedral in both designs is not related to lateral stability. It is rather used to move the foreplane higher/lower matching to the longitudinal position of the foreplane without compromising general fuselage layout.
http://www.dtic.mil/cgi-bin/GetTRDoc?AD=ADP010499
ETA: The difference between both layouts points indeed as @coffman has stated to the design priorities:
The Close Coupled Canard of the Rafale will help to control airflow over the main wing at higher AoA and thus be helpful for low speed performance/lift which is crucial for Carrier operations.
Long Coupled Canard has some advantages at supersonic speeds as it allows for a more negative longitudinal static stability margin and allows the use of a somewhat smaller foreplane size.
regards,
henra