future-standard / scorer-ui-kit

SCORER UI Components in react with styled components
Other
6 stars 3 forks source link

Form component refactors #496

Closed atomworks closed 3 weeks ago

atomworks commented 1 month ago

Updates

This PR contains two main changes:

  1. Refactor inputs to match designs and use the new CSS variables.
  2. Introduced a new blue dot 🔵 next to field labels to signify they are required fields.

This refactors some the common form fields that have had design tweaks and seeks to replace legacy theming with the new CSS variables.

1. Input Refactors and Prop Improvements

This is similar to previous refactors. It updates sizes and colors, introducing the usage of new CSS variables and removing the old theme integrations.

Input, InputField, TextArea, TextAreaField and PasswordField have a new showFeedback?: boolean prop which if not set will default to false. This is because the feedback messages are no often used in designs however this feature is planned to be iterated, in which case the new feature will use the same props. Even in this instance we want to retain more control over when these are shown.

This also allows us to properly utilise these input states without having the feedback area appear incorrectly.

Action when updating to this version of the UI Kit: If your project uses any of the mentioned components and those instances have feedbackMessage in use you need to add the showFeedback={true} as a prop to once more recreate the previous behaviour.

2. Required - Blue Dot 🔵

This pattern has been used on some more recent designs and will begin to appear with more regularity moving forward. It looks like this... image

Additional Change Notes