javascript event after event

After the mousedown event there is no onclick event
but if we don’t press the key and just click the event happens.

How can this be done?

example in which this is implemented https://showroom.littleworkshop.fr/

document.addEventListener('mousedown', function(event) {
  
 });

 document.addEventListener('mouseup', function(event) {
    
 });


 document.addEventListener('click', function(event) {

 

 });