v22.0.0
22.0.0 (2024-01-19)
- feat!: release updates to Chip, SearchField, Pagination, Form.Autosuggest (#2995) (970b102), closes #2995
This release contains breaking changes to the following 4 components:
Chip
Pagination
SearchField
Form.Autosuggest
Breaking Changes
Chip
This updates the Chip
component to reflect the design spec as intended.
BREAKING CHANGE: Many of the SCSS variables (i.e., tokens) surrounding Chip
were removed. Consumers should verify no longer using any of the removed SCSS variables in custom Paragon brands/themes.
Pagination
This updates the Pagination
component to rely on the proper button variants, rather than having all pagination buttons be of the primary variant (even when unselected) with custom styles overriding the default button variant style (e.g., background color).
It also refactors the component to be more maintainable moving forward.
BREAKING CHANGE: Many of the SCSS variables (i.e., tokens) surrounding Pagination
were removed. Consumers should verify no longer using any of the removed SCSS variables in custom Paragon brands/themes.
BREAKING CHANGE: icons
prop now accepts the icon src instead of an Icon
component.
Before
<Pagination
...
icons={{
leftIcon: <Icon src={ChevronLeft} />,
rightIcon: <Icon src={ChevronRight} />,
}}
/>
After
<Pagination
...
icons={{
leftIcon: ChevronLeft,
rightIcon: ChevronRight,
}}
/>
SearchField
This updates the SearchField component to rely on IconButton
components for its actions (e.g., reset, submit). It also ensures the external submit button in the dark variant has appropriate hover styles.
BREAKING CHANGE: icons
prop now accepts the icon src instead of an Icon
component.
Before
<SearchField
...
icons={{
submit: <Icon src={Search} />,
clear: <Icon src={Close} />,
}}
/>
After
<SearchField
...
icons={{
submit: Search,
clear: Close,
}}
/>
Form.Autosuggest
This updates the Autosuggest component to provide the consumer with:
- The value entered in the textbox by the user
- The selected value (as it is displayed in the dropdown)
- The id of the selected option
This also allows the consumer to determine if the component should be in an error state when:
- No text has been entered
- Text has been entered, but not selection has been made
- An external validation check has failed - "customError"
The consumer will provide error messages for the appropriate error states.
BREAKING CHANGE: value
prop of Form.Autosuggest
is now an object instead of a string
BREAKING CHANGE: Form.Autosuggest
now uses onChange
instead of onSelected
BREAKING CHANGE: Form.Autosuggest
now takes in different error messages for value/selection required, and custom errors