v9
Migration
v9 of @dnb/eufemia contains breaking changes. As a migration process, you can simply search and replace:
General
- Uninstall
dnb-ui-lib
and install@dnb/eufemia
. - Rename with Regex
("|')dnb-ui-lib
and replace with$1@dnb/eufemia
. - Rename
node_modules/dnb-ui-lib/
and replace withnode_modules/dnb/eufemia/
. - Find
formRow
inside a (e.g. <Provider formRow= ...) and replace it withFormRow
(PascalCase).
Number to NumberFormat
- Find the
Number
component and rename it withNumberFormat
. - Find the
dnb-number
and 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
format
orcleanNumber
from either/components/Number
or/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 props
Tabs has changed two property names.
- Find
section_style
in<Tabs section_style="..." />
and replace withtabs_style
. - Find
section_spacing
in<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/patterns
or@dnb/eufemia/patterns
and replace with@dnb/eufemia/extensions
- Find
dnb-ui-patterns
and 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 props like
use_navigation
,active_item
,active_url
,url
,url_future
andurl_passed
are used.
Changes
- The visual appearance of a couple of components has been changed (e.g. border-radius).
- The color
success-green
has changed its HEX value
Updates to the language files
Strings where changed/removed and added to the language files nb-NO.js
and en-GB.js
:
- NumberFormat (added)
Features
-
New useful props added to
<Tabs content_style="..." />
to define a section style. -
Added
stretch
support 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