Releases: GovTechSG/sgds-govtech-react
2.5.1
v2.5.0
What's new
Sidenav
- New
sticky
prop to enable the sidenav to sticky to a given--sgds-sidenav-sticky-top
value (defaults to 0rem) - See documentation
Datepicker
- Added appropriate aria attributes added for full support to the screen readers' users .
Fixes
Datepicker
- Clicking reset button will now reset the calendar view to day view
- Focus back to input when calendar closes to allow screenreader to announce date in the input.
QuantityToggle
- Prevent the users from entering the negative("-") value or any other alphabets
- Reset the value to 0 when the value is blank (deletion)
- disable button when number reach 0 / minimum / maximum value
Accordion
- accordion button styling when
alwaysOpen
prop is set to true - aria-expanded value for button when
alwaysOpen
prop is set to true - accordion behaviour that doesn't reflect correctly when toggling
alwaysOpen
prop
v2.4.0
What's new
Pagination
showFirstPage
andshowLastPage
prop introduced to enable users to show and allow direct navigation to first/last page of the pagination component. Resolves #213
Datepicker
- Accessibility features and improvements including allowing users to type date from input and keyboard accessible menu
- Previously the Datepicker's input was read-only, disallowing users to type dates into the datepicker. From 2.4.0, input masking is implemented on the Datepicker's input to allow users to type dates.
- By allowing users to type on the datepicker , there are a few implications:
placeholder
prop becomes obselete and will be deprecated and removed in the next major version bump.placeholder
prop is still available, but it does nothing.- Validation stylings and validation message for form constraint validation are implemented by default to the Datepicker.
invalidFeedback
prop is introduced to allow users to customise the error message when an invalid date is typed.
Fixes
defaultProps
is deprecated for Functionional Components in React 18 and will be removed in React 19. In response to that, we have removed the use ofdefaultProps
for affected components in our library causing the console warning.
They are: SelectableCard, Tooltip, Tabs and OverlayTrigger.
v2.3.0
What's new
-
Table sub-components introduced : Table.Row, Table.Header, Table.HeaderCell, Table.SortLabel, Table.Body, Table.DataCell
Previously, users construct their own and to fill the table. It is recommended for users to use the sub components for
better consistency and to get any future enhancements on these sub components. The previous way of constructing table with
and still works.Table.SortLabel gives user the added benefit of configuring a custom sorting Table. See [documentation]
(https://react.designsystem.tech.gov.sg/?path=/docs/components-table--basic#sorting) for more information. -
'use client' directive appended to each of our components. For NextJS users, this means that you can use our components out-of-the-box without manually configuring 'use client' for our components on your end. There are caveats about this due to an upstream issue from NextJs so please see the documentation on how to use sgds react components on NextJS app
Enhancements
- Accessibility improvements for Combobox. DropdownItem of Combobox is now a html button
- Generation of unique id attribute of components shifted to useEffect hook. This is to temporarily resolve the issue of different uuid generated in server and client side of SSR applications.
v2.2.2
Feat
- stepper: add keyboard interactions and aria-disabled to markers
- stepper: add aria-current attribute to indicate current step
- stepper: add tabindex to stepper button
- quantitytoggle: update aria-label to include number of steps
- quantitytoggle: add announcer to announce increment/decrement
- datepicker: add aria-label to 'clear' button
- datepicker: add aria attributes
- datepicker: add role, aria-haspopup, aria-controls, aria-modal
- tooltip: add aria-describedby attribute
- paginationbase: add as outer container
- navbartoggle: add aria-expanded attribute
- navlink: add aria-current attribute to active link
- sidenavbutton: add aria-haspopup attribute
- DropdownToggle: add aria-haspopup attribute
Fix
- fileupload: remove proptype filelist triggering typescript error
- quantitytoggle: change aria-label to proper english words
- sidenavlink: set 'active' attribute of navlink in sidenavlink
Build
- rollup.config.js: exclude node_modules and utils in component builds
v2.2.1
v2.2.0
v2.1.1
v2.1.0
- combobox: added a11y attributes
- fileupload: add multiple props to allow single or multiple selection of files
- datepicker: release and added to storybook
- dropdown: release and added to storybook
v2.1.1
- fileupload: preventdefault on click of cancelicon
v2.0.0
v2.0.0-beta.1
ci(ghaction): up node version to 14