ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Support different data types in input fields

Open DBD324 opened this issue 2 years ago • 5 comments

Summary

Currently the input fields are text only, whereas we should look at how to support different data types that are available as standard HTML input types.

💬 Description

Review the design of the input fields to make sure they can support the different HTML input types.

Consider:

  • Email
  • Date
  • Date-time
  • Currency
  • Password
  • Number
  • Month
  • Search
  • Tel
  • Time
  • URL
  • Week

Some of these input types will be covered by other ic components, so these can be excluded once confirmed.

💰 Use value

This provides browser default behaviour for inputting standard data types. Enriching our text field to allow these different data types will make it more flexible in future.

Additional info

Html input types can be found here: https://www.w3schools.com/html/html_form_input_types.asp

DBD324 avatar Feb 01 '23 10:02 DBD324

Relates to #503

jd239 avatar Mar 29 '23 14:03 jd239

As a minimum, add examples for types like password

MI6-255 avatar Apr 25 '24 09:04 MI6-255

Only currency on this list, which isn't supported by default in HTML, so we can consider this in the future

MI6-255 avatar Apr 25 '24 09:04 MI6-255

#1148

MI6-94 avatar Apr 26 '24 10:04 MI6-94

need to decide if we want to add support for the list above. at the moment, if using typescript you are limited to IcTextFieldTypes = | "email" | "password" | "tel" | "text" | "url" | "number" | "search";

could potentially consider type = "color" too

ad9242 avatar May 22 '24 09:05 ad9242

Spike to explore what we need to change as devs, then hand back to design to make those Figma changes

MI6-255 avatar May 30 '24 08:05 MI6-255