Part of being more explicit about what we allow to be subclassed and what not.
Add a ::show-peek-icon property and show a clickable icon when it is set. Clicking it toggles the visibility of the content. The same functionality is also accessible via a context menu item. This is a common feature of password entries.
This is a simple editable which hides the entered text and shows a caps-lock warning.