• Start
  • Blogg
  • Kom igång
  • Riktlinjer
  • Komponenter
  • Changelog
  • Tillgänglighet
  • Inställningar

Komponenter

Komponenter

​
​

Inga resultat hittade, prova med andra sökvillkor.

Journey Summary

Journey Summary

8.0.2

A description of this component is work in progress.

Demo
Props
Installation
Länkar
Tillgänglighet
Change log
Statistik

Demo

Props

Se fullständing dokumentation(öppnas i ny flik)
NamnTypBeskrivning

adjustLeft

booleanIf true, the train image will overflow to the left compared to the rest of the content.

applyGradient

booleanIf true, a gradient will be applied to fade out the train image.

arrivalDate

DateThe arrival date of the train.

arrivalLocation *

stringThe name of the arrival location.

comfort

stringThe comfort level of the train.

consumers

undefined[]Information about the consumers, such as category.

currency

unknownCurrency of the price. Default is SEK.

customAttribute

{ attribute: string; value: string | number }Custom attributes for testing purposes. Clickable and requested subcomponents will be suffixed with "-[ComponentName]".

departureDate

DateThe departure date of the train.

departureLocation *

stringThe name of the departure location.

disruptionReason

DisruptionReasonThe reason for any disruption, which will display a badge with disruption info. If combined with new datetimes, it will show the new datetimes next to the old ones.

duration

DurationTypeThe duration of the journey.

dynamicTrainSize

booleanIf the train should shrink depending on the size of transport information

flexibility

stringThe flexibility level of the train.

hideTransport

booleanIf true, transport details will be hidden.

isLoading

booleanIf true, a loading skeleton will be rendered instead of the component.

journeyStatus

StatusTypeThe status of the journey.

journeyStatusPosition

"top" | "middle"The position of the journey status, either "top" or "middle".

lang

InputLanguageLanguage used for internal translations.

newArrivalDate

DateThe new arrival date if the journey has a disruption.

newDepartureDate

DateThe new departure date if the journey has a disruption.

placements

PlacementsType[]Details of travelers' seating arrangements, including the train carriage ID and assigned seat number.

points

numberPoints value.

price

numberPrice value.

showDepartureInfoFirst

booleanIf true, the date will be shown before the departure and arrival locations, instead of after.

showPoints

booleanDetermines whether the points should be displayed.

showPrice

booleanDetermines whether the price should be displayed.

showQrCode

booleanIf true, the price will be replaced by a QR code icon.

showTimeStampsOnly

booleanIf true, only the timestamps for departure and arrival will be shown, e.g., 14.10–16.00.

showTransportImage

booleanIf true, the train image will be shown. Defaults to true.

showTravelTimeAndChanges

booleanIf true, the travel time and number of changes will be shown in the JourneyCard.

specialNeeds

stringAny special needs that the passenger may have, such as a wheelchair.

strikeThroughDateTime

booleanIf true, applies strike-through styling to the date. Disruption reasons "cancelled" and "hasToBeRebooked" are strike-through by default.

sx

SxPropsThe system prop that allows defining system overrides as well as additional CSS styles.

timeZone

stringTimezone for the date.

translation

PartialTranslations for the component.

transportations *

TransportationType[]An array of transportation types involved in the journey.

transportInformations

TransportInformationType[]An array of onboard amenities and services available during the journey.

transportStatus

StatusTypeAdditional status information about the transport, such as "No refreshments".

variant

"h2" | "h3" | "subtitle1"The variant of the component, such as "h2", "h3", or "subtitle1".

Installation

Kodexempel
npm install @sj-ab/component-library.ui.journey-summary

Länkar

  • Storybook

  • Figma

  • Bit.cloud

Tillgänglighet

Tillgängligt namn

Journey Summary har en anpassad uppläsning för skärmläsare. Vissa av kortets synliga texter döljs med aria-hidden="true" och ersätts med en alternativ och lite mer utförlig text. Informationen i skärmläsartexten ska vara helt likvärdig den synliga informationen, men med förklarande ord och skiljetecken för att den ska bli lättare att förstå.

Notera att textersättningen görs för varje paragraf och inte för hela komponenten samtidigt, så som i till exempel Departure Card. Se exempel nedan:

Uppläsningen kan vid behov anpassas genom att ändra i translations-objektet.

Alla som ändrar i Journey Summary ansvarar för att samtidigt skapa en bra skärmläsartext

Change log

  • Add roundtrip disruption reason to JourneySummary

    8.0.0

    Breaking

  • Migrate to ESLint 9

    7.0.19

Statistik

  • Importer av Journey Summary

    24
  • Repos med Journey Summary

    19%
  • Senaste installerade version av Journey Summary

    6.5.3
  • Äldsta installerade version av Journey Summary

    6.3.4
  • Kodexempel
    <Typography aria-hidden>
      Stockholm C - Göteborg C
    </Typography>
    <Typography variant="srOnly">
      Från Stockholm Central till Göteborg Central
    </Typography>