Design System
SJ Component Library based on the SJ Design System
The Library is under development.
Release notes 📋
Getting Started
Read more here: https://confluence.sj.se/display/SJW/Getting+Started+-+Component+Library
Installing
You can install sj component library with NPM.
- NPM:
npm i @sjse/component-library
Compatibility
SJ component system is compatible with React v16+ and works with ReactDOM. React Native is not supported at this time.
Using Themes
Example on how to use the Green Theme. If you want to use different themes, you will have to use different ThemeProviders, with different themes. We recommend wrapping the page in one theme, and deviations in separate ones.
import React from "react";
import { greenTheme, ThemeProvider } from "@sjse/component-library";
const App = () => {
return (
<ThemeProvider theme={greenTheme}>
<App />
</ThemeProvider>
);
};
export default App;
Using Theme
You can also set the ThemeProviders to render the dark version of the theme as follows:
import React from "react";
import { greenTheme, ThemeProvider } from "sj-component-library";
const App = () => {
return (
<ThemeProvider theme={greenTheme} darkMode={true}>
<App />
</ThemeProvider>
);
};
export default App;
Contribute to this package
Contributions are made through pull requests, make sure to ping/tag someone so they get notified about the PR.
Setup dev environment
Clone the repository and create a new branch for your feature or fix. In case you have a Jira name and number use that to name your branch.
Storybook is started using the command npm start
. It also runs eslint.
Publish new package
To be able to publish a new package you need to be a member of the @sjse organisation on npm. Then pull latest master (make sure that the version in package.json is updated), make sure everything is fit for new publication and then run:
npm publish
npm scripts
- build: Builds a dist folder and runs lint
- start: Start ups Storybook locally and runs lint
- lint: Runs eslint according to conf in .eslintrc
- lint:fix: Runs eslint and fix simple errors
*Release notes
[X.X.X] UNRELEASED CHANGES
Features
-
SMART-10808 [JourneyCard]: Added time zone functionality to journey card
- so it displays right time despite local time settings and takes in consideration of Fagus time format
Design- and Bugfixes
-
S3CS-432 [StationPicker]:
- Added onSelect property to StationPicker
-
SMART-10930 [VMA]:
- Remove kebab-case prop name of a css property (
"text-align"
) inside the VMA component which threw an error.
- Remove kebab-case prop name of a css property (
-
SMART-10738 [RadioButtonCard]:
- Remove redundant
role: "presentation"
in the ToggleButton variant of the RadiobuttonCard which casued an axe-error.
- Remove redundant
-
SMART-10966 [AutocompleteSkeleton, DatePickerSkeleton]:
- Remove fixed width for
AutocompleteSkeleton
, it's now set towidth: 100%
which should make it grow appropriately. - Note: AutocompleteSkeleton fix will also work for StationPicker, since the StationPicker is built using the Autocomplete component.
- Remove fixed width for
DatePickerSkeleton
, it's now set towidth: 100%
which should make it grow appropriately.
- Remove fixed width for
[4.6.0] 2022-09-29
Features
-
SMART-10781 [Icons]:
- Add
Edit
(Pen) icon - Add
ChevronUpDown
icon
- Add
Design- and Bugfixes
- SMART-10713 [Card]: Fixed an issue where the image covered the top border of the card frame
-
S3POM-625 [BottomSheet/BottomSheetSwipeable]:
- Remove invalid prop
onOpen
fromBottomSheet
. Leftover prop from previous refactor. - Filter out invalid properties from
BottomSheetSwipeable
- Update
BottomSheet
stories
- Remove invalid prop
-
S3SEAR-723 [BottomSheet]:
- Fixed bug where Card style was overridden by BottomSheet style.
-
SMART-10866 [BottomSheetSwipeable]:
- Refactored styles and added the CSS to the component instead of importing the styles from a dependency.
- Add
zIndex: 1400
to match MUI Drawer zIndex
-
SMART-10649 [JourneySummary]:
- Fixed date comparison concerning timezones
-
SMART-10751 [StatusCircle/StatusText]:
- Added new optional adjustLeft prop to StatusCircle/StatusText
-
SMART-10751 [RouteDescription]:
- Added new RouteDescription story
[4.5.0] 2022-09-22
Features
-
S3SEAR-687 [AutoComplete/StationPicker]:
- Arrow up now shows latest search result
- Moves state setting actions from onKeyDown to onChange event, where the value (length) is immediately available.
-
SMART-10347 [Tooltip]:
- Add Tooltip component
-
SMART-10753 [DatePicker/StationPicker/AutoComplete]:
- Add onBlur event callback
Design- and Bugfixes
-
SMART-10788 [DatePicker]:
- Fixed an issue where the DatePicker threw an error because each child in the list didn't have a unique "key" prop by adding a unique key prop on each child.
-
SMART-10712 [DatePicker]:
- Fixed an issue where datepicker week numbers were incorrect and did not follow the Swedish standard.
-
SMART-10769 [StationPicker/AutoComplete]:
- Fixed an issue where the AutoComplete would break if the user wrote "Sto[", "Sto)" or "Sto(" for insance.
-
SMART-10762 [TransportDetails]:
- Fixed an issue which caused the prop
dynamicPropSize
to no longer work. Train SVG's should now shrink depending on how many icons (WiFi, WheelChair etc.) are to the right of the train SVG.
- Fixed an issue which caused the prop
-
SMART-10678 [DatePicker]:
- Added onError and onAccept callbacks to Datepicker.
-
SMART-10685 [Select]:
- Added onclick event on start icon in Select.
-
SMART-10696 [Fonts]:
- Fixed an issue where some fonts got wider letter spacing on iOS devices.
- No work item [SideSheet]:
- Fixed an issue where opening an inline side sheet caused the whole page to scroll to the bottom.
[4.4.1] 2022-09-08
Design- and Bugfixes
-
S3SEAR-669 [StationPicker]:
- Fixed an issue where suggestions disappeared if only one letter had been written in the StationPicker TextField.
[4.4.0] 2022-09-07
Features
-
S3SEAR-609 [StationPicker]:
- Adds the possibility to scroll the drawer into view (using the
transitionType
prop) (mobile) - Selects the value when clicking the textfield (mobile)
- Adds the possibility to use an inline swap stations icon (using the
onStationsSwapped
anduseInlineSwapIcon
prop) (desktop) - Adds the possibility to use a custom swap stations icon (using the
swapIcon
prop) (desktop) - Shows clear icons only when textfield is focused or hovered (desktop)
- Adds the possibility to scroll the drawer into view (using the
- SMART-10482 [DatePicker]: Datepicker now accepts null as a value prop.
-
S3CS-281 [RadioButtonCardSkeleton]: RadioButtonCardSkeleton can now be full width when
isLoading
is true. -
S3CS-281 [FlowButtonSkeleton]: FlowButtonSkeleton now acts properly and have the same size when FlowButton is used with
fullWidth
prop.
Design- and Bugfixes
-
S3SEAR-609 [StationPicker]:
- Shows popular stations after clearing textfield (using button or keyboard) (desktop)
- Hides the textfield outside of the drawer after the animation is finished (mobile)
-
SMART-10725 [JourneySummary]:
- Fixed a bug where points wouldn't render if a price weren't passed as prop in JourneySummary.
- Shows popular stations after clearing textfield (using button or keyboard) (desktop)
- Hides the textfield outside of the drawer after the animation is finished (mobile)
-
SMART-10609 [Alert]:
- Alert component is deprecated, added a
console.warn()
that will make users aware of this. - Alert can be handled using a regular Card.
- Added a deprecated folder in storybook and moved the Alert story there.
- Alert component is deprecated, added a
- SMART-10517 [RadioButtonCard]: Fix so that RadioButtonCard doesn't get the wrong html element as ref.
- SMART-10739 [PriceObject]: Price Object is now able to show negative prices in specific cases, previously didn't show prices below zero.
[4.3.1] 2022-09-01
Features
- No work item [Table]: Added a new context menu for the table that places itself over the top row of the table once any row is selected.
Design- and Bugfixes
- No work Item [Table]: Added fixed position on menu.
- SMART-10675 [TransportDetails]: Fixed a bug where Tåg/Train were spelled with a capital letter, when it should've been lowercase.
-
S3SEAR-608 [RouteDescriptionItem]: Changes flex direction for labels when using the
moveLeftLabelToRight
prop. Keeps the flex direction of the Box holding the children content, allowing it to stack vertically.
[4.2.2] 2022-08-30
Features
-
S3SEAR-608 [RouteDescriptionItem]: Added the prop
moveLeftLabelToRight
to allow the left label to move to the other side of Start/Stop/Line-Indicator. Also addeddisableGrid
prop to tighten gap between LineIndicator and the label.
Design- and Bugfixes
- [Table] : [#13226] Adds chip with deleteIcon.
- SMART-10653 [Icons]: Fixed a bug where two Illustration Icons werent possible to style via the fill.
- SMART-10672 [SVGs]: Fixed a bug where new Train SVG's had a stretched width and height on iOS/Safari.
- SMART-10689 [PriceObject]: Fixed a bug where PriceObject showed both points and price even if price was zero. This was unexpected and price should not be shown if it is zero together with points.
[4.2.1] 2022-08-26
Design- and Bugfixes
- [Table]: Added a hover menu for the table.
- SMART-10671 [PriceObject]: Fixed a bug where the price wasn't shown if value was 0.
-
SMART-10673 [RadioButtonPriceCard and CheckboxPriceCard]: Changed
fontVariant
that gets passed down to PriceObject from "h1" to "h1static"
[4.2.0] 2022-08-25
Features
- SMART-10467 [Storybook]: Updated storybook related dependencies to latest versions and installed addon controls.
-
SMART-10606 [PriceObject]: Added a possibility to add
priceSemanticElementType
andpointsSemanticElementType
to PriceObject to control the semantic element. Also added a new fontVariant calledh1static
which is a h1-styled font that doesn't grow on larger screens. - S3CS-271 [StationPicker]: Changed the way results are shown so that "exact hits" are sorted and shown before "partial" hits (e.g. "4" should add hit with synonym 4 at the top, not 40 and 14 over).
Design- and Bugfixes
- SMART-8480 [StatusCircle]: Added SJLeaf color
- SMART-7482 [Multiple components]: Updated color of label for inactive fields
- SMART-10605 [Chip]: Added optional iconPosition prop to chip
- SMART-10627 [RadioButtonPriceCard]: Added the language prop to the component and made sure that it gets passed down to the PriceObject component properly.
- No work item [Table]: A design fix that changes the margin to chip on smaller screens.
- SMART-10643 [DepartureCard]: A design fix that made sure the strikethrough on comfortability categories looked as intended by design.
- SMART-10607 [JourneySummary]: Changed the component that shows the journey price from a simple Typography component to a PriceObject component. This allows localization of the price and allows some more functionality that comes with the PriceObject component.
- No work item [SVGs]: Updated all train SVG's.
[4.1.0] 2022-08-10
Features
- SMART-10482 [DatePicker]: Added error and errorMessage props to enable custom error handling in DatePicker.
[4.0.0] 2022-08-10
Breaking changes
- SMART-10410 [PriceObject]: The prop smallerText is replaced by fontVariant. You can now pass in following font styles: body1, h1, h2, h3 & h4. H1 is default.
Features
- SMART-10411 [DatePicker]: Change the Date format displayed in DatePicker textField to match SJ design. 2022-08-05 => Today 5 August.
- [TableFilters]: Added a prop that allows you to reverse the chip color.
Design- and Bugfixes
- SMART-10267 [Autocomplete]: The Autocomplete group headers had the wrong font weight in MUI5. This has been updated to properly match SJ Design.
-
SMART-10489 [BottomSheet]: Bottom Sheet had an issue if you tried to customize the styling using sx it overwrote all the internal styling. Added a fix to this, so you can now style it using the
sx
prop without styles being overwritten. - SMART-10589 [DatePickerWeek]: Fixed bug with DatePickerWeek was crashing when picking a date earlier than the last picked date due to update in the date-fns library.
- SMART-10472 [SearchButton]: Fixed a bug where the hover effect and icon position of Search Button component were wrong.
- SMART-10437 [Storybook]: Updated component titles & added theme header
- S3SEAR-602 [TransportSummary]: use the getTransportSummaryScreenReaderText function to reduce duplicate code.
- SMART-10384 [Multiple components]: Added localization for english prices, both for the way prices are shown (1 999 vs 1,999) as well as the price suffix (:- vs SEK). The changes affected the following components: Price Object, Journey Summary, Departure Card and Journey Card components.
- SMART-8445 [TransportSummary]: Updated translations
- SMART-10462 [Multiple components]: Title for both children and youth is now visible in Journey Summary and Journey Card
[3.1.0] 2022-06-29
Features
- No Work Item [TableMenu]: Context menu automatically closes when an action is choosen. Can be disabled per action. Also fixed bug that no rowId was returned when clicking menu item if the table does not have checkboxes.
- No Work Item [TableFilters]: Fixed so the Box wrapping each Chip has position:relative. Also fixed spacing between chips to 8px, according to design.
Design- and Bugfixes
- SMART-7587 [Select]: Added the correct box-shadow to Select panel.
- SMART-10232 [Skeleton]: for all components.
- SMART-10431: [DatePicker]; Fixed design deviations.
- No work Item [TableFilters]: Fixed naming of translation so the passed translation is used correctly.
[3.0.1] 2022-06-23
Design- and Bugfixes
- No Work Item [DatePicker]: Fixed an issue that crashed pickers when rendering the weekdays "Mån, Tis, Ons..." instead of "M, T, O...". All pickers will now show the first letter of the weekday to avoid this issue.
- No Work Item [DatePicker]: Fixed a design bug on the Static Date Picker where the height cut the dates on some months.
[3.0.0] 2022-06-22
Breaking changes
- SMART-10394 [Accordion]: Added the possibility to allow users to call the closeAccordion and openAccordion methods that are declared inside the useImperativeHandle hook. This should allow users to control the Accordion. As a result of this we've removed the isOpen prop as it is now redundant, be aware that this is a breaking change only if you've previously used the isOpen prop. Controlling the Accordion should be done using the methods close-/openAccordion instead.
-
SMART-10119 [DatePicker]: dded internal error handling for text input. BREAKING
errorMessage
prop is now deprecated, you should not need to provide your own error messages. Default error messages can be overridden with the newcustomTranslations
props
Features
- SMART-9922 [AppBar]: Added additional right button prop
- SMART-10274 [Box]: The Box component now handles ref forwarding.
- SMART-10186 [DatePicker]: Added a possibility to pass the "hasWeekNumbers" prop to the DatePicker which will show week numbers on Mobile and Desktop DatePickers. Due to MUI limitations this is not possible on the Static Picker yet.
- SMART-10283 [DepartureCard]: Added possibility to pass an element value to the timeLabel of Departure Card to allow users to change semantics of the Typography component. The prop is called timeLabelTypographyElement. Added knob to story to show the use case as well.
- SMART-10185 [Icon] Added new Icon component. The old Icon will be available until we make the switch to bit. Changed name on all Brand Icons so to import it use { LTOBrand } instead of { LTO }.
- SMART-10205 [ListItemJourneySummary]: New component.
-
SMART-10345 [SideSheet]: Adding new component SideSheet with variants
modal
wide
andinline
Design- and Bugfixes
- SMART-10292 [DatePicker]: Updated docs on how to use datepicker in a different timezone.
- SMART-10272 [DatePicker]: Fixed an issue where the DatePicker threw an error due to wrong css-classname. Changed from "first-child" to "first-of-type".
- SMART-10141 [DatePicker]: Changed design so the Static Date Picker always takes the width of the parent container and grows flexibly. Added a story to the Static Date Picker that shows how you can add a border to the parent div to create a border around the Static Picker (since MUI currently has limitations on styling the Static Picker).
- SMART-10121 [DatePicker]: Worked on design issues for the Static Date Picker to make it align more with SJ Design.
- SMART-10292 [DepartureCard]: Make the card always show arrival and departure date in swedish time in other timezones.
- SMART-10205 [DepartureCard]: Fixed so text will collapse into a single whitespace
- SMART-10275 [Logo]: Fixed an issue where the Logo component threw an error due to the prop 'preserveAspectRatio' being set to true for the Movingo Symbol, changed the prop value to none as in the other Logos".
- [No Work Item][logo]: Make aria-hidden attribute a flexible prop defaulting to false. Make role dynamic depending on ariaHidden.
- SMART-9674 [Panels]: Fixed design deviations for Panels.
- SMART-7587 [Select]: Fixed design deviations for Select menu.
- SMART-10366 [Select]: Added a fix on line-height so letters like "g, y" etc. doesn't get cut due to the line-height.
- No Work Item [SwitchCard]: Changed the default isLoading state from true to false as it's supposed to be.
- No Work Item [Table]: When no checkboxes in Table the row should not get selected from opening the context menu.
- No Work Item [TableFilter]: Made it possible to pass translations for the chip options to TableFilters
- SMART-10429 [TableMenu]: Added a key prop to TableMenuItem to avoid console errors.
- SMART-10287 [TextField]: Fixed an issue where the TextField now cut letters like Å Ä Ö by changing the line-height from 1 to "normal".
- No Work Item [Textfield]: Removed the height property from the CSS-class MuiFormLabel as this caused an issue/bug where the textfield spun over icons etc that were supposed to be clickable.
2022-06-16
2.0.2 Hotfix
- No Work Item [Table] Improvements and Refactorings: Extracted TableBody and TablePagination as separate components to make the code cleaner. Added TableMenu which is a context menu that is triggered on right click. Removed TableHeader as it was from an old design and no longer used. Table Filter Chip Adjustments.
- No Work Item [AppBar] Improvements: Added additional right button for appbar. Updated AppBar story with appropriate knobs.
2022-06-09
2.0.1 Hotfix
SMART-10230:
- Improvements to departureCard No Work Item:
- Removed unwanted width property from Box and CardHeader
2.0.0
SMART-10164 BREAKING:
- Flow button Color update SMART-9987:
- Implement customAttribute prop on all components to use for testing.
- Some components will also get suffixed attributes on there subcomponents if they’re clickable elements or inputs. SMART-9131:
- Add loading states and skeleton to several components (No work item):
- Fixed so all letters are fully visible in the label for TextField component (No work item):
- Journey summary as list item SMART-10205:
- Departure card text style bug SMART-5490:
- Automatic axe a11y SMART-10106:
- Open prop for accordion S3SEAR-497:
- Page jumps when scrollTo element is at bottom of page (No work item):
- Enable CardContent to accept sx styling from teams
2022-06-08
1.1.3
- No Work Item: Refactored import for @mui/styles to @mui/material/styles, thoroughly this time.
2022-06-08
1.1.2
- No Work Item: Refactored import for @mui/styles to @mui/material/styles
2022-06-02
1.1.1
- SMART-10194: Allow sx in implementation of Container component
2022-06-01
1.1.0
Added Link component to exports
SMART-10175: Added Box component to exports
2022-05-25
1.0.0
BREAKING: FEED NOW USES MUI5 VERSION OF COMPONENT LIBRARY - for legacy (mui4 version) see @mui4 version
SMART-9744 BREAKING: the old component Ticket card has been renamed (thus the breaking change) to Journey card. The new ticket card component includes variants for årskort, periodbiljett, and priokort.
SMART-9865 BREAKING: all mui dependencies are now peerdependencies Migraition guide for Component Library Consumers
SMART-10077 BREAKING: Flowbutton props are now synked with props in SJ Design. All colored versions of flowbutton are now available. If you use the primary green button today you do not have to do anything, but for other versions of Flowbutton, including the secondary green, you now need to pass both color and type as props. This change will thus break any implementations of flowbuttons that are not primary green.
SMART-9610: Inline DatePicker and Fixes
SMART-10121: Fix styling for Inline DatePicker (Static)
SMART-9988: Fix ListItemText font color when FormControlLabel is disabled
SMART-9131: Added Skeletons for the following components: Typography and RadioButtonCard
2022-05-20
1.0.4-mui5-alpha
SMART-10011: Fix time zone bug in DatePickerWeek
SMART-9730: Add timeZone prop to Journey summary to handle fagus-dates
SMART-9713: Update Datepicker to match SJ design
SMART-10053: Fix: Allow Dialog to accept sx prop styling
SMART-9958: Optional size prop for Spacing component
SMART-9714: Fix: Upgrade list states
PR-8609: Added prop to BottomSheet. Modal variant now defaults to not being dismissable
S3SEAR-464: Fixes for RouteTransition, dynamic minHeight and styles for skipping transitions
2022-05-12
1.0.3-mui5-alpha
HOTFIX: SMART-9909-Revert latest DatePickerWeek fix since the problem was MFE-related, not from the component.
SMART-9978: Add support for onChange to Accordion
SMART-9986: Add support for component prop to Link
Minor styling fixes for Table
2022-05-10
1.0.2-mui5-alpha
HOTFIX: Fixes to Container Component: New default maxWidth, disableGutters for xs breakpoint.
SMART-9968-Fix-error-icon Fixed problem with inline SVG error icon
1.0.1-mui5-alpha
HOTFIX: Fixed broken imports in DatePicker, changed imports from mui/lab to mui/x.
S3SEAR-394 Add missing exports for RouteTransition
SMART-9820 - Replace old grid component
2022-05-09
1.0.0-mui5-alpha
BREAKING:
SMART-9820 - Datepicker a11y and refactoring (Add various accessibility fixs to the datepicker (labelling, aria-props and more, Refactor datepicker component into MobileDatePicker and DesktopDatepicker for easier readability, New way of handling translations. All translations are internal, but can be overridden with the customTranslations prop.)
The new way of handling translations is a breaking change.
SMART-9909 - Fix 17 days bug in datepicker week
S3SEAR-394 Common MFE page transition component: Adds a transition component for routes that can be used by MFEs and container running react-router v6
2022-05-06
0.0.24-mui5-alpha
Republish
2022-05-06
0.0.23-mui5-alpha
Added mappings to train images by official vehicle code
2022-05-05
0.0.21-mui5-alpha
Fixed ScrollToTop of PageTransition to include scrollTarget
0.0.20-mui5-alpha
Minor fixes for PageTransition
0.0.19-mui5-alpha
Updated PageTransition Component and documentation
2022-05-02
0.0.18-mui5-alpha
SMART-8632: Add new Fab (Floating action button) component, including "Skip to main content" example story
SMART-9666: Rewrite of TextList and TextListItem components
SMART-9666: Rewrite of Link component
SMART-9728: Update VMA component to allow option to show dismiss button
SMART-9715: Aligned icons in the list depending on position and icon type
2022-04-27
0.0.17-mui5-alpha
Fixed bug in theme breakpoints definition and added disableGutters prop to Container component
2022-04-25
0.0.16-mui5-alpha
No change
2022-04-25
0.0.15-mui5-alpha
S3POM-31: Show train image - Added X2 to map against X2000 train image
2022-04-14
0.0.14-mui5-alpha
SMART-9724: Autocomplete - fixes to Autocomplete.
2022-04-13
0.0.13-mui5-alpha
SMART-9724: Autocomplete - value will not repopulate on click outside if it's found within the options array
2022-04-12
0.0.12-mui5-alpha
SMART-7536: Designbug for Flow button
SMART-9622: Datepicker bugs
SMART-6510: Update Typography to match styles in Figma Error
SMART-9411: Add and adjust error state for all components
Update PageTransition component and export it from index
2022-04-06
0.0.11-mui5-alpha
SMART-9625-Switch bugs: Fixed correct padding from switch card border to the switch Added and exported "Brand Icon"-assets from component library fix bug with wrong color on priceText
2022-04-05
0.0.10-mui5-alpha
SMART-9622: Fixed DatePickerButton boxShadow on active&hover also changed color on the datepickerbutton from green to black. Fixed margin on datepicker icon, fixed placeholder text on date picker
SMART-9624: Added disableRipple prop to checkbox and radio component.
SMART-9616: remove console errors.
Fix feedback from MFE: wrong type on children in ListItemIcon.
2022-04-04
0.0.9-mui5-alpha
Fixed bug with MuiPaper-root class when using Cards in Dialog. SMART-9630 - traveller field padding.
0.0.8-mui5-alpha
Merged master into mui5 branch.
0.0.7-mui5-alpha
SMART-8449 Create component and stories for list. Redid bug fix with width not being 100% when using RadiButtonCard in Dialog component. SMART-9616 Remove empty styled components. (Some issues left on this ticket) Add back icon assets to nom package.
2022-04-01
0.0.6-mui5-alpha
SMART-9607 Allow styled components to take sx as prop. Bug fix in dialog component
2022-04-01
0.11.42-beta
SMART-9603 Minor bugfiix for transportations. Before, the first product name was displayed for all transportations
2022-03-31
0.0.5-mui5-alpha
Added small fixes for mui5 alpha
2022-03-30
0.11.41-beta
SMART-8944 v2 of this ticket. Added "type" prop to Logo component to include "symbol" or "logotype" for the Movingo Logotype
0.0.4-mui5-alpha
Cherry picked Travel Details to fix service brand name, concept and product handling
2022-03-29
0.11.40-beta
Changed the euronight train icon to v2 according to design feedback.
0.11.39-beta
SMART-9394 Add new illustration icons to component library and added to stories SMART-8945 Add new payment method icons to component library and added to stories SMART-9395 Update movingo logo (NEW NAME!) to component library SMART-8944 Extended logo component to include movingo logo and symbol SMART-9521 Add euronight train icon to component library and added to trains component
2022-03-28
0.0.3-mui5-alpha
Third version of Mui5 alpha add bottom-alert dialog variant to replace modal.
0.0.2-mui5-alpha
Second version of Mui5 alpha fixes based on feedback from MFE-teams
2022-03-21
0.11.38-beta
SMART-9130 Added loading state skeletons for Execute-, Feature-, Flow- and TextButton components.
2022-03-17
0.11.36-beta
SMART-9429 Minor bug fix in TransportDetails
0.0.1-mui5-alpha
First version of Component Library with Material UI v5
2022-03-15
0.11.35-beta
Add copy icon and update ListItem
0.11.34-beta
SMART-9303 Fixed concept and serviceBrandName in TransportDetails
2022-03-10
0.11.33-beta
SMART-9246 Added option to pass in child component to be shown in DepartureCard
2022-03-09
0.11.32-beta
SMART-9283 Added onSelect and freeSolo props to Autocomplete
2022-02-25
0.11.31-beta
SMART-9173 Align TicketCard and subcomponents with latest design
0.11.30-beta
SMART-8870 StationPicker possiblity to choose destination in Desktop SMART-8186 Add payment and brand logos
2022-02-22
0.11.29-beta
SMART-9150 - Set TransportDetails default props
0.11.28-beta
SMART-9142 - Make padding optional in TransportSummary
2022-02-21
0.11.27-beta
0.11.26-beta
SMART-9134 - Add translations for all concepts
0.11.25-beta
SMART-9134 - Make sure transport details can handle empty concept
2022-02-18
0.11.24-beta
SMART-9052 - Fix accessibility problem in TravellerField
2022-02-16
0.11.23-beta
SMART-8674 Configurable version of Ticket Card SMART-9053 Fix Dialog component is not possible to scroll with keyboard
0.11.22-beta
SMART-8650 added horizontal swap icon
0.11.21-beta
SMART-8650 added swap button to station field
2022-02-15
0.11.20-beta
SMART-8543 Fixed broken autocomplete styling
2022-02-14
0.11.19-beta
SMART-8447 Add SwitchCard component
2022-02-10
0.11.18-beta
SMART-8649 Always use chevron down as optional end icon TravellerField
0.11.17-beta
SMART-8829 DepartureCard comfort availability label handle all unavailable scenario
0.11.16-beta
SMART-8829 DepartureCard comfort availability label and screen reader support
2022-02-09
0.11.15-beta
SMART-8649 Add icon to TravellerField SMART-8829 Add comfort availability to DepartureCard, add caption + comfort availability option to DepartureCardSkeleton
2021-01-07
0.11.14-beta
SMART-8938 Add exports to MenuItem and correct label color TouchDatePicker
2021-01-03
0.11.13-beta
SMART-8925 Make TextField Label red on error
2021-01-31
0.11.12-beta
SMART-8706 ALlow Radio Button Card Label to be as small as needed, for example Swish.
0.11.11-beta
SMART-8722 Add class names for the app bar buttons
2021-01-28
0.11.10-beta
SMART-8813 Add left- and right button props as dependency in AppBar useMemo
2021-01-27
0.11.9-beta
SMART-8789 Add fullWidth to DatePicker dialog
2021-01-20
0.11.8-beta
SMART-8402 Add time to TicketCard
0.11.7-beta
SMART-8169 Uploads fonts in AEM and use i Component Library
0.11.6-beta
SMART-7334-Sync Icons Figma Storybook
New icons, such as social icons (twitter, facebook etc) added.
2021-01-17
0.11.5-beta
SMART-8629-Fix feedback on transport details Use named import for config provider
2021-01-17
0.11.4-beta
Exposed ConfigProvider from @sjse/component-library, not just @sjse/component-library/dist
2021-01-17
0.11.3-beta
SMART-8483 Refactor AppBar, add useMemo to avoid unnecessary rerender, add fade transition to title on scroll
2021-01-14
0.11.2-beta
SMART-8333-filter-chip-menu-and-code-refactoring
Add-StyleProvider-prefix-to-Chip-component
0.11.1-beta
SMART-8072 Added option to show more days in DatePickerWeek
0.11.0-beta
SMART-8546 Prefix Mui CSS classes to work with StyleProvider / MFE CSS
0.10.35-beta
SMART-8446-Enable seat info in TransportSummary
2021-01-10
0.10.33-beta
SMART-8044 Added ConfigProvider for prefixing CSS class names that are not targeted by StylesProvider
2021-01-04
0.10.32-beta
SMART-7525 Design bugs for Execute button
2021-01-04
0.10.31-beta
SMART-8451 Wrong typeface for night train in departure card
2021-12-28
0.10.30-beta
SMART-7162 Execute button does not scale with font size
2021-12-23
0.10.29-beta
SMART-8046 AppBar with single back button
0.10.28-beta
SMART-8481 Add parent Box with display flex to Large Badge
0.10.27-beta
SMART-7501 Create component and stories for Badge
2021-12-22
0.10.26-beta
First step in adding prefixes to MFE CSS
2021-12-17
0.10.25-beta
SMART-8241 Added optional id field to DepartureCard
2021-12-16
0.10.24-beta
SMART-8306 Updated @svg/rollup and shell-quote
2021-12-16
0.10.23-beta
SMART-6384 Updated typescript and React versions
2021-12-14
0.10.22-beta
SMART-8346 Fix blinking header in AppBar on state change
0.10.21-beta
SMART-8336 Fix MFE-related issue for enhanced focus option on ClickableCard
0.10.20-beta
SMART-8336 Add enhanced focus option on ClickableCard SMART-8338 Fix re-exports for chip
0.10.19-beta
Export TicketCard
2021-12-13
0.10.18-beta
SMART-7630 SMART Create component and stories for Assist, Filter and Suggestion Chip
0.10.17-beta
SMART-8260 Removed Layout effect from DatePickerWeek This is due to a layout bug when useLayoutEffect is used together with CssTransition
0.10.16-beta
SMART-7187 Improved SR texts transport details
2021-12-10
0.10.15-beta
SMART-8245 Add TicketCard
2021-12-08
0.10.14-beta
SMART-8285 Move TabPanel to not approved SMART-7974 change typo for journey summary, bump package-lock to match package
2021-12-07
0.10.13-beta
SMART-8238 Make focus outline scalable when increasing text size
2021-12-06
0.10.12-beta
SMART-8128 add of pos. to add id to button in AppBar
2021-12-05
0.10.11-beta
SMART-8209 Adjust sticky behaviour in AppBar
2021-12-03
0.10.10-beta
SMART-8179 Enable onClick with LinkComponent in CardActionArea
2021-12-02
0.10.9-beta
SMART-6226 Fix spacing issue in RadioButtonCard
0.10.8-beta
Expand story for multiple text fields stacked upon each other
0.10.7-beta
SMART-8217 DatePickerWeek does not respect new value - bugfix for lost animation
0.10.5-beta
SMART-8217 DatePickerWeek does not respect new value - bugfix
0.10.4-beta
SMART-8217 DatePickerWeek does not respect new value
2021-12-01
0.10.3-beta
SMART-7794 Incorrect padding on clear button in station picker desktop SMART-7394 TextField and related components - design bugs SMART-7796 Incorrect padding on end adornment in date picker SMART-7983 Change typography in route description item
2021-11-30
0.10.2-beta
SMART-7952 Typo fixes for Journey Summary
0.10.1-beta
SMART-7713 update movingo logo, agian, since previous file was corrupt
2021-11-25
0.9.9-beta.48
SMART-8142 Add support for background image behind AppBar in fullscreen Dialog
0.9.9-beta.47
SMART-8075 Minor padding fixes on RadioButtonCard and CheckboxCard
2021-11-24
0.9.9-beta.46
SMART-8117 Set correct color on floating label for Text Fields
2021-11-23
0.9.9-beta.45
Add story for multiple dialogs that appear after each other in a user flow
0.9.9-beta.44
SMART-8081 Fix logic for colors on Logo SMART-7434 Support passing text nodes as secondary text to RadioButtonCard SMART-8075 Better flex wrapping for toggle button variant of RadioButtonCard
0.9.9-beta.42
SMART-8075 - Better flex wrapping on RadioButtonCard and CheckboxCard
2021-11-22
0.9.9-beta.42
SMART-7713 update movingo logo
2021-11-18
2021-11-22
0.9.9-beta.38
SMART-7394 Fix design bugs for TextField and related components
2021-11-18
0.9.9-beta.37
SMART-7966 added disabled option to StationPicker
2021-11-18
0.9.9-beta.36
SMART-7589 New variants and responsive H1 to Typography SMART-7934 Remove train image from DepartureCardSkeleton SMART-7750 Add new default train Image SMART-5701 Styling changes to BottomSheet and BottomSheetSwipeable
2021-11-18
0.9.9-beta.35
SMART-7956 Fix for iOS bugs when using Reduce motion system setting
0.9.9-beta.34
SMART-8017 Allow Dialog to have enteringDirection = "none"
2021-11-18
0.9.9-beta.33
SMART-7962 Move modals to deprecated
2021-11-17
0.9.9-beta.32
Fix flex issue in Dialog, allow content to be pushed to bottom.
2021-11-17
0.9.9-beta.31
SMART-7958 Add support for sticky App Bar in Dialog
2021-11-17
0.9.9-beta.30
SMART-7957 Set correct divider color on ListItem divider borders SMART-7513 Change English currency to kr SMART-7703 New stories for lists
2021-11-16
0.9.9-beta.29
SMART-7958 Add support for fullscreen dialog and scrollable content
2021-11-12
0.9.9-beta.28
Added icons for Swedis and British flags
2021-11-11
0.9.9-beta.27
SMART-7818 - Change typography variant for radio button card label
2021-11-11
0.9.9-beta.26
SMART-7712 - Fix Date Picker Calendar mobile style
2021-11-08
0.9.9-beta.25
SMART-7447 - Add dialog
2021-11-05
0.9.9-beta.23
SMART-7843 - Fix for focus bug in ClickableCard
0.9.9-beta.22
SMART-7782 - Add prop LinkComponent to all buttons + ClickableCard
2021-11-02
0.9.9-beta.21
SMART-7853 - Modify VMA to accept children instead of text string
2021-11-02
0.9.9-beta.20
SMART-7805 - Add new component TravellerField
2021-11-01
0.9.9-beta.18
SMART-7732 - Added SubHeader to Select
2021-10-25
0.9.9-beta.16
SMART-7548 - Disable keyboard input for Date Picker in desktop mode.
0.9.9-beta.15
- Add re-export for Accordion and AccordionDetails
0.9.9-beta.14
- Add re-export for AccordionSummary
2021-10-22
0.9.9-beta.13
SMART-7687 - Allow ListItem button, TextButton and IconButton to accept onClick event handlers when they are used as router links
0.9.9-beta.12
SMART-7547 - Fixed bug where 0 prices didn't show
2021-10-20
0.9.9-beta.11
SMART-7655 - Allow ListItem and MenuItem to accept LinkComponent (needed for routing)
2021-10-19
0.9.9-beta.10
SMART-7547 - Formatting prices.
0.9.9-beta.9
SMART-6299 - Allow TextButton to accept RouterLinks.
2021-10-15
0.9.9-beta.8
SMART-6431 - Add stories for Radio, Checkbox and Switch list items. Also changes to ListItemText component.
2021-10-11
0.9.9-beta.7
- removes fixed width of menu
2021-10-08
0.9.9-beta.6
Added dot-dot-dot-icon.
2021-10-08
0.9.9-beta.5
Added fallback return type to getCalendarDateLabelFunc in DatePicker.tsx, necessary to make typing into input field possible.
2021-10-06
0.9.9-beta.4
Icons mysteriously were excluded from latest package, bumping version hoping they will be mysteriously included
2021-10-06
0.9.9-beta.3
SMART-7510 - Extends Menu with positioning props
2021-10-05
0.9.9-beta.2
SMART-7500 - Fix incorrect color on IconButton
0.9.9-beta.1
Update Snackbar styling according to SJ Design
SMART-7498 - Fix bug with incorrect background color on FeatureButton when used on touchscreen devices
0.9.8-beta.1
SMART-7495 Add missing keyboard focus style to ExecuteButton
0.9.8-beta.0
SMART-5438 Rewrite of FeatureButton Breaking change: The interface has changed for how we set the button color
0.9.7-beta.15
SMART-7464 override MUI viewBox defaults in departure card
0.9.7-beta.14
SMART-7464 new small heart icon added, and changed the icons in departure card to 20px
0.9.7-beta.13
SMART-7487 Fixed left aligned price
0.9.7-beta.12
SMART-5727 Fixed price size in departure card
2021-10-04
0.9.7-beta.11
SMART-7406 Support Windows high contrast mode
2021-10-01
0.9.7-beta.9
SMART-7463 RadiButtonCard children rerenders on state change
Simplified rendering of RadioButtonCard children so they will not rerender when typing in a TextField.
2021-09-29
0.9.7-beta.8
SMART-7439 Export vanilla Button
Export vanilla Button to be used in NavigationBar. This is needed to have an anchor tag with ripple effect.
2021-09-29
0.9.7-beta.7
SMART-7432 Handle multiple children in CheckboxCard and RadioButtonCard Breaking change, teams that send multiple children to these components need to remove their paddings and dividers to avoid visual bugs.
2021-09-28
0.9.7-beta.6
SMART-7268 DepartureCard typography error fixed SMART-7393 JourneySummary - Show consumer categories merged when more than one
2021-09-27
0.9.7-beta.5
SMART-7379 Disabled DepartureCard feature
2021-09-24
0.9.7-beta.3
SMART-7268 SMART-7396 - this has a small breaking change. If props for the Box inside the radio button card was passed, it should now be passed through the boxProps prop
2021-09-23
0.9.7-beta.2
SMART-7259 Fix icon color when IconButton is black.
0.9.7-beta.1
SMART-7150 Fix focus styling for ClickableCard, CheckboxCard and RadioButtonCard.
0.9.7-beta.0
SMART-7288 Fix padding on CheckboxCard and RadiobuttonCard. Breaking change, teams need to remove their own padding to avoid visual bugs.
0.9.6-beta.19
SMART-7161 Fix SearchButton design bugs plus text resizing
2021-09-17
0.9.6-beta.16
SMART-5231 Rename generic Props to {Component}Props
0.9.6-beta.15
SMART-7199 Fixed sr-only for RouteDescription.
2021-09-15
0.9.6-beta.14
SMART-5701 BottomSheet component. It is still work in progress not production ready.
2021-09-10
0.9.6-beta.10
Adds MUI StepIcon
2021-09-08
0.9.6-beta.9
SMART-7007 Make the default color of ListItemIcon black but have the ability to change when necessary.
0.9.6-beta.8
SMART-5478 - Implementing scalable font sizes (using rem instead of px)
2021-08-18
0.9.5-beta.4
SMART-5300 fix incorrect disabled color for FlowButton SMART-5296 set icon in ListItem always to be black SMART-5436 upate icon on Checkbox SMART-5685 change disabled color on Switch
0.9.5-beta.3
SMART-6782 fix to show popular stations in desktop for Autocomplete SMART-5327 fix background color for disabled ExecuteButton SMART-6918 fix incorrect font on active/inactive tab SMART-6793 fix so Autocomplete show values on focus
2021-06-22
0.9.3-beta.6
SMART-6889 - Add of a journeyStatus text that uses status circle. Also modified the JourneySummare component so it can take in an journey status test, optional
2021-06-22
0.9.2-beta.24
SMART-6646 - JourneySummary now handling comfort and flexibility
2021-06-21
0.9.2-beta.22
SMART-6610 - Fix with card and alert box, padding, colors
2021-06-18
0.9.2-beta.21
SMART-6344 - Add X2000 image to Train List SMART-6345 - Icon size on Search Button SMART-6346 - Active Tab font weight
2021-05-07
0.8.9-beta.16
SMART-6260 - New design for Select, MenuItem and Menu.
2021-05-03
0.8.9-beta.10
SMART-5479 - Add global support for prefers-reduced-motion mediaquery
2021-04-30
0.8.9-beta.8
SMART-5329 - add optional color prop to divider SMART-6156 - Add accessibility documentation to Storybook stories.
2021-04-28
0.8.9-beta.6
SMART-6156 - Add accessibility documentation to Storybook stories.
2021-04-27
0.8.9-beta.4
SMART-5669 - Add properties to Logo
- Add optional className, style, height and width properties to Logo.
2021-04-23
0.8.9-beta.3
SMART-6101, SMART-6102 export of functions
- Export StylesProvider, createGenerateClassName, withTheme,
2021-04-21
0.8.9-beta.2
SMART-5469 - AppBar design fixes
- Add new
isOnImage
prop to display AppBar with overlay gradient. Replaces SJAppBar.
2021-04-15
0.8.9-beta.0
SMART-5469 - Rewrite of AppBar
- Breaking change: New interface for AppBar, see Storybook documentation
2021-03-29 - 0.8.8-beta.2
- SMART-5462 - adds IE11 support to aria-labeledby and aria-describedby to SJModal
2021-03-25
0.8.8-beta.1
- SMART-5826 - Accessibility update for Menu
-
Breaking change:
onClose
prop is now mandatory.
-
Breaking change:
2021-03-19
0.8.6-beta.4
- SMART-5472 - Accessibility updates for List and ListItem
0.8.6-beta.3
- SMART-5477 - Accessibility updates for LinearProgress
-
Breaking change: LinearProgress now requires
accessibleText
text description for screen readers
-
Breaking change: LinearProgress now requires
- SMART-5539 - Design fix for MiniButton and refactored disabled styles in theme
2021-03-18
0.8.6-beta.1
-
SMART-5247 Changes to TextField
- Breaking change:
autoComplete
prop is now mandatory for accessibility purposes. Refer to documentation in Storybook for guidance.
- Breaking change:
-
SMART-5800 Added a FormHelperText component
0.8.5-beta.8
- SMART-5800 Added a FormHelperText component
2021-03-17
-
rollup
build is updated withsvgr({ icon: true })
.
Thisaddsheight
andwidth
to the icons, like they have in StoryBook. -
MuiInputAdornment
has fixed size svg atpositionEnd
. - SMART-5537 Updates to the Card component
- Updated
Card
story and added aClickableCard
. - Added
CardActionArea
,CardHeader
andCardMedia
components. - Fixed
:hover
state onTextListLink
.
- Updated
- Formatted the text in
ThemeProvider
to make it readble to dev's as well. - Body text is now
SJSans
and notSJSansMedium
as previous.
Thisissetbyconfiguringthebody2
typography and we are not usingbody2
sothisshouldnotaffectusinanyotherwaythanthat<body>
isn't semi-bold. - Cleanup of Color story and added the color
WarmWhite
that was referenced
butmissingincolors.ts
. - Exported
enUS
,fiFI
,isIS
,svSE
from@material/core/locale
. - Put
type-done
package back as it makes development easier by making sure
that@types
are up to date.
0.6.2-beta.23
- adds Select component
0.6.2-beta.18
- adds optional params for SJModal to take ariaLabel and ariaDescription
0.6.2-beta.7
bugfixes
-The SJModal had issue when it was track maintenance. The Track maintenance banner in the Time table view
hade higher z-index than the modal.
0.6.0-beta.1
Added
- MiniButton
-
interfaces
Trying to put all interfaces in one place - Logo
- SwitchListItem
Updated StoryBook
bugfixes
- Fixed an issue with @svgr/core not working
- Missing property
style
on FormControlLabel - Missing properties [
in
,unmountOnExit
] on Collapse - Added the theme.type = "dark" to all colors
- Calculate lineHeight on all Typography values
- Export Toolbar from our lib
- Cleaned up language in README.md
Adjustments
- Put stories in more sensible places
- Rearranged imports in Stepper, because it was generating a warning when building
- Removed Accordion Story (not in Figma)
- ExecuteButton
- TextField
- Tabs
- Box
- Divider
- FlowButton
- StatusCircle
- Paper
- AppBar
- Grid
- List
- ListItemIcon
- ListItemText
- Menu
- MenuItem
- MenuItemIcon
- Typography
0.9.6-beta.6
- fixed async issues for StationPicker
0.10.6-beta
- Updated the MOVINGO.svg file