Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

v4.0.0

Compare
Choose a tag to compare
@flaviendelangle flaviendelangle released this 13 May 14:17
· 1286 commits to dev since this release

Main improvements

  • Codebase now 100% based of hooks instead of class components
  • Bundle size down to 30kb Gzipped
  • Full theme customization and dark theme available out of the box

Components

ArrayInput

New implementations based on ExpandablePanel and ExpandablePanelItem.

  • (!) Remove itemDescriptionComponent (use itemTitleComponent with the new open parameter to add elements when an item is closed)
  • New props renderItem and renderItemTitle if you prefer to use render props instead of components for your items.

Card

  • New prop warning

Drawer

  • Wrapped inside withTriggerElement so you can directly pass a triggerElement prop without wrapping it yourself.

ExpansionPanel

  • (!) Remove the prop flat, it is now the default behavior.

ExpansionPanelItem

  • New prop header if you want to override the entire header and not just the title
  • The prop children now accepts render prop

Modal

  • The entering animation is now correctly triggered even if you instantiate the Modal with open=true

NavBar

  • (!) Remove the prop defaultMobileIsOpen

Notification

  • (!) Remove the prop illustration, you can directly use the prop children

Progress

Component removed from Thunder UI

Slider

  • Replace the previous wrapper of rc-slider with a custom lighter Slider.
  • (!) Rename the prop labelFormatter into tooltipFormatter
  • New prop tooltipRangeSeparator
  • New prop dots to show the possible values on the main bar

Spotlight

  • (!) Remove the theme prop, Spotlight is now using the global theme of Thunder UI
  • (!) Change the default placeholder from "Aller à..." to "Search..."
  • (!) Remove the Spotlight/cache utility function from Thunder UI
  • (!) Move the Spotlight/filter utility function from @habx/thunder-ui/Spotlight/filter to @habx/thunder-ui

SpotlightItem

  • (!) Rename the prop focusOnRender into focusOnMount which is closer from it's behavior (this prop should soon be removed in favor of a fowardRef implementation)

TextArea

  • (!) New prop small, the default font-size is now 16px
  • (!) Remove the prop borderColor

ThunderProvider

  • The prop theme now accept 'light' or 'dark' to easily use the default light theme of dark theme

Title

  • New prop error
  • New prop warning

CI & deployment

  • Usage of GreenKeeper to keep our dependencies up to date
  • Usage of Bili and Rollup to generate two builds of Thunder UI (ESM and CJS)
  • Fix the peer dependencies in the build (react, react-dom and styled-components are moved correctly to peer dependencies)

Unit testing

  • Switch from enzyme to react-testing-library
  • New command npm run test:coverage
  • New components tested : ArrayInput, ExpansionPanel, Navbar, Slider, Tabs

Storybook

  • Custom styling of the Storybook UI based on our current Thunder UI theme.
  • New command npm run storybook:dark to test the dark theme
  • Rename command npm run build-storybook into npm run storybook:build

Miscellaneous

  • Replace TSLint configuration by a custom version of the Habx ESLint configuration.
  • Remove lodash.has, lodash.clone, lodash.memoize, lodash.merge from the bundle
  • Use theme.get internally to allow custom themes instead of hardcoded colors