[components] Change widget structure to make it more generic and improve usability.
Fix widget documentation.