diff --git a/app/component/TramLeg.js b/app/component/TramLeg.js index 26f088f60f..fff13fe971 100644 --- a/app/component/TramLeg.js +++ b/app/component/TramLeg.js @@ -1,21 +1,25 @@ import PropTypes from 'prop-types'; import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { getRouteMode } from '../util/modeUtils'; import TransitLeg from './TransitLeg'; -const TramLeg = ({ leg, ...props }) => ( - - - -); +const TramLeg = ({ leg, ...props }) => { + const mode = getRouteMode({ mode: leg.mode, type: leg.route.type }); + return ( + + + + ); +}; TramLeg.propTypes = { leg: PropTypes.object.isRequired, diff --git a/app/component/itinerary.scss b/app/component/itinerary.scss index 76cc36c4a2..2f9701b47f 100644 --- a/app/component/itinerary.scss +++ b/app/component/itinerary.scss @@ -18,6 +18,9 @@ $itinerary-tab-switch-height: 48px; &.bus-express { @include getCircleSvg($bus-express-color, $fill); } + &.tram-local { + @include getCircleSvg($tram-local-color, $fill); + } &.airplane { @include getCircleSvg($airplane-color, $fill); } diff --git a/app/component/map/VehicleMarkerContainer.js b/app/component/map/VehicleMarkerContainer.js index bb58ffb9c8..1cc251f01a 100644 --- a/app/component/map/VehicleMarkerContainer.js +++ b/app/component/map/VehicleMarkerContainer.js @@ -14,6 +14,7 @@ const MODES_WITH_ICONS = [ 'rail', 'subway', 'ferry', + 'tram-local', ]; function getVehicleIcon( @@ -80,8 +81,14 @@ function VehicleMarkerContainer(props) { return visibleVehicles.map(([id, message]) => { const type = props.topics?.find(t => t.shortName === message.shortName) ?.type; - const mode = - type === ExtendedRouteTypes.BusExpress ? 'bus-express' : message.mode; + let mode; + if (type === ExtendedRouteTypes.BusExpress) { + mode = 'bus-express'; + } else if (type === ExtendedRouteTypes.TramLocal) { + mode = 'tram-local'; + } else { + mode = message.mode; + } return ( ); } diff --git a/app/component/map/tile-layer/SelectStopRow.js b/app/component/map/tile-layer/SelectStopRow.js index 18cff16450..7e24899b81 100644 --- a/app/component/map/tile-layer/SelectStopRow.js +++ b/app/component/map/tile-layer/SelectStopRow.js @@ -10,15 +10,20 @@ function isNull(val) { } function SelectStopRow( - { code, type, desc, gtfsId, name, patterns, terminal, colors }, + { code, type, desc, gtfsId, name, terminal, colors, routes }, { config }, ) { let mode = type; - if (patterns && type === 'BUS' && config.useExtendedRouteTypes) { - const patternArray = JSON.parse(patterns); - if (patternArray.some(p => p.gtfsType === ExtendedRouteTypes.BusExpress)) { + if (routes && type === 'BUS' && config.useExtendedRouteTypes) { + const routesArray = JSON.parse(routes); + if (routesArray.some(p => p.gtfsType === ExtendedRouteTypes.BusExpress)) { mode = 'bus-express'; } + } else if (routes && type === 'TRAM' && config.useExtendedRouteTypes) { + const routesArray = JSON.parse(routes); + if (routesArray.some(p => p.gtfsType === ExtendedRouteTypes.TramLocal)) { + mode = 'tram-local'; + } } const iconOptions = {}; switch (mode) { @@ -58,6 +63,10 @@ function SelectStopRow( iconOptions.iconId = 'icon-icon_funicular-stop-lollipop'; iconOptions.className = 'funicular-stop'; break; + case 'tram-local': + iconOptions.iconId = 'icon-icon_tram-local-stop-lollipop'; + iconOptions.className = 'tram-local-stop'; + break; case 'FERRY': iconOptions.iconId = !isNull(code) ? 'icon-icon_ferry' @@ -113,7 +122,7 @@ SelectStopRow.propTypes = { gtfsId: PropTypes.string.isRequired, type: PropTypes.string.isRequired, name: PropTypes.string.isRequired, - patterns: PropTypes.string, + routes: PropTypes.string, code: PropTypes.string, desc: PropTypes.string, terminal: PropTypes.bool, diff --git a/app/component/map/tile-layer/Stops.js b/app/component/map/tile-layer/Stops.js index f5c2bdf6ac..f78bdefd82 100644 --- a/app/component/map/tile-layer/Stops.js +++ b/app/component/map/tile-layer/Stops.js @@ -35,6 +35,7 @@ class Stops { this.tile.hilightedStops && this.tile.hilightedStops.includes(feature.properties.gtfsId); let hasTrunkRoute = false; + let hasLocalTramRoute = false; if ( feature.properties.type === 'BUS' && this.config.useExtendedRouteTypes @@ -44,6 +45,15 @@ class Stops { hasTrunkRoute = true; } } + if ( + feature.properties.type === 'TRAM' && + this.config.useExtendedRouteTypes + ) { + const routes = JSON.parse(feature.properties.routes); + if (routes.some(p => p.gtfsType === ExtendedRouteTypes.TramLocal)) { + hasLocalTramRoute = true; + } + } const ignoreMinZoomLevel = feature.properties.type === 'FERRY' || feature.properties.type === 'RAIL' || @@ -60,10 +70,18 @@ class Stops { return; } + let mode = feature.properties.type; + if (hasTrunkRoute) { + mode = 'bus-express'; + } + if (hasLocalTramRoute) { + mode = 'tram-local'; + } + drawStopIcon( this.tile, feature.geom, - hasTrunkRoute ? 'bus-express' : feature.properties.type, + mode, !isNull(feature.properties.platform) ? feature.properties.platform : false, diff --git a/app/configurations/config.hsl.js b/app/configurations/config.hsl.js index 56890ef7be..5fb7105ece 100644 --- a/app/configurations/config.hsl.js +++ b/app/configurations/config.hsl.js @@ -122,6 +122,7 @@ export default { 'mode-metro': '#CA4000', 'mode-citybike': '#f2b62d', 'mode-citybike-secondary': '#333333', + 'mode-tram-local': '#007E79', }, }, getAutoSuggestIcons: { @@ -642,6 +643,35 @@ export default { sv: 'hsl.fi/matkustaminen/lahibussit', }, }, + { + showForRoute: route => route.type === 902, + header: { + fi: 'Raide-Jokeri', + en: 'Jokeri Light Rail', + sv: 'Spårjokern', + }, + content: { + fi: [ + 'Sed nibh ante, sodales non tortor vel, ullamcorper auctor massa. Nulla facilisi. Sed pharetra malesuada mauris, et auctor diam luctus at.', + ], + en: [ + 'Sed nibh ante, sodales non tortor vel, ullamcorper auctor massa. Nulla facilisi. Sed pharetra malesuada mauris, et auctor diam luctus at.', + ], + sv: [ + 'Sed nibh ante, sodales non tortor vel, ullamcorper auctor massa. Nulla facilisi. Sed pharetra malesuada mauris, et auctor diam luctus at.', + ], + }, + closeButtonLabel: { + fi: 'Mitä lähibussi tarkoittaa?', + en: 'What does a neigbourhood route mean?', + sv: 'Vad betyder en närbuss?', + }, + link: { + fi: 'hsl.fi/matkustaminen/lahibussit', + en: 'hsl.fi/matkustaminen/lahibussit', + sv: 'hsl.fi/matkustaminen/lahibussit', + }, + }, ], embeddedSearch: { diff --git a/app/constants.js b/app/constants.js index 9528150721..bb6314269c 100644 --- a/app/constants.js +++ b/app/constants.js @@ -95,6 +95,7 @@ export const AlertEntityType = Object.freeze({ export const ExtendedRouteTypes = Object.freeze({ BusExpress: 702, BusLocal: 704, + TramLocal: 902, }); export const ParkTypes = { diff --git a/app/translations.js b/app/translations.js index 634f57077c..3fe04edf42 100644 --- a/app/translations.js +++ b/app/translations.js @@ -1575,6 +1575,7 @@ const translations = { 'track-short-no-num': 'Track', traficom: 'Traficom', tram: 'Tram', + 'tram-local': 'Jokeri Light Rail', 'tram-with-route-number': 'Tram {routeNumber} {headSign}', transfer: 'Transfer', transfers: 'Number of transfers', @@ -2710,6 +2711,7 @@ const translations = { 'track-short-no-num': 'Raide', traficom: 'Traficom', tram: 'Raitiovaunu', + 'tram-local': 'Raide-Jokeri', 'tram-with-route-number': 'Raitiovaunu {routeNumber} {headSign}', transfer: 'Vaihto', transfers: 'Vaihtojen määrä', @@ -4627,6 +4629,7 @@ const translations = { 'track-short-no-num': 'Spår', traficom: 'Traficom', tram: 'Spårvagn', + 'tram-local': 'Spårjokern', 'tram-with-route-number': 'Spårvagn {routeNumber} {headSign}', transfer: 'Byte', transfers: 'Antal byten', diff --git a/app/util/modeUtils.js b/app/util/modeUtils.js index cbfd39206e..1f8ca4ed75 100644 --- a/app/util/modeUtils.js +++ b/app/util/modeUtils.js @@ -110,6 +110,8 @@ export const getRouteMode = route => { return 'bus-express'; case ExtendedRouteTypes.BusLocal: return 'bus-local'; + case ExtendedRouteTypes.TramLocal: + return 'tram-local'; default: return route.mode?.toLowerCase(); } diff --git a/digitransit-component/packages/digitransit-component-autosuggest-panel/package.json b/digitransit-component/packages/digitransit-component-autosuggest-panel/package.json index 9ebd5dabc5..a35c835e42 100644 --- a/digitransit-component/packages/digitransit-component-autosuggest-panel/package.json +++ b/digitransit-component/packages/digitransit-component-autosuggest-panel/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component-autosuggest-panel", - "version": "2.0.4", + "version": "2.0.5", "description": "digitransit-component autosuggest-panel module", "main": "index.js", "files": [ @@ -28,8 +28,8 @@ "author": "Digitransit Authors", "license": "(AGPL-3.0 OR EUPL-1.2)", "peerDependencies": { - "@digitransit-component/digitransit-component-autosuggest": "^1.9.8", - "@digitransit-component/digitransit-component-icon": "^0.2.1", + "@digitransit-component/digitransit-component-autosuggest": "^1.9.9", + "@digitransit-component/digitransit-component-icon": "^0.2.2", "@hsl-fi/sass": "^0.2.0", "classnames": "2.2.6", "i18next": "^19.3.3", diff --git a/digitransit-component/packages/digitransit-component-autosuggest/package.json b/digitransit-component/packages/digitransit-component-autosuggest/package.json index d38027be71..ef00071c76 100644 --- a/digitransit-component/packages/digitransit-component-autosuggest/package.json +++ b/digitransit-component/packages/digitransit-component-autosuggest/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component-autosuggest", - "version": "1.9.8", + "version": "1.9.9", "description": "digitransit-component autosuggest module", "main": "index.js", "files": [ @@ -36,8 +36,8 @@ }, "peerDependencies": { "@digitransit-component/digitransit-component-dialog-modal": "^0.3.4", - "@digitransit-component/digitransit-component-icon": "^0.2.1", - "@digitransit-component/digitransit-component-suggestion-item": "^1.1.2", + "@digitransit-component/digitransit-component-icon": "^0.2.2", + "@digitransit-component/digitransit-component-suggestion-item": "^1.1.3", "@hsl-fi/sass": "^0.2.0", "classnames": "2.2.6", "i18next": "^19.3.3", diff --git a/digitransit-component/packages/digitransit-component-control-panel/package.json b/digitransit-component/packages/digitransit-component-control-panel/package.json index 335af701e2..da3041cba8 100644 --- a/digitransit-component/packages/digitransit-component-control-panel/package.json +++ b/digitransit-component/packages/digitransit-component-control-panel/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component-control-panel", - "version": "1.1.2", + "version": "1.1.3", "description": "digitransit-component control-panel module", "main": "index.js", "files": [ @@ -29,7 +29,7 @@ "author": "Digitransit Authors", "license": "(AGPL-3.0 OR EUPL-1.2)", "peerDependencies": { - "@digitransit-component/digitransit-component-icon": "^0.2.1", + "@digitransit-component/digitransit-component-icon": "^0.2.2", "@hsl-fi/sass": "~0.2.0", "classnames": "2.2.6", "i18next": "^19.3.3", diff --git a/digitransit-component/packages/digitransit-component-datetimepicker/package.json b/digitransit-component/packages/digitransit-component-datetimepicker/package.json index 10859e9a1b..dd9cdae5de 100644 --- a/digitransit-component/packages/digitransit-component-datetimepicker/package.json +++ b/digitransit-component/packages/digitransit-component-datetimepicker/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component-datetimepicker", - "version": "0.7.3", + "version": "0.7.4", "description": "digitransit-component datetimepicker module", "main": "index.js", "files": [ @@ -29,7 +29,7 @@ "author": "Digitransit Authors", "license": "(AGPL-3.0 OR EUPL-1.2)", "peerDependencies": { - "@digitransit-component/digitransit-component-icon": "^0.2.1", + "@digitransit-component/digitransit-component-icon": "^0.2.2", "i18next": "^19.3.3", "lodash": "4.17.21", "lodash-es": "4.17.21", diff --git a/digitransit-component/packages/digitransit-component-favourite-bar/package.json b/digitransit-component/packages/digitransit-component-favourite-bar/package.json index 40079f90c5..9ef7dcb1b2 100644 --- a/digitransit-component/packages/digitransit-component-favourite-bar/package.json +++ b/digitransit-component/packages/digitransit-component-favourite-bar/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component-favourite-bar", - "version": "1.1.2", + "version": "1.1.3", "description": "digitransit-component favourite-bar module", "main": "index.js", "files": [ @@ -32,8 +32,8 @@ "@digitransit-search-util/digitransit-search-util-uniq-by-label": "^1.1.0" }, "peerDependencies": { - "@digitransit-component/digitransit-component-icon": "^0.2.1", - "@digitransit-component/digitransit-component-suggestion-item": "^1.1.2", + "@digitransit-component/digitransit-component-icon": "^0.2.2", + "@digitransit-component/digitransit-component-suggestion-item": "^1.1.3", "@hsl-fi/sass": "^0.2.0", "@hsl-fi/shimmer": "0.1.2", "classnames": "2.2.6", diff --git a/digitransit-component/packages/digitransit-component-favourite-editing-modal/package.json b/digitransit-component/packages/digitransit-component-favourite-editing-modal/package.json index ddb8868f52..718ab9a7fb 100644 --- a/digitransit-component/packages/digitransit-component-favourite-editing-modal/package.json +++ b/digitransit-component/packages/digitransit-component-favourite-editing-modal/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component-favourite-editing-modal", - "version": "1.1.3", + "version": "1.1.4", "description": "digitransit-component favourite-editing-modal module", "main": "index.js", "files": [ @@ -33,7 +33,7 @@ }, "peerDependencies": { "@digitransit-component/digitransit-component-dialog-modal": "^0.3.4", - "@digitransit-component/digitransit-component-icon": "^0.2.1", + "@digitransit-component/digitransit-component-icon": "^0.2.2", "@hsl-fi/container-spinner": "0.3.1", "@hsl-fi/modal": "^0.3.1", "@hsl-fi/sass": "^0.2.0", diff --git a/digitransit-component/packages/digitransit-component-favourite-modal/package.json b/digitransit-component/packages/digitransit-component-favourite-modal/package.json index 7e37d50279..06cee5f1f6 100644 --- a/digitransit-component/packages/digitransit-component-favourite-modal/package.json +++ b/digitransit-component/packages/digitransit-component-favourite-modal/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component-favourite-modal", - "version": "1.0.1", + "version": "1.0.2", "description": "digitransit-component favourite-modal module", "main": "index.js", "files": [ @@ -29,7 +29,7 @@ "author": "Digitransit Authors", "license": "(AGPL-3.0 OR EUPL-1.2)", "peerDependencies": { - "@digitransit-component/digitransit-component-icon": "^0.2.1", + "@digitransit-component/digitransit-component-icon": "^0.2.2", "@hsl-fi/modal": "^0.3.1", "@hsl-fi/sass": "^0.2.0", "classnames": "2.2.6", diff --git a/digitransit-component/packages/digitransit-component-icon/package.json b/digitransit-component/packages/digitransit-component-icon/package.json index 9736ccb67e..f2bd24c408 100644 --- a/digitransit-component/packages/digitransit-component-icon/package.json +++ b/digitransit-component/packages/digitransit-component-icon/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component-icon", - "version": "0.2.1", + "version": "0.2.2", "description": "digitransit-component icon module", "main": "index.js", "files": [ diff --git a/digitransit-component/packages/digitransit-component-icon/src/assets/bus-local.svg b/digitransit-component/packages/digitransit-component-icon/src/assets/bus-local.svg index 8ea23c23ff..b204cee924 100644 --- a/digitransit-component/packages/digitransit-component-icon/src/assets/bus-local.svg +++ b/digitransit-component/packages/digitransit-component-icon/src/assets/bus-local.svg @@ -1,11 +1,4 @@ - - - - - - - diff --git a/digitransit-component/packages/digitransit-component-icon/src/assets/search-tram-local-stop-default.svg b/digitransit-component/packages/digitransit-component-icon/src/assets/search-tram-local-stop-default.svg new file mode 100644 index 0000000000..9b05561f12 --- /dev/null +++ b/digitransit-component/packages/digitransit-component-icon/src/assets/search-tram-local-stop-default.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/digitransit-component/packages/digitransit-component-icon/src/assets/tram-local.svg b/digitransit-component/packages/digitransit-component-icon/src/assets/tram-local.svg new file mode 100644 index 0000000000..26016acd11 --- /dev/null +++ b/digitransit-component/packages/digitransit-component-icon/src/assets/tram-local.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/digitransit-component/packages/digitransit-component-icon/src/index.js b/digitransit-component/packages/digitransit-component-icon/src/index.js index 88c9f53050..9221daed88 100644 --- a/digitransit-component/packages/digitransit-component-icon/src/index.js +++ b/digitransit-component/packages/digitransit-component-icon/src/index.js @@ -39,6 +39,7 @@ import CautionWhite from './assets/caution_white_exclamation.svg'; import Trash from './assets/trash.svg'; import ModeBus from './assets/mode_bus.svg'; import ModeBusExpress from './assets/bus-express.svg'; +import ModeTramLocal from './assets/tram-local.svg'; import ModeBusLocal from './assets/bus-local.svg'; import ModeRail from './assets/mode_rail.svg'; import ModeTram from './assets/mode_tram.svg'; @@ -59,6 +60,7 @@ import TramWaltti from './assets/tram-waltti.svg'; import Check from './assets/check.svg'; import SearchBusStopDefault from './assets/search-bus-stop-default.svg'; import SearchBusStopExpressDefault from './assets/search-bus-stop-express-default.svg'; +import SearchTramLocalStopDefault from './assets/search-tram-local-stop-default.svg'; import SearchRailStopDefault from './assets/search-rail-stop-default.svg'; import SearchFerryDefault from './assets/search-ferry-default.svg'; import SearchFerryStopDefault from './assets/search-ferry-stop-default.svg'; @@ -122,6 +124,7 @@ const IconMap = style => { 'mode-bus': , 'mode-bus-express': , 'mode-bus-local': , + 'mode-tram-local': , 'mode-rail': , 'mode-tram': , 'mode-subway': , @@ -148,6 +151,9 @@ const IconMap = style => { 'search-bus-stop-express-default': ( ), + 'search-tram-local-stop-default': ( + + ), 'search-rail-stop-default': , 'search-ferry-default': , 'search-ferry-stop-default': , diff --git a/digitransit-component/packages/digitransit-component-suggestion-item/package.json b/digitransit-component/packages/digitransit-component-suggestion-item/package.json index d846fbbb30..1530cec033 100644 --- a/digitransit-component/packages/digitransit-component-suggestion-item/package.json +++ b/digitransit-component/packages/digitransit-component-suggestion-item/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component-suggestion-item", - "version": "1.1.2", + "version": "1.1.3", "description": "digitransit-component suggestion-item module", "main": "index.js", "files": [ @@ -32,7 +32,7 @@ "recompose": "0.30.0" }, "peerDependencies": { - "@digitransit-component/digitransit-component-icon": "^0.2.1", + "@digitransit-component/digitransit-component-icon": "^0.2.2", "@hsl-fi/sass": " ^0.2.0", "classnames": "2.2.6", "i18next": "^19.3.3", diff --git a/digitransit-component/packages/digitransit-component-suggestion-item/src/index.js b/digitransit-component/packages/digitransit-component-suggestion-item/src/index.js index b53180fa8b..e62fac3acb 100644 --- a/digitransit-component/packages/digitransit-component-suggestion-item/src/index.js +++ b/digitransit-component/packages/digitransit-component-suggestion-item/src/index.js @@ -8,6 +8,7 @@ import styles from './helpers/styles.scss'; const BUS_EXPRESS = 702; const BUS_LOCAL = 704; +const TRAM_LOCAL = 902; const getRouteMode = props => { switch (props.type) { @@ -15,6 +16,8 @@ const getRouteMode = props => { return 'bus-local'; case BUS_EXPRESS: return 'bus-express'; + case TRAM_LOCAL: + return 'tram-local'; default: return props?.mode?.toLowerCase() || 'bus'; } @@ -124,6 +127,10 @@ function getIconProperties( 'BUS-EXPRESS-default', { icon: 'search-bus-stop-express-default', color: 'mode-bus-express' }, ], + [ + 'TRAM-LOCAL-default', + { icon: 'search-tram-local-stop-default', color: 'mode-tram-local' }, + ], [ 'BUS-digitransit', { icon: 'search-bus-stop-digitransit', color: 'mode-bus' }, @@ -201,6 +208,8 @@ function getIconProperties( } } else if (modes.includes('BUS-EXPRESS') && modeSet === 'default') { iconStr = [layerIcon.get('BUS-EXPRESS'.concat('-').concat(modeSet))]; + } else if (modes.includes('TRAM-LOCAL') && modeSet === 'default') { + iconStr = [layerIcon.get('TRAM-LOCAL'.concat('-').concat(modeSet))]; } else { iconStr = [layerIcon.get(mode.concat('-').concat(modeSet))]; } diff --git a/digitransit-component/packages/digitransit-component-traffic-now-link/package.json b/digitransit-component/packages/digitransit-component-traffic-now-link/package.json index a287079c18..a376753957 100644 --- a/digitransit-component/packages/digitransit-component-traffic-now-link/package.json +++ b/digitransit-component/packages/digitransit-component-traffic-now-link/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component-traffic-now-link", - "version": "0.2.1", + "version": "0.2.2", "description": "digitransit-component traffic-now-link module", "main": "index.js", "files": [ @@ -29,7 +29,7 @@ "author": "Digitransit Authors", "license": "(AGPL-3.0 OR EUPL-1.2)", "peerDependencies": { - "@digitransit-component/digitransit-component-icon": "^0.2.1", + "@digitransit-component/digitransit-component-icon": "^0.2.2", "@hsl-fi/sass": "^0.2.0", "i18next": "^19.3.3", "prop-types": "^15.7.2", diff --git a/digitransit-component/packages/digitransit-component/package.json b/digitransit-component/packages/digitransit-component/package.json index 82146ecdb3..b6f508cb4f 100644 --- a/digitransit-component/packages/digitransit-component/package.json +++ b/digitransit-component/packages/digitransit-component/package.json @@ -1,6 +1,6 @@ { "name": "@digitransit-component/digitransit-component", - "version": "1.2.7", + "version": "1.2.8", "description": "a JavaScript library for Digitransit", "main": "digitransit-component", "module": "digitransit-component.mjs", @@ -14,14 +14,14 @@ "docs": "node -r esm ../../scripts/generate-readmes" }, "dependencies": { - "@digitransit-component/digitransit-component-autosuggest": "^1.9.8", - "@digitransit-component/digitransit-component-autosuggest-panel": "^2.0.4", - "@digitransit-component/digitransit-component-control-panel": "^1.1.2", - "@digitransit-component/digitransit-component-favourite-bar": "1.1.2", - "@digitransit-component/digitransit-component-favourite-editing-modal": "^1.1.3", - "@digitransit-component/digitransit-component-favourite-modal": "^1.0.1", - "@digitransit-component/digitransit-component-icon": "^0.2.1", - "@digitransit-component/digitransit-component-suggestion-item": "^1.1.2", + "@digitransit-component/digitransit-component-autosuggest": "^1.9.9", + "@digitransit-component/digitransit-component-autosuggest-panel": "^2.0.5", + "@digitransit-component/digitransit-component-control-panel": "^1.1.3", + "@digitransit-component/digitransit-component-favourite-bar": "1.1.3", + "@digitransit-component/digitransit-component-favourite-editing-modal": "^1.1.4", + "@digitransit-component/digitransit-component-favourite-modal": "^1.0.2", + "@digitransit-component/digitransit-component-icon": "^0.2.2", + "@digitransit-component/digitransit-component-suggestion-item": "^1.1.3", "@digitransit-component/digitransit-component-with-breakpoint": "^0.0.5" }, "peerDependencies": { diff --git a/sass/base/_helper-classes.scss b/sass/base/_helper-classes.scss index 9e555d0822..bc77890d61 100644 --- a/sass/base/_helper-classes.scss +++ b/sass/base/_helper-classes.scss @@ -16,6 +16,9 @@ .bus-express { color: $bus-express-color; } +.tram-local { + color: $tram-local-color; +} .map .call { color: $white; } diff --git a/sass/themes/default/_theme.scss b/sass/themes/default/_theme.scss index f2f06be16a..e8ae685138 100644 --- a/sass/themes/default/_theme.scss +++ b/sass/themes/default/_theme.scss @@ -64,6 +64,7 @@ $nav-content-color: false; $airplane-color: $livi-airplane-blue; $bus-color: $livi-bus-blue; $bus-express-color: $livi-bus-blue; +$tram-local-color: $livi-tram-green; $tram-color: $livi-tram-green; $metro-color: $livi-subway-orange; $rail-color: $livi-rail-purple; diff --git a/sass/themes/hsl/_theme.scss b/sass/themes/hsl/_theme.scss index 9465796986..cbca2ecc37 100644 --- a/sass/themes/hsl/_theme.scss +++ b/sass/themes/hsl/_theme.scss @@ -36,6 +36,7 @@ $top-bar-color: $primary-color; $airplane-color: #0046ad; $bus-color: $hsl-blue; $bus-express-color: $hsl-bus-express; +$tram-local-color: #007E79; $tram-color: $hsl-tram-green; $metro-color: $hsl-metro-orange; $rail-color: $hsl-rail-red; diff --git a/sass/themes/matka/_theme.scss b/sass/themes/matka/_theme.scss index b4a43fb3db..9c7aafe38d 100644 --- a/sass/themes/matka/_theme.scss +++ b/sass/themes/matka/_theme.scss @@ -24,6 +24,7 @@ $button-font-family: 'Montserrat', Arial, Georgia, sans-serif; $bus-color: #007ac9; $airplane-color: #0046ad; $tram-color: #5E7921; +$tram-local-color: #5E7921; $metro-color: #CA4000; $rail-color: #8c4799; $ferry-color: #247C7B; diff --git a/static/assets/svg-sprite.default.svg b/static/assets/svg-sprite.default.svg index f7445300df..0223dc3d0c 100644 --- a/static/assets/svg-sprite.default.svg +++ b/static/assets/svg-sprite.default.svg @@ -201,6 +201,19 @@ + + + + + + + + + + + + + @@ -417,6 +430,10 @@ + + + + @@ -1147,6 +1164,19 @@ + + + + + + + + + + + + + icon-stop-hsl_ferry-small diff --git a/static/assets/svg-sprite.hsl.svg b/static/assets/svg-sprite.hsl.svg index f76807fe45..3a2d6c993d 100644 --- a/static/assets/svg-sprite.hsl.svg +++ b/static/assets/svg-sprite.hsl.svg @@ -89,15 +89,12 @@ - - - - - - - + + + + @@ -159,6 +156,12 @@ + + + + + + @@ -1146,6 +1149,12 @@ + + + + + + diff --git a/yarn.lock b/yarn.lock index d8d7c7743f..9c951bb2ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1826,12 +1826,12 @@ __metadata: languageName: unknown linkType: soft -"@digitransit-component/digitransit-component-autosuggest-panel@^2.0.4, @digitransit-component/digitransit-component-autosuggest-panel@workspace:digitransit-component/packages/digitransit-component-autosuggest-panel": +"@digitransit-component/digitransit-component-autosuggest-panel@^2.0.5, @digitransit-component/digitransit-component-autosuggest-panel@workspace:digitransit-component/packages/digitransit-component-autosuggest-panel": version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component-autosuggest-panel@workspace:digitransit-component/packages/digitransit-component-autosuggest-panel" peerDependencies: - "@digitransit-component/digitransit-component-autosuggest": ^1.9.8 - "@digitransit-component/digitransit-component-icon": ^0.2.1 + "@digitransit-component/digitransit-component-autosuggest": ^1.9.9 + "@digitransit-component/digitransit-component-icon": ^0.2.2 "@hsl-fi/sass": ^0.2.0 classnames: 2.2.6 i18next: ^19.3.3 @@ -1846,7 +1846,7 @@ __metadata: languageName: unknown linkType: soft -"@digitransit-component/digitransit-component-autosuggest@^1.9.8, @digitransit-component/digitransit-component-autosuggest@workspace:digitransit-component/packages/digitransit-component-autosuggest": +"@digitransit-component/digitransit-component-autosuggest@^1.9.9, @digitransit-component/digitransit-component-autosuggest@workspace:digitransit-component/packages/digitransit-component-autosuggest": version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component-autosuggest@workspace:digitransit-component/packages/digitransit-component-autosuggest" dependencies: @@ -1856,8 +1856,8 @@ __metadata: "@hsl-fi/hooks": ^1.2.0 peerDependencies: "@digitransit-component/digitransit-component-dialog-modal": ^0.3.4 - "@digitransit-component/digitransit-component-icon": ^0.2.1 - "@digitransit-component/digitransit-component-suggestion-item": ^1.1.2 + "@digitransit-component/digitransit-component-icon": ^0.2.2 + "@digitransit-component/digitransit-component-suggestion-item": ^1.1.3 "@hsl-fi/sass": ^0.2.0 classnames: 2.2.6 i18next: ^19.3.3 @@ -1871,11 +1871,11 @@ __metadata: languageName: unknown linkType: soft -"@digitransit-component/digitransit-component-control-panel@^1.1.2, @digitransit-component/digitransit-component-control-panel@workspace:digitransit-component/packages/digitransit-component-control-panel": +"@digitransit-component/digitransit-component-control-panel@^1.1.3, @digitransit-component/digitransit-component-control-panel@workspace:digitransit-component/packages/digitransit-component-control-panel": version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component-control-panel@workspace:digitransit-component/packages/digitransit-component-control-panel" peerDependencies: - "@digitransit-component/digitransit-component-icon": ^0.2.1 + "@digitransit-component/digitransit-component-icon": ^0.2.2 "@hsl-fi/sass": ~0.2.0 classnames: 2.2.6 i18next: ^19.3.3 @@ -1889,7 +1889,7 @@ __metadata: version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component-datetimepicker@workspace:digitransit-component/packages/digitransit-component-datetimepicker" peerDependencies: - "@digitransit-component/digitransit-component-icon": ^0.2.1 + "@digitransit-component/digitransit-component-icon": ^0.2.2 i18next: ^19.3.3 lodash: 4.17.21 lodash-es: 4.17.21 @@ -1917,14 +1917,14 @@ __metadata: languageName: unknown linkType: soft -"@digitransit-component/digitransit-component-favourite-bar@1.1.2, @digitransit-component/digitransit-component-favourite-bar@workspace:digitransit-component/packages/digitransit-component-favourite-bar": +"@digitransit-component/digitransit-component-favourite-bar@1.1.3, @digitransit-component/digitransit-component-favourite-bar@workspace:digitransit-component/packages/digitransit-component-favourite-bar": version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component-favourite-bar@workspace:digitransit-component/packages/digitransit-component-favourite-bar" dependencies: "@digitransit-search-util/digitransit-search-util-uniq-by-label": ^1.1.0 peerDependencies: - "@digitransit-component/digitransit-component-icon": ^0.2.1 - "@digitransit-component/digitransit-component-suggestion-item": ^1.1.2 + "@digitransit-component/digitransit-component-icon": ^0.2.2 + "@digitransit-component/digitransit-component-suggestion-item": ^1.1.3 "@hsl-fi/sass": ^0.2.0 "@hsl-fi/shimmer": 0.1.2 classnames: 2.2.6 @@ -1936,14 +1936,14 @@ __metadata: languageName: unknown linkType: soft -"@digitransit-component/digitransit-component-favourite-editing-modal@^1.1.3, @digitransit-component/digitransit-component-favourite-editing-modal@workspace:digitransit-component/packages/digitransit-component-favourite-editing-modal": +"@digitransit-component/digitransit-component-favourite-editing-modal@^1.1.4, @digitransit-component/digitransit-component-favourite-editing-modal@workspace:digitransit-component/packages/digitransit-component-favourite-editing-modal": version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component-favourite-editing-modal@workspace:digitransit-component/packages/digitransit-component-favourite-editing-modal" dependencies: "@digitransit-search-util/digitransit-search-util-uniq-by-label": ^1.1.0 peerDependencies: "@digitransit-component/digitransit-component-dialog-modal": ^0.3.4 - "@digitransit-component/digitransit-component-icon": ^0.2.1 + "@digitransit-component/digitransit-component-icon": ^0.2.2 "@hsl-fi/container-spinner": 0.3.1 "@hsl-fi/modal": ^0.3.1 "@hsl-fi/sass": ^0.2.0 @@ -1954,11 +1954,11 @@ __metadata: languageName: unknown linkType: soft -"@digitransit-component/digitransit-component-favourite-modal@^1.0.1, @digitransit-component/digitransit-component-favourite-modal@workspace:digitransit-component/packages/digitransit-component-favourite-modal": +"@digitransit-component/digitransit-component-favourite-modal@^1.0.2, @digitransit-component/digitransit-component-favourite-modal@workspace:digitransit-component/packages/digitransit-component-favourite-modal": version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component-favourite-modal@workspace:digitransit-component/packages/digitransit-component-favourite-modal" peerDependencies: - "@digitransit-component/digitransit-component-icon": ^0.2.1 + "@digitransit-component/digitransit-component-icon": ^0.2.2 "@hsl-fi/modal": ^0.3.1 "@hsl-fi/sass": ^0.2.0 classnames: 2.2.6 @@ -1970,7 +1970,7 @@ __metadata: languageName: unknown linkType: soft -"@digitransit-component/digitransit-component-icon@^0.2.1, @digitransit-component/digitransit-component-icon@workspace:digitransit-component/packages/digitransit-component-icon": +"@digitransit-component/digitransit-component-icon@^0.2.2, @digitransit-component/digitransit-component-icon@workspace:digitransit-component/packages/digitransit-component-icon": version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component-icon@workspace:digitransit-component/packages/digitransit-component-icon" peerDependencies: @@ -1980,13 +1980,13 @@ __metadata: languageName: unknown linkType: soft -"@digitransit-component/digitransit-component-suggestion-item@^1.1.2, @digitransit-component/digitransit-component-suggestion-item@workspace:digitransit-component/packages/digitransit-component-suggestion-item": +"@digitransit-component/digitransit-component-suggestion-item@^1.1.3, @digitransit-component/digitransit-component-suggestion-item@workspace:digitransit-component/packages/digitransit-component-suggestion-item": version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component-suggestion-item@workspace:digitransit-component/packages/digitransit-component-suggestion-item" dependencies: recompose: 0.30.0 peerDependencies: - "@digitransit-component/digitransit-component-icon": ^0.2.1 + "@digitransit-component/digitransit-component-icon": ^0.2.2 "@hsl-fi/sass": " ^0.2.0" classnames: 2.2.6 i18next: ^19.3.3 @@ -1999,7 +1999,7 @@ __metadata: version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component-traffic-now-link@workspace:digitransit-component/packages/digitransit-component-traffic-now-link" peerDependencies: - "@digitransit-component/digitransit-component-icon": ^0.2.1 + "@digitransit-component/digitransit-component-icon": ^0.2.2 "@hsl-fi/sass": ^0.2.0 i18next: ^19.3.3 prop-types: ^15.7.2 @@ -2023,14 +2023,14 @@ __metadata: version: 0.0.0-use.local resolution: "@digitransit-component/digitransit-component@workspace:digitransit-component/packages/digitransit-component" dependencies: - "@digitransit-component/digitransit-component-autosuggest": ^1.9.8 - "@digitransit-component/digitransit-component-autosuggest-panel": ^2.0.4 - "@digitransit-component/digitransit-component-control-panel": ^1.1.2 - "@digitransit-component/digitransit-component-favourite-bar": 1.1.2 - "@digitransit-component/digitransit-component-favourite-editing-modal": ^1.1.3 - "@digitransit-component/digitransit-component-favourite-modal": ^1.0.1 - "@digitransit-component/digitransit-component-icon": ^0.2.1 - "@digitransit-component/digitransit-component-suggestion-item": ^1.1.2 + "@digitransit-component/digitransit-component-autosuggest": ^1.9.9 + "@digitransit-component/digitransit-component-autosuggest-panel": ^2.0.5 + "@digitransit-component/digitransit-component-control-panel": ^1.1.3 + "@digitransit-component/digitransit-component-favourite-bar": 1.1.3 + "@digitransit-component/digitransit-component-favourite-editing-modal": ^1.1.4 + "@digitransit-component/digitransit-component-favourite-modal": ^1.0.2 + "@digitransit-component/digitransit-component-icon": ^0.2.2 + "@digitransit-component/digitransit-component-suggestion-item": ^1.1.3 "@digitransit-component/digitransit-component-with-breakpoint": ^0.0.5 peerDependencies: "@digitransit-component/digitransit-component-dialog-modal": ^0.3.4