v9
Migration
v9 of @dnb/eufemia contains breaking changes. As a migration process, you can simply search and replace:
General
- Uninstall
dnb-ui-liband install@dnb/eufemia. - Rename with Regex
("|')dnb-ui-liband replace with$1@dnb/eufemia. - Rename
node_modules/dnb-ui-lib/and replace withnode_modules/dnb/eufemia/. - Find
formRowinside a (e.g. <Provider formRow= ...) and replace it withFormRow(PascalCase).
Number to NumberFormat
- Find the
Numbercomponent and rename it withNumberFormat. - Find the
dnb-numberand replace it withdnb-number-format. - In case you import it from
components/number/Number, it has to becomponents/number-format/NumberFormat. - In case you use
formatorcleanNumberfrom either/components/Numberor/components/number/Number, replace the import path to be/components/number-format/NumberUtils. - You can also use Regex: Find
Number([^F)]|$)and replace it withNumberFormat$1.
Tabs properties
Tabs has changed two property names.
- Find
section_stylein<Tabs section_style="..." />and replace withtabs_style. - Find
section_spacingin<Tabs section_spacing="..." />and replace withtabs_spacing.
Helper classes
- Removed
dnb-nudge - Removed
dnb-belt - Removed
dnb-hide-on-mobile - Removed
dnb-mobile-exclusive - Removed
dnb-width-limit
Patterns to Extensions
Most of the Eufemia "patterns" got removed in favor of calling this part as extensions.
- Find
dnb-ui-lib/patternsor@dnb/eufemia/patternsand replace with@dnb/eufemia/extensions - Find
dnb-ui-patternsand replace withdnb-ui-extensions
The following patterns/extensions/components are removed:
- ActionNav
- DescriptionList
- Footer
- Form
- Grid
- MainMenu
- SummaryTable
- FieldsetDescription
- FormSummaryPage
- RangeSlider
- ViewTitle
- LineTitle
- Notification
Properties
Removed already deprecated CSS properties (vars):
--color-sea-green-alt-30--color-signal-yellow-30--color-black-30--color-sea-green-alt--color-signal-yellow--font-weight-book--font-weight-demi--font-family-book--font-family-demi
Textarea
- Removed support of style only for Textarea. You have to use the component now.
StepIndicator
- Has now a deprecation warning when properties like
use_navigation,active_item,active_url,url,url_futureandurl_passedare used.
Changes
- The visual appearance of a couple of components has been changed (e.g. border-radius).
- The color
success-greenhas changed its HEX value
Updates to the language files
Strings were changed/removed and added to the language files nb-NO.js and en-GB.js:
- NumberFormat (added)
Features
-
New useful properties added to
<Tabs content_style="..." />to define a section style. -
Added
stretchsupport for Autocomplete, Dropdown and DatePicker. -
Enhance Webpack v5 compatibility
-
Enhance React v17 compatibility
-
Linear ProgressIndicator
-
Release of Tooltip inclusive integration into Button, Anchor and NumberFormat
-
Tertiary Button with top placed icon
-
The Eufemia Provider can send along global component properties:
<Providervalue={{Button: { size: 'large' },}}>...<Button text="Large button" /></Provider>
Install
To upgrade to @dnb/eufemia v9 with NPM, use:
$ npm i @dnb/eufemia@9# or$ yarn add @dnb/eufemia@9
March, 3. 2021