feat: allow for theme color fallbacks for overrides #456
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

This PR enables theme color fallbacks for overrides.
Without this change, the consumer would have to specify each color property individually. For example, even if they set
colorErrorAccent, they would also have to setinputErrorColor, even thoughinputErrorColoruses the same value ascolorErrorAccent.This updates so that the partner could specify
colorErrorAccent(or other colors) and the input colors would get those values by default. The consumer could then specify their owninputErrorColorif they had a distinct one, but this enables them to set less colors as a baseline if they don't want to fine tune.This approach could be expanded to things like typography values, but focusing on colors for now.
We still use the return type of
createThemeto type the theme properties. So we still automatically get updates to the theme type as properties are added either to createTheme or the base theme colors.Proof of functionality
Theme configuration for colorBody:
Results in the following input backgrounds automatically
If we then specify a specific color value for
inputBackgroundColoras well as acolorBodyvalue:The
inputBackgroundColortakes precedence: