view API so it only takes a list of attributes (meaning the value and input type are now passed in as attributes)searchpassword inputsnewPassword and currentPassword to fix the autocomplete behaviorGives you the default DOM element id that will be used by a TextInput.view with the given label.
This is for use when you need the DOM element id for use in javascript (such as trigger an event to focus a particular text input)
An input that allows password entry with autocomplete value "new-password"
If the user types at least one character into the input box, a floating control "Show password" will appear. When clicked, the input type will change from "password" to "text", in order to enable the user to check what they've typed.
An input that allows password entry with autocomplete value "current-password"
If the user types at least one character into the input box, a floating control "Show password" will appear. When clicked, the input type will change from "password" to "text", in order to enable the user to check what they've typed.
An input that is optimized for email entry
NOTE: this uses inputmode="email" so that mobile devices will use the email keyboard,
but not type="email" because that would enable browser-provided validation which is inconsistent and at odds
with our validation UI.
An input with "search" type specified.
An input that allows address-level2 entry
An input that allows address-line1 entry
An input that allows country-name entry
An input that allows family-name entry
An input that allows organization entry
An input that allows organization-title entry
An input that allows postal-code entry
An input that allows date entry. The date is represented as a Maybe Time.Posix
value, where Nothing represents an empty date field. The date is formatted as
an ISO8601 date string, with the time portion removed.
Format for a date input field is YYYY-MM-DD. Iso8601.fromTime generates a string in
the format YYYY-MM-DDThh:mmZ so we slice to only use the first 10 characters.
An input that allows datetime entry. The datetime is represented as a Maybe Time.Posix
value, where Nothing represents an empty datetime field. The datetime is formatted as
an ISO8601 datetime string, with the time zone removed.
Format for a datetime input field value should be YYYY-MM-DDThh:mm.
From MDN:
There are several methods provided by JavaScript's Date that can be used to convert numeric date information into a properly-formatted string. For example, the Date.toISOString() method returns the date/time in UTC with the suffix "Z" denoting that timezone; removing the "Z" would provide a value in the format expected by a datetime-local input.
Iso8601.fromTime generates the same string as Date.toISOString, so we need to drop the "Z" suffix.
A read-only input for text values
Causes the TextInput to produce the given msg when the field is focused.
Causes the TextInput to produce the given msg when the field is blurred.
Customizations for the TextInput.
Default behavior.
Adds CSS to the element containing the input.
If you want to customize colors, borders, font sizes, etc, you should instead add to the TextInput API to support what you need.
Use this helper to add custom attributes.
Do NOT use this helper to add css styles, as they may not be applied the way
you want/expect if underlying styles change.
Instead, please use the css helper.
Set a custom ID for this text input and label. If you don't set this, we'll automatically generate one from the label you pass in, but this can cause problems if you have more than one text input with the same label on the page. Use this to be more specific and avoid issues with duplicate IDs!
Sets whether or not the field will be highlighted as having a validation error.
If Just, the field will be highlighted as having a validation error,
and the given error message will be shown.
A guidance message shows below the input, unless an error message is showing instead.
A guidance message (HTML) shows below the input, unless an error message is showing instead.
Render the TextInput as HTML.