Migrate v4 to v5
Follow our migration guide to update safely from Fluid v4 to Fluid v5
Fluid version map
Fluid Global | Figma | Tokens | Vanilla | React | Angular | Vue |
---|---|---|---|---|---|---|
v4 | v2 | v1 | v4 | v1 | v0 | / |
v5 | v5 | v5 | v5 | v2 (React 18) | v1 (Angular 14) | v0 (Vue 3) |
🎨 Design migration
Follow our How to migrate to Fluid 5? guide directly inside Figma.
🖥 Dev migration
TOKENS
V1 to V5 migration
We decided to bump version from v1 directly to v5 to comply with global version of FLUID in design and in CSS
🖍 Changed
[SIZE]
- ⚠️ Breaking changes replace space tokens, here’s a mapping between old and new tokens
**Did not exist** ==> var(--nj-size-space-2)
var(--nj-size-space-0) ==> var(--nj-size-space-4)
var(--nj-size-space-1) ==> var(--nj-size-space-8)
var(--nj-size-space-1-2) ==> var(--nj-size-space-12)
var(--nj-size-space-2) ==> var(--nj-size-space-16)
var(--nj-size-space-3) ==> var(--nj-size-space-24)
var(--nj-size-space-4) ==> var(--nj-size-space-32)
var(--nj-size-space-5) ==> var(--nj-size-space-48)
var(--nj-size-space-6) ==> var(--nj-size-space-64)
var(--nj-size-space-7) ==> ❌ Removed
var(--nj-size-space-8) ==> ❌ Removed
👎 Deprecated
[GLOBAL]
- Move deprecated tokens to package
@engie-group/fluid-4-deprecated
and prefix them withnj-deprecated
--nj-deprecated-color-backdrop-modal
--nj-deprecated-color-background-body
--nj-deprecated-color-background-components
--nj-deprecated-color-background-components-active
--nj-deprecated-color-background-hr
--nj-deprecated-color-background-progress-track
--nj-deprecated-color-base-black-100
--nj-deprecated-color-base-black-200
--nj-deprecated-color-base-black-300
--nj-deprecated-color-base-black-400
--nj-deprecated-color-base-black-500
--nj-deprecated-color-base-black-600
--nj-deprecated-color-base-black-700
--nj-deprecated-color-base-black-800
--nj-deprecated-color-base-black-900
--nj-deprecated-color-base-black
--nj-deprecated-color-base-blue-allports
--nj-deprecated-color-base-blue-allports-active
--nj-deprecated-color-base-blue-allports-hover
--nj-deprecated-color-base-blue-bigstone
--nj-deprecated-color-base-blue-bigstone-active
--nj-deprecated-color-base-blue-bigstone-hover
--nj-deprecated-color-base-blue-corporate
--nj-deprecated-color-base-blue-corporate-active
--nj-deprecated-color-base-blue-corporate-hover
--nj-deprecated-color-base-blue-engie
--nj-deprecated-color-base-blue-rhino
--nj-deprecated-color-base-blue-rhino-active
--nj-deprecated-color-base-blue-rhino-hover
--nj-deprecated-color-base-blue-venice
--nj-deprecated-color-base-blue-venice-active
--nj-deprecated-color-base-blue-venice-hover
--nj-deprecated-color-base-cerise
--nj-deprecated-color-base-cerise-active
--nj-deprecated-color-base-cerise-hover
--nj-deprecated-color-base-danger
--nj-deprecated-color-base-danger-active
--nj-deprecated-color-base-danger-hover
--nj-deprecated-color-base-disabled
--nj-deprecated-color-base-gradient-primary
--nj-deprecated-color-base-gray-100
--nj-deprecated-color-base-gray-200
--nj-deprecated-color-base-gray-300
--nj-deprecated-color-base-gray-400
--nj-deprecated-color-base-gray-500
--nj-deprecated-color-base-gray-600
--nj-deprecated-color-base-gray-700
--nj-deprecated-color-base-gray-800
--nj-deprecated-color-base-gray-900
--nj-deprecated-color-base-green
--nj-deprecated-color-base-green-active
--nj-deprecated-color-base-green-hover
--nj-deprecated-color-base-green-fun
--nj-deprecated-color-base-green-fun-active
--nj-deprecated-color-base-green-fun-hover
--nj-deprecated-color-base-green-java
--nj-deprecated-color-base-green-java-active
--nj-deprecated-color-base-green-java-hover
--nj-deprecated-color-base-green-pine
--nj-deprecated-color-base-green-pine-active
--nj-deprecated-color-base-green-pine-hover
--nj-deprecated-color-base-green-riogrande
--nj-deprecated-color-base-green-riogrande-active
--nj-deprecated-color-base-green-riogrande-hover
--nj-deprecated-color-base
--nj-deprecated-color-base-active
--nj-deprecated-color-base-hover
--nj-deprecated-color-base-orange
--nj-deprecated-color-base-orange-active
--nj-deprecated-color-base-orange-hover
--nj-deprecated-color-base-orange-crusta
--nj-deprecated-color-base-orange-crusta-active
--nj-deprecated-color-base-orange-crusta-hover
--nj-deprecated-color-base-primary
--nj-deprecated-color-base-primary-active
--nj-deprecated-color-base-primary-hover
--nj-deprecated-color-base-primary-focus
--nj-deprecated-color-base-purple
--nj-deprecated-color-base-purple-active
--nj-deprecated-color-base-purple-hover
--nj-deprecated-color-base-red
--nj-deprecated-color-base-red-active
--nj-deprecated-color-base-red-hover
--nj-deprecated-color-base-red-mandy
--nj-deprecated-color-base-red-mandy-active
--nj-deprecated-color-base-red-mandy-hover
--nj-deprecated-color-base-success
--nj-deprecated-color-base-success-active
--nj-deprecated-color-base-success-hover
--nj-deprecated-color-base-violet
--nj-deprecated-color-base-violet-active
--nj-deprecated-color-base-violet-hover
--nj-deprecated-color-base-violet-eggplant
--nj-deprecated-color-base-violet-eggplant-active
--nj-deprecated-color-base-violet-eggplant-hover
--nj-deprecated-color-base-warning
--nj-deprecated-color-base-warning-active
--nj-deprecated-color-base-warning-hover
--nj-deprecated-color-base-white-100
--nj-deprecated-color-base-white-200
--nj-deprecated-color-base-white-300
--nj-deprecated-color-base-white-400
--nj-deprecated-color-base-white-500
--nj-deprecated-color-base-white-600
--nj-deprecated-color-base-white-700
--nj-deprecated-color-base-white-800
--nj-deprecated-color-base-white-900
--nj-deprecated-color-base-white
--nj-deprecated-color-base-white-active
--nj-deprecated-color-base-white-hover
--nj-deprecated-color-base-yellow
--nj-deprecated-color-base-yellow-active
--nj-deprecated-color-base-yellow-hover
--nj-deprecated-color-base-yellow-bright-sun
--nj-deprecated-color-base-yellow-bright-sun-active
--nj-deprecated-color-base-yellow-bright-sun-hover
--nj-deprecated-color-border-input
--nj-deprecated-color-border-input-disabled
--nj-deprecated-color-icon-input
--nj-deprecated-color-placeholder-input
--nj-deprecated-color-placeholder-input-disabled
--nj-deprecated-color-placeholder-input-hover
--nj-deprecated-color-placeholder-input-focus
--nj-deprecated-color-text-background-base
--nj-deprecated-color-text-background-blue-allports
--nj-deprecated-color-text-background-blue-bigstone
--nj-deprecated-color-text-background-blue-corporate
--nj-deprecated-color-text-background-blue-engie
--nj-deprecated-color-text-background-blue-rhino
--nj-deprecated-color-text-background-blue-venice
--nj-deprecated-color-text-background-cerise
--nj-deprecated-color-text-background-danger
--nj-deprecated-color-text-background-gradient-primary
--nj-deprecated-color-text-background-gray-100
--nj-deprecated-color-text-background-gray-200
--nj-deprecated-color-text-background-gray-300
--nj-deprecated-color-text-background-gray-400
--nj-deprecated-color-text-background-gray-500
--nj-deprecated-color-text-background-gray-600
--nj-deprecated-color-text-background-gray-700
--nj-deprecated-color-text-background-gray-800
--nj-deprecated-color-text-background-gray-900
--nj-deprecated-color-text-background-green
--nj-deprecated-color-text-background-green-fun
--nj-deprecated-color-text-background-green-java
--nj-deprecated-color-text-background-green-pine
--nj-deprecated-color-text-background-green-riogrande
--nj-deprecated-color-text-background
--nj-deprecated-color-text-background-orange
--nj-deprecated-color-text-background-orange-crusta
--nj-deprecated-color-text-background-primary
--nj-deprecated-color-text-background-purple
--nj-deprecated-color-text-background-red
--nj-deprecated-color-text-background-red-mandy
--nj-deprecated-color-text-background-success
--nj-deprecated-color-text-background-violet
--nj-deprecated-color-text-background-violet-eggplant
--nj-deprecated-color-text-background-warning
--nj-deprecated-color-text-background-white
--nj-deprecated-color-text-background-yellow
--nj-deprecated-color-text-background-yellow-bright-sun
--nj-deprecated-color-text-body
--nj-deprecated-color-text-body-inverted
--nj-deprecated-color-text-label
--nj-deprecated-color-text-label-focus
--nj-deprecated-color-text-label-inner-focus
--nj-deprecated-color-text-input
--nj-deprecated-color-text-progress
VANILLA
V4 to V5 Migration guide
🖍 Changed
⚠️ Breaking changes
[GLOBAL]
- Update colors to comply with new Engie Global Guidelines
- Update dependencies to work with Node latest LTS v16.16 and npm 8.15
- lib/fluid-design-system.js automatically initiate components
- lib/auto-init is included to lib/fluid-design-system.js
- replace web-animation-js dependency for global file
- Replace all radius to use tokens and be compliant with new UI guidelines (no radius)
- Replace all sass variables with tokens
- When installing the package via npm or importing it via CDN we recommend fixing the version with the exact package version to avoid breaking change affecting your live website. With never-ending topics like Accessibility and BRAND GUIDELINES we also have to include some minor breaking changes in some minor versions
[AVATAR]
- Replace
nj-bullet
bynj-status-indicator
in thenj-avatar
component nj-avatar
with pictures should now have modifier.nj-avatar--picture
like so
<a href="#" class="nj-avatar nj-avatar--picture">
<img class="nj-avatar__picture" src="source" alt="Customer">
</a>
[BADGE]
- [A11Y] Change
nj-badge
semantic fromdiv
top
[BUTTON]
- Replace all previous variants
light
,primary
,danger
,success
,warning
variants with new system listed in section Added
[BULLET]
nj-bullet
doesn’t take same variants as before,
Before:
<div class="nj-bullet nj-bullet--white"></div>
<div class="nj-bullet nj-bullet--blue-corporate"></div>
<div class="nj-bullet nj-bullet--blue-allports"></div>
<div class="nj-bullet nj-bullet--blue-venice"></div>
<div class="nj-bullet nj-bullet--green-java"></div>
<div class="nj-bullet nj-bullet--green-pine"></div>
<div class="nj-bullet nj-bullet--green"></div>
<div class="nj-bullet nj-bullet--orange-crusta"></div>
<div class="nj-bullet nj-bullet--orange"></div>
<div class="nj-bullet nj-bullet--red-mandy"></div>
<div class="nj-bullet nj-bullet--red"></div>
<div class="nj-bullet nj-bullet--blue-bigstone"></div>
<div class="nj-bullet nj-bullet--blue-rhino"></div>
<div class="nj-bullet nj-bullet--green-fun"></div>
<div class="nj-bullet nj-bullet--green-riogrande"></div>
<div class="nj-bullet nj-bullet--yellow"></div>
<div class="nj-bullet nj-bullet--yellow-bright-sun"></div>
<div class="nj-bullet nj-bullet--purple"></div>
<div class="nj-bullet nj-bullet--violet"></div>
<div class="nj-bullet nj-bullet--violet-eggplant"></div>
<div class="nj-bullet nj-bullet--cerise"></div>
After :
<div class="nj-bullet nj-bullet--brand"></div>
<div class="nj-bullet nj-bullet--teal"></div>
<div class="nj-bullet nj-bullet--pink"></div>
<div class="nj-bullet nj-bullet--orange"></div>
<div class="nj-bullet nj-bullet--red"></div>
<div class="nj-bullet nj-bullet--green"></div>
<div class="nj-bullet nj-bullet--ultramarine"></div>
<div class="nj-bullet nj-bullet--yellow"></div>
<div class="nj-bullet nj-bullet--purple"></div>
<div class="nj-bullet nj-bullet--blue"></div>
<div class="nj-bullet nj-bullet--lime"></div>
[CARD]
nj-card
imagenj-card__img
should now be wrapped in divnj-card__img-wrapper
[FOOTER]
nj-footer
: remove.nj-footer__link
class it should be replaced bynj-link nj-link--contextual
- Remove all utils from
nj-footer
,
Before:
<div class="row mt-5 mb-3">
<div class="col-sm-6 col-md mb-3 mb-md-0">
<h2 class="nj-footer__links-list-title">Title 1</h2>
<ul class="list-unstyled">
<li><a href="#" class="nj-link nj-link--contextual">Link 1</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 2</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 3</a></li>
</ul>
</div>
<div class="col-sm-6 col-md mb-3 mb-md-0">
<h2 class="nj-footer__links-list-title">Title 2</h2>
<ul class="list-unstyled">
<li><a href="#" class="nj-link nj-link--contextual">Link 1</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 2</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 3</a></li>
</ul>
</div>
<div class="col-sm-12 col-md">
<h2 class="nj-footer__links-list-title">Title 3</h2>
<ul class="list-unstyled">
<li><a href="#" class="nj-link nj-link--contextual">Link 1</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 2</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 3</a></li>
</ul>
</div>
</div>
After:
<div class="nj-footer__menu">
<div class="nj-footer__menu-section">
<h2 class="nj-footer__links-list-title">Title 1</h2>
<ul class="nj-footer__links-list">
<li><a href="#" class="nj-link nj-link--contextual">Link 1</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 2</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 3</a></li>
</ul>
</div>
<div class="nj-footer__menu-section">
<h2 class="nj-footer__links-list-title">Title 2</h2>
<ul class="nj-footer__links-list">
<li><a href="#" class="nj-link nj-link--contextual">Link 1</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 2</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 3</a></li>
</ul>
</div>
<div class="nj-footer__menu-section">
<h2 class="nj-footer__links-list-title">Title 3</h2>
<ul class="nj-footer__links-list">
<li><a href="#" class="nj-link nj-link--contextual">Link 1</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 2</a></li>
<li><a href="#" class="nj-link nj-link--contextual">Link 3</a></li>
</ul>
</div>
</div>
[HEADER]
- Remove all utils from
nj-header
, you now have to add classesnj-header__search-input
on search input andnj-header__search-button
on search button as well asnj-header__sub-nav
instead oflist-unstyled
[ICON MATERIAL]
.material-icons
now inherits color by default- Remove material icon
link
usage. - To use material icons variations, use the
nj-icon-material
class and its modifiers:md--{color}
is nownj-icon-material--{color}
- ⚠️Breaking change: reworked colors: primary (grey-800), inverse (grey-0), brand (ex blue-corporate), grey, teal, pink, orange, red, green, ultramarine, yellow, purple,
md--{size}
is nownj-icon-material--{size}
[LINK]
nj-link
now inherits its parent font-sizenj-link
rename class.nj-link--no-text-decoration
to.nj-link--contextual
. Links are all underlined except for link variantcontextual
- Make link easier to interact with by adding some padding
[MODAL]
- Update
nj-modal
:- now uses the
nj-icon-button
- new html structure
- remove old
.nj-close
icon, replace it with the newnj-icon-button
with the.nj-modal__close
- now uses the
[NAVBAR]
- Remove all utils from
nj-navbar
, you know have to add classesnj-navbar__search-input
on search input andnj-navbar__search-button
on search button
[PAGINATION]
nj-pagination
: remove.nj-pagination__link--next
,.nj-pagination__link--prev
,.nj-pagination__link__nav
class it should be replaced by annj-icon-btn
[SPINNER]
nj-spinner
light
variant has been renamedinverse
icongray
variant has been renamedgrey
icon
[TAB]
- [A11Y] add
aria-label
on tablist element andtabindex
androle
on tabpanel elements
[TAG]
- Update
nj-tag
with new UI:- Replace
nj-tag__icon
with componentnj-icon-btn
with classnj-tag__close
- Class
nj-tag__icon
is now set to the tag’s icon -
Variants have been replaced with new colors, here are the new tokens:
.nj-tag (grey default), .nj-tag--brand, .nj-tag--teal, .nj-tag--pink, .nj-tag--orange, .nj-tag--red, .nj-tag--green, .nj-tag--blue, .nj-tag--ultramarine, .nj-tag--yellow, .nj-tag--purple .nj-tag--lime
- All tags are now filled, remove classes
.nj-tag--filled-VARIANT
- Remove margin on tags
- Replace
- [A11Y] change structure of
nj-tag
and order of its children
[TOGGLE]
nj-toggle
minor changes: animation- Rename toggle icon class
.nj-toggle__icon-dm
to.nj-toggle__icon
- To correctly disable a
nj-toggle
you will need to add class.nj-toggle--disabled
in addition of having property on child input
❌ Removed
⚠️ Breaking changes
[GLOBAL]
- remove webComponent initialization
[REBOOT.CSS]
- Reboot.css has been moved to another package
- remove
<a>
styles fromreboot.css
[AVATAR]
-nj-avatar
:
- Remove
nj-avatar--xs
size - Remove right margin on
avatar
[BADGE]
nj-badge
: remove color variants- Remove right margin on not only child
nj-badge
[BUTTON]
- remove classes
.nj-btn--outline
,.nj-btn--ghost
,.nj-btn--warning
,.nj-btn--success
,.nj-btn--error
,.nj-btn--block
,.nj-btn--alone
,.nj-btn--icon-before
and.nj-btn--icon-after
(It is recommended to place icons before text)
[CHECKBOX]
nj-checkbox
: remove variants.has-warning
and.has-success
[FAB]
- Remove variants
.nj-fab--success
and.nj-fab--warning
,.nj-fab--danger
[RADIO]
nj-radio
Remove variants.has-warning
and.has-success
- ⚠️ Breaking changes
nj-radio
: remove variants.has-warning
and.has-success
- ⚠️ Breaking changes
nj-toggle
:- Rename toggle icon class
.nj-toggle__icon-dm
to.nj-toggle__icon
- Remove possibility to have one label before and one after the toggle. Toggles now only have one label which is placed after the toggle
- To correctly disable a
nj-toggle
you will need to add class.nj-toggle--disabled
in addition of having property on child input
- Rename toggle icon class
[TOGGLE]
nj-toggle
theme colors removed (nj-toggle--primary
,nj-toggle--success
,nj-toggle--warning
,nj-toggle--danger
,nj-toggle--light
)nj-toggle
deprecation of the utility classes (mr-1
,ml-1
) on label. Replaced with flex and gap behaviour.- Remove possibility to have one label before and one after the toggle. Toggles now only have one label which is placed after the toggle
👎 Deprecated
[REBOOT.CSS]
- Deprecate
reboot.css
,reboot imported tokens and added a cleanslate for css. You should now import tokens as shown in theREADME.md
Unfortunately this is not a good practice for a component library. In our case some of our components were relying on some global styles when each component should be responsible for its own styles. It can also cause some website to have some side effects when importingreboot.css
in order for fluid components to work properly. From now on components rely on their own styles andreboot.css
is removed from this package and moving it to package@engie-group/fluid-4-deprecated
in case you website was relying on some rules present inreboot.css
, you should import if from@engie-group/fluid-4-deprecated
or replace the rules in your styles. We are also adding an optionalbase.css
file that you can import and which sets the correct font-family and color to the html and body
[ALERT]
nj-alert
is deprecated. You should usenj-inline-message
ornj-toast
instead
[FORMS]
- All underlined forms are deprecated, you should use new
nj-form-item
[SWITCH]
nj-switch
is deprecated. You should usenj-segmented-control
instead
[UTILS]
- Deprecate component
utils
, utils will no longer be maintained and are available in package@engie-group/fluid-4-deprecated
- Remove deprecated
globals
fromglobals/scss
, move them to@engie-group/fluid-4-deprecated
and replace all usages in code with tokens from@engie-group/fluid-design-tokens
- Remove
_color-dark.scss
- Remove
_spacing.scss
- Remove
_typography.scss
- Remove
_motion.scss
- Remove
_colors.scss
- Remove unused utils from
_util.scss
- Remove
- Remove
tokens/color.scss
- Remove deprecated
ANGULAR
V0 to V1 Migration guide
🖍 Changed
⚠️ Breaking changes
[GLOBAL]
- Update dependencies to work with Node latest LTS v16.16 and npm 8.15
- Change importing
FluidModule
and packages files:- Before you would import
FluidModule
like thisimport {FluidModule} from '@engie-group/fluid-design-system-angular'
. You now need to specify thelib
folder in the import path like this:import {FluidModule} from '@engie-group/fluid-design-system-angular/lib'
`
- Before you would import
- Add
@angular/cdk
as a required peerDependency - When installing the package via npm or importing it via CDN we recommend fixing the version with the exact package version to avoid breaking change affecting your live website. With never-ending topics like Accessibility and BRAND GUIDELINES we also have to include some minor breaking changes in some minor versions
[BULLET]
nj-bullet
doesn’t take same variants as before,
Before:
white
blue-corporate
blue-allports
blue-venice
green-java
green-pine
green
orange-crusta
orange
red-mandy
red
blue-bigstone
blue-rhino
green-fun
green-riogrande
yellow
yellow-bright-sun
purple
violet
violet-eggplant
cerise
After :
brand
teal
pink
orange
red
green
ultramarine
yellow
purple
blue
lime
[BUTTON]
- Change how
nj-button
works:btnType
is replaced byemphasis
and its values are replaced by'bold' | 'subtle' | 'minimal'
,'bold'
being now defaultvariant
values are replaced by'primary' | 'secondary' | 'destructive' | 'inverse'
'primary'
being the default- Rename
hasIcon
@Input tohasCustomIcon
[CHECKBOX]
- Rename
id
@Input toinputId
[ICON]
- Icon size m is now md
- Change color variant values: primary (grey-800), inverse (grey-0), brand (ex blue-corporate), grey, teal, pink, orange, red, green, ultramarine, yellow, purple
[ICON ENGIE]
nj-icon-engie
new colors (the gradient is replaced by ultramarine-900)-
Add new values for the @Input() variant
:default
(ultramarine-900)brand
(brand-600)inverse
(grey-0) -
Remove old @Input() variant
values:gradient
blue-corporate
(use ‘brand’)white
(use ‘inverse’)
-
[LINK]
- Rename
nj-link
size valuem
tomd
nj-link
now inherits its parent font-size- Prop
rel
is no longer used to pass url. Use the newhref
prop to pass the link href. - Prop
rel
is now used to passrel
to the link.
[PROGRESS]
- [A11Y]
nj-progress
: addlabel
required @Input()
[RADIO]
- [A11Y] ⚠️ Breaking change
nj-radio
: renameid
prop toinputId
[SPINNER]
light
variant has been renamedinverse
icongray
variant has been renamedgrey
icon- [A11Y]
nj-spinner
: addisLoading
@Input to conditionally display component
[TABS]
- [A11Y]
nj-tabs
: add requiredlabel
@Input
[TOGGLE]
- Rename
id
@Input toinputId
❌ Removed
⚠️ Breaking changes
[GLOBAL]
- Remove support for angular 11, 12, 13. Fluid now supports only Angular v14+
[AVATAR]
- Remove
notificationColor
@Input fromnj-avatar
[BADGE]
- Remove
variants
@Input fromnj-badge
[BUTTON]
- Remove
isInverse
@Input fromnj-button
. (Replaced byvariant="inverse"
) - Remove
btnType
valuesdefault' | 'outline' | 'ghost'
@Input() btnType
has been renamedemphasis
- Remove
variant
values'danger' | 'warning' | 'success'
- Remove
isIconButton
@Input fromnj-button
. (Will be replaced by specific componentnj-icon-button
) - Remove
iconPosition
@Input fromnj-button
. (Buttons should always have their icon on the left now) - Remove
size="block"
@Input fromnj-button
[ICON]
nj-icon-base
,nj-icon
andnj-icon-engie
:- Remove
@Input() title
and@Input() isClickable
- Remove
@Output() iconClick
and@Output() iconKeyPress
- Remove
[LINK]
- Remove variants:
primary
,success
,danger
,warning
,light
- Remove
isUnderlined
@Input fromnj-link
. Links are all underlined except for linkvariant="contextual"
[PROGRESS]
- Remove @Input()
variant
(colors variations)
[TOGGLE]
- Remove @Input() variant theme
- Remove possibility to have one label before and one after the toggle. Toggles now only have one label which is placed after the toggle
- Icons of
nj-toggle
should have property/directivenjToggleIcon
Eg:
<nj-toggle>
<nj-icon name="settings" njToggleIcon></nj-icon>
</nj-toggle>
👎 Deprecated
- ⚠️Deprecation:
nj-switch
is deprecated. You should usenj-segmentedControl
instead
REACT
V1 to V2 Migration guide
🖍 Changed
⚠️ Breaking changes
[GLOBAL]
- All exported components and services are now prefixed with
NJ
for e.g:<Button>
becomes<NJButton>
. You will have to replace all usages and imports in your project. - Update dependencies to work with Node latest LTS v16.16 and npm 8.15
- Importing
@engie-group/fluid-design-system/reboot.css
is now deprecated, reboot imported tokens and added a cleanslate for css. You should now import tokens as shown in theREADME.md
Unfortunately this is not a good practice for a component library. In our case some of our components were relying on some global styles when each component should be responsible for its own styles. It can also cause some website to have some side effects when importingreboot.css
in order for fluid components to work properly. From now on components rely on their own styles andreboot.css
is removed from this package and moving it to package@engie-group/fluid-4-deprecated
in case you website was relying on some rules present inreboot.css
, you should import if from@engie-group/fluid-4-deprecated
or replace the rules in your styles. We are also adding an optionalbase.css
file that you can import and which sets the correct font-family and color to the html and body. Please report toREADME.md
to see how to import correctly - When installing the package via npm or importing it via CDN we recommend fixing the version with the exact package version to avoid breaking change affecting your live website. With never-ending topics like Accessibility and BRAND GUIDELINES we also have to include some minor breaking changes in some minor versions
[AVATAR]
- Replace
Bullet
byStatusIndicator
in theAvatar
component to display status- You can now pass a
statusTitle
and have access to morestatus
prop options (“success”, “warning”, “offline”, “online”, “away”, “do_not_disturb”, “busy”, “unknown”, “error” and “in_progress”)`
- You can now pass a
- [A11Y] ⚠️ Breaking change: add required
label
prop toNJAvatar
[BADGE]
- Replace the
value
prop inBadge
by achildren
to display the value - Set
primary
as the default variant forbadge
, wasblue-corporate
before
[BREADCRUMB]
- Rename prop from
active
toisActive
[BULLET]
NJBullet
doesn’t take same variants as before,
Before:
white
blue-corporate
blue-allports
blue-venice
green-java
green-pine
green
orange-crusta
orange
red-mandy
red
blue-bigstone
blue-rhino
green-fun
green-riogrande
yellow
yellow-bright-sun
purple
violet
violet-eggplant
cerise
After :
brand
teal
pink
orange
red
green
ultramarine
yellow
purple
blue
lime
[CARD COVER]
- Rename prop from
link
tohref
- Rename prop from
targetLink
totarget
[CHECKBOX]
- Rename prop from
check
toisChecked
- Rename prop from
disabled
toisDisabled
- Rename prop from
required
toisRequired
- [A11Y]
NJCheckbox
: renameid
prop toinputId
and make it required
[FAB]
- [A11Y]
NJFab
: RenameariaLabel
prop tolabel
and make it required
[LINK]
- Rename
NJLink
size props valuem
tomd
[ICON]
NJIcon
now has no default role nor tabIndex (previously role=”button” and tabIndex=”0”)NJIcon
changedvariant
props values: primary (grey-800), inverse (grey-0), brand (ex blue-corporate), grey, teal, pink, orange, red, green, ultramarine, yellow, purple
[LIST]
NJListGroup
renamed toNJList
[PAGINATION]
- [A11Y]
NJPagination
: makeariaLabelPrevious
andariaLabelNext
props required
[PROGRESS]
- [A11Y]
NJLinearProgress
: addlabel
required prop
[RADIO]
- Rename prop from
check
toisChecked
- Rename prop from
disabled
toisDisabled
- Rename prop from
required
toisRequired
[TABS]
- [A11Y] add required
label
prop toNJTabs
[TOGGLE]
- Rename prop from
check
toisChecked
- Rename prop from
disabled
toisDisabled
- [A11Y] add
label
required prop toNJToggle
- [A11Y]
NJToggle
: makeid
prop required
[TOOLTIP]
- [A11Y]
NJTooltip
: makechildren
prop required
[SPINNER]
light
variant has been renamedinverse
icongray
variant has been renamedgrey
icon
[SWITCH]
- Rename prop from
check
toisChecked
- Rename prop from
disabled
toisDisabled
❌ Removed
⚠️ Breaking changes
[GLOBAL]
- Remove displayNames from components, somehow it breaks storybook props
- Drop support for React < 18
- Remove exported types
TColors
andTColorsPalette
[AVATAR]
- Remove
notificationColor
prop - Remove
xs
size variants
[BADGE]
- Remove
variant
prop
[BUTTON]
- Remove
NJButtonBase
,NJButtonOutline
andNJButtonGhost
.NJButton
now handles all variants - Remove
isInverse
props fromNJButton
. (Replaced byvariant="inverse"
) - Remove
variant
values'danger' | 'warning' | 'success'
- Remove possibility to have a
NJButton
with an icon only. (Should be replaced by specific componentNJIconButton
) - Remove
iconPosition
props fromNJButton
. (Buttons should always have their icon on the left now) - Remove
size="block"
props fromNJButton
[FAB]
- Remove variants
success
andwarning
,danger
[ICON]
- Remove
title
,href
,target
,role
andtabIndex
prop - Deprecates
onClick
andonKeyPress
prop
[ICON ENGIE]
- Remove
title
,href
,target
,role
andtabIndex
prop - Deprecates
onClick
andonKeyPress
prop
[LINEAR PROGRESS]
- Remove color
variant
prop
[LINK]
- Remove variants:
primary
,success
,danger
,warning
,light
- Remove prop
isUnderlined
fromNJLink
. Links are all underlined except for linkvariant="contextual"
[MODAL]
- Remove
ariaLabelledBy
prop
[RADIO]
- Remove
tabIndex
prop
[SWITCH]
- Remove NJSwitch unsupported light option theme variants
[TOGGLE]
- Toggle component color theme variant removed (
primary
,success
,warning
,danger
,light
) - Remove possibility to have one label before and one after the toggle. Toggles now only have one label which is placed after the toggle
- Remove
label
prop, label should now be passed as child of the component -
Change value of
values
prop from -
{ left: string | number | boolean; right: string | number | boolean }
to
{ off: string | number | boolean; on: string | number | boolean }
- Icons are also passed as children and should have attribute
data-child-name="njToggleIcon"
- Remove
notificationColor
prop
[TEXTAREA]
- Remove textarea component, Textarea is now usable by passing propos:
isMultiLine
toNJFormItem
component
👎 Deprecated
[FORMS]
Dropdown
,Select
andGroupSelect
are now deprecated, useNJSelectInput
insteadInput
is deprecated, useNJFormItem
insteadNJAutocomplete
is deprecated please useNJAutocompleteInput
[ALERT]
NJAlert
is deprecated. You should useNJInlineMessage
orNJToast
instead
[SWITCH]
NJSwith
is deprecated. You should useNJSegmentedControl
TOKENS
V1 to V5 migration
We decided to bump version from v1 directly to v5 to comply with global version of FLUID in design and in CSS
🖍 Changed
[SIZE]
- ⚠️ Breaking changes replace space tokens, here’s a mapping between old and new tokens
**Did not exist** ==> var(--nj-size-space-2)
var(--nj-size-space-0) ==> var(--nj-size-space-4)
var(--nj-size-space-1) ==> var(--nj-size-space-8)
var(--nj-size-space-1-2) ==> var(--nj-size-space-12)
var(--nj-size-space-2) ==> var(--nj-size-space-16)
var(--nj-size-space-3) ==> var(--nj-size-space-24)
var(--nj-size-space-4) ==> var(--nj-size-space-32)
var(--nj-size-space-5) ==> var(--nj-size-space-48)
var(--nj-size-space-6) ==> var(--nj-size-space-64)
var(--nj-size-space-7) ==> ❌ Removed
var(--nj-size-space-8) ==> ❌ Removed
👎 Deprecated
[GLOBAL]
- Move deprecated tokens to package
@engie-group/fluid-4-deprecated
and prefix them withnj-deprecated
--nj-deprecated-color-backdrop-modal
--nj-deprecated-color-background-body
--nj-deprecated-color-background-components
--nj-deprecated-color-background-components-active
--nj-deprecated-color-background-hr
--nj-deprecated-color-background-progress-track
--nj-deprecated-color-base-black-100
--nj-deprecated-color-base-black-200
--nj-deprecated-color-base-black-300
--nj-deprecated-color-base-black-400
--nj-deprecated-color-base-black-500
--nj-deprecated-color-base-black-600
--nj-deprecated-color-base-black-700
--nj-deprecated-color-base-black-800
--nj-deprecated-color-base-black-900
--nj-deprecated-color-base-black
--nj-deprecated-color-base-blue-allports
--nj-deprecated-color-base-blue-allports-active
--nj-deprecated-color-base-blue-allports-hover
--nj-deprecated-color-base-blue-bigstone
--nj-deprecated-color-base-blue-bigstone-active
--nj-deprecated-color-base-blue-bigstone-hover
--nj-deprecated-color-base-blue-corporate
--nj-deprecated-color-base-blue-corporate-active
--nj-deprecated-color-base-blue-corporate-hover
--nj-deprecated-color-base-blue-engie
--nj-deprecated-color-base-blue-rhino
--nj-deprecated-color-base-blue-rhino-active
--nj-deprecated-color-base-blue-rhino-hover
--nj-deprecated-color-base-blue-venice
--nj-deprecated-color-base-blue-venice-active
--nj-deprecated-color-base-blue-venice-hover
--nj-deprecated-color-base-cerise
--nj-deprecated-color-base-cerise-active
--nj-deprecated-color-base-cerise-hover
--nj-deprecated-color-base-danger
--nj-deprecated-color-base-danger-active
--nj-deprecated-color-base-danger-hover
--nj-deprecated-color-base-disabled
--nj-deprecated-color-base-gradient-primary
--nj-deprecated-color-base-gray-100
--nj-deprecated-color-base-gray-200
--nj-deprecated-color-base-gray-300
--nj-deprecated-color-base-gray-400
--nj-deprecated-color-base-gray-500
--nj-deprecated-color-base-gray-600
--nj-deprecated-color-base-gray-700
--nj-deprecated-color-base-gray-800
--nj-deprecated-color-base-gray-900
--nj-deprecated-color-base-green
--nj-deprecated-color-base-green-active
--nj-deprecated-color-base-green-hover
--nj-deprecated-color-base-green-fun
--nj-deprecated-color-base-green-fun-active
--nj-deprecated-color-base-green-fun-hover
--nj-deprecated-color-base-green-java
--nj-deprecated-color-base-green-java-active
--nj-deprecated-color-base-green-java-hover
--nj-deprecated-color-base-green-pine
--nj-deprecated-color-base-green-pine-active
--nj-deprecated-color-base-green-pine-hover
--nj-deprecated-color-base-green-riogrande
--nj-deprecated-color-base-green-riogrande-active
--nj-deprecated-color-base-green-riogrande-hover
--nj-deprecated-color-base
--nj-deprecated-color-base-active
--nj-deprecated-color-base-hover
--nj-deprecated-color-base-orange
--nj-deprecated-color-base-orange-active
--nj-deprecated-color-base-orange-hover
--nj-deprecated-color-base-orange-crusta
--nj-deprecated-color-base-orange-crusta-active
--nj-deprecated-color-base-orange-crusta-hover
--nj-deprecated-color-base-primary
--nj-deprecated-color-base-primary-active
--nj-deprecated-color-base-primary-hover
--nj-deprecated-color-base-primary-focus
--nj-deprecated-color-base-purple
--nj-deprecated-color-base-purple-active
--nj-deprecated-color-base-purple-hover
--nj-deprecated-color-base-red
--nj-deprecated-color-base-red-active
--nj-deprecated-color-base-red-hover
--nj-deprecated-color-base-red-mandy
--nj-deprecated-color-base-red-mandy-active
--nj-deprecated-color-base-red-mandy-hover
--nj-deprecated-color-base-success
--nj-deprecated-color-base-success-active
--nj-deprecated-color-base-success-hover
--nj-deprecated-color-base-violet
--nj-deprecated-color-base-violet-active
--nj-deprecated-color-base-violet-hover
--nj-deprecated-color-base-violet-eggplant
--nj-deprecated-color-base-violet-eggplant-active
--nj-deprecated-color-base-violet-eggplant-hover
--nj-deprecated-color-base-warning
--nj-deprecated-color-base-warning-active
--nj-deprecated-color-base-warning-hover
--nj-deprecated-color-base-white-100
--nj-deprecated-color-base-white-200
--nj-deprecated-color-base-white-300
--nj-deprecated-color-base-white-400
--nj-deprecated-color-base-white-500
--nj-deprecated-color-base-white-600
--nj-deprecated-color-base-white-700
--nj-deprecated-color-base-white-800
--nj-deprecated-color-base-white-900
--nj-deprecated-color-base-white
--nj-deprecated-color-base-white-active
--nj-deprecated-color-base-white-hover
--nj-deprecated-color-base-yellow
--nj-deprecated-color-base-yellow-active
--nj-deprecated-color-base-yellow-hover
--nj-deprecated-color-base-yellow-bright-sun
--nj-deprecated-color-base-yellow-bright-sun-active
--nj-deprecated-color-base-yellow-bright-sun-hover
--nj-deprecated-color-border-input
--nj-deprecated-color-border-input-disabled
--nj-deprecated-color-icon-input
--nj-deprecated-color-placeholder-input
--nj-deprecated-color-placeholder-input-disabled
--nj-deprecated-color-placeholder-input-hover
--nj-deprecated-color-placeholder-input-focus
--nj-deprecated-color-text-background-base
--nj-deprecated-color-text-background-blue-allports
--nj-deprecated-color-text-background-blue-bigstone
--nj-deprecated-color-text-background-blue-corporate
--nj-deprecated-color-text-background-blue-engie
--nj-deprecated-color-text-background-blue-rhino
--nj-deprecated-color-text-background-blue-venice
--nj-deprecated-color-text-background-cerise
--nj-deprecated-color-text-background-danger
--nj-deprecated-color-text-background-gradient-primary
--nj-deprecated-color-text-background-gray-100
--nj-deprecated-color-text-background-gray-200
--nj-deprecated-color-text-background-gray-300
--nj-deprecated-color-text-background-gray-400
--nj-deprecated-color-text-background-gray-500
--nj-deprecated-color-text-background-gray-600
--nj-deprecated-color-text-background-gray-700
--nj-deprecated-color-text-background-gray-800
--nj-deprecated-color-text-background-gray-900
--nj-deprecated-color-text-background-green
--nj-deprecated-color-text-background-green-fun
--nj-deprecated-color-text-background-green-java
--nj-deprecated-color-text-background-green-pine
--nj-deprecated-color-text-background-green-riogrande
--nj-deprecated-color-text-background
--nj-deprecated-color-text-background-orange
--nj-deprecated-color-text-background-orange-crusta
--nj-deprecated-color-text-background-primary
--nj-deprecated-color-text-background-purple
--nj-deprecated-color-text-background-red
--nj-deprecated-color-text-background-red-mandy
--nj-deprecated-color-text-background-success
--nj-deprecated-color-text-background-violet
--nj-deprecated-color-text-background-violet-eggplant
--nj-deprecated-color-text-background-warning
--nj-deprecated-color-text-background-white
--nj-deprecated-color-text-background-yellow
--nj-deprecated-color-text-background-yellow-bright-sun
--nj-deprecated-color-text-body
--nj-deprecated-color-text-body-inverted
--nj-deprecated-color-text-label
--nj-deprecated-color-text-label-focus
--nj-deprecated-color-text-label-inner-focus
--nj-deprecated-color-text-input
--nj-deprecated-color-text-progress