@opentripplanner/trip-details 1.6.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mocks__/custom-messages.yml +7 -0
- package/esm/index.js +215 -140
- package/esm/index.js.map +1 -1
- package/esm/styled.js +30 -18
- package/esm/styled.js.map +1 -1
- package/esm/trip-detail.js +0 -9
- package/esm/trip-detail.js.map +1 -1
- package/esm/types.js +2 -0
- package/esm/types.js.map +1 -0
- package/i18n/en-US.yml +43 -0
- package/i18n/fr.yml +31 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +204 -131
- package/lib/index.js.map +1 -1
- package/lib/styled.d.ts +23 -0
- package/lib/styled.d.ts.map +1 -0
- package/lib/styled.js +40 -19
- package/lib/styled.js.map +1 -1
- package/lib/trip-detail.d.ts +18 -0
- package/lib/trip-detail.d.ts.map +1 -0
- package/lib/trip-detail.js +0 -12
- package/lib/trip-detail.js.map +1 -1
- package/lib/types.d.ts +62 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/package.json +10 -7
- package/src/TripDetails.story.tsx +315 -0
- package/src/__unpublished__/external-types.d.ts +22 -0
- package/src/__unpublished__/messages.d.ts +2 -0
- package/src/index.tsx +402 -0
- package/src/{styled.js → styled.ts} +6 -0
- package/src/{trip-detail.js → trip-detail.tsx} +17 -18
- package/src/types.ts +69 -0
- package/tsconfig.json +15 -0
- package/tsconfig.tsbuildinfo +4496 -0
- package/src/TripDetails.story.js +0 -155
- package/src/index.js +0 -324
package/esm/styled.js
CHANGED
|
@@ -1,76 +1,88 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
var BaseButton = styled.button.withConfig({
|
|
3
3
|
displayName: "styled__BaseButton",
|
|
4
|
-
componentId: "
|
|
4
|
+
componentId: "sc-6q2ok2-0"
|
|
5
5
|
})(["background:transparent;border:0;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;line-height:1.42857143;margin:0;padding:0;text-decoration:none;touch-action:manipulation;user-select:none;vertical-align:middle;white-space:nowrap;"]);
|
|
6
6
|
export var CaloriesDescription = styled.span.withConfig({
|
|
7
7
|
displayName: "styled__CaloriesDescription",
|
|
8
|
-
componentId: "
|
|
8
|
+
componentId: "sc-6q2ok2-1"
|
|
9
9
|
})([""]);
|
|
10
10
|
export var CaloriesSummary = styled.span.withConfig({
|
|
11
11
|
displayName: "styled__CaloriesSummary",
|
|
12
|
-
componentId: "
|
|
12
|
+
componentId: "sc-6q2ok2-2"
|
|
13
13
|
})([""]);
|
|
14
14
|
export var ExpandButton = styled(BaseButton).attrs({
|
|
15
15
|
"aria-label": "What does this mean?"
|
|
16
16
|
}).withConfig({
|
|
17
17
|
displayName: "styled__ExpandButton",
|
|
18
|
-
componentId: "
|
|
18
|
+
componentId: "sc-6q2ok2-3"
|
|
19
19
|
})(["color:#00f;font-size:16px;margin-left:6px;margin-top:-2px;"]);
|
|
20
20
|
export var Fare = styled.span.withConfig({
|
|
21
21
|
displayName: "styled__Fare",
|
|
22
|
-
componentId: "
|
|
22
|
+
componentId: "sc-6q2ok2-4"
|
|
23
23
|
})([""]);
|
|
24
24
|
export var HideButton = styled(BaseButton).withConfig({
|
|
25
25
|
displayName: "styled__HideButton",
|
|
26
|
-
componentId: "
|
|
26
|
+
componentId: "sc-6q2ok2-5"
|
|
27
27
|
})(["float:right;"]);
|
|
28
28
|
export var TNCFare = styled.span.withConfig({
|
|
29
29
|
displayName: "styled__TNCFare",
|
|
30
|
-
componentId: "
|
|
30
|
+
componentId: "sc-6q2ok2-6"
|
|
31
31
|
})([""]);
|
|
32
32
|
export var TNCFareCompanies = styled.span.withConfig({
|
|
33
33
|
displayName: "styled__TNCFareCompanies",
|
|
34
|
-
componentId: "
|
|
34
|
+
componentId: "sc-6q2ok2-7"
|
|
35
35
|
})(["text-transform:capitalize;"]);
|
|
36
36
|
export var Timing = styled.span.withConfig({
|
|
37
37
|
displayName: "styled__Timing",
|
|
38
|
-
componentId: "
|
|
38
|
+
componentId: "sc-6q2ok2-8"
|
|
39
39
|
})([""]);
|
|
40
40
|
export var TransitFare = styled.details.withConfig({
|
|
41
41
|
displayName: "styled__TransitFare",
|
|
42
|
-
componentId: "
|
|
42
|
+
componentId: "sc-6q2ok2-9"
|
|
43
43
|
})(["display:inline-block;> span{display:block;padding-left:1.75ch;}"]);
|
|
44
44
|
export var TransitFareSingle = styled.span.withConfig({
|
|
45
45
|
displayName: "styled__TransitFareSingle",
|
|
46
|
-
componentId: "
|
|
46
|
+
componentId: "sc-6q2ok2-10"
|
|
47
|
+
})([""]);
|
|
48
|
+
export var FlexSummary = styled.span.withConfig({
|
|
49
|
+
displayName: "styled__FlexSummary",
|
|
50
|
+
componentId: "sc-6q2ok2-11"
|
|
51
|
+
})([""]);
|
|
52
|
+
export var FlexPickupSummary = styled.span.withConfig({
|
|
53
|
+
displayName: "styled__FlexPickupSummary",
|
|
54
|
+
componentId: "sc-6q2ok2-12"
|
|
55
|
+
})([""]);
|
|
56
|
+
export var FlexDropOffSummary = styled.span.withConfig({
|
|
57
|
+
displayName: "styled__FlexDropOffSummary",
|
|
58
|
+
componentId: "sc-6q2ok2-13"
|
|
47
59
|
})([""]);
|
|
48
60
|
export var TripDetail = styled.div.withConfig({
|
|
49
61
|
displayName: "styled__TripDetail",
|
|
50
|
-
componentId: "
|
|
62
|
+
componentId: "sc-6q2ok2-14"
|
|
51
63
|
})(["margin-top:6px;"]);
|
|
52
64
|
export var TripDetailDescription = styled.div.withConfig({
|
|
53
65
|
displayName: "styled__TripDetailDescription",
|
|
54
|
-
componentId: "
|
|
66
|
+
componentId: "sc-6q2ok2-15"
|
|
55
67
|
})(["background-color:#fff;border:1px solid #888;font-size:12px;margin-top:2px;padding:8px;"]);
|
|
56
68
|
export var TripDetailIcon = styled.div.withConfig({
|
|
57
69
|
displayName: "styled__TripDetailIcon",
|
|
58
|
-
componentId: "
|
|
70
|
+
componentId: "sc-6q2ok2-16"
|
|
59
71
|
})(["float:left;font-size:17px;"]);
|
|
60
72
|
export var TripDetails = styled.div.withConfig({
|
|
61
73
|
displayName: "styled__TripDetails",
|
|
62
|
-
componentId: "
|
|
74
|
+
componentId: "sc-6q2ok2-17"
|
|
63
75
|
})(["background-color:#eee;border-radius:6px;margin-bottom:15px;margin-top:16px;padding:10px 16px;"]);
|
|
64
76
|
export var TripDetailsBody = styled.div.withConfig({
|
|
65
77
|
displayName: "styled__TripDetailsBody",
|
|
66
|
-
componentId: "
|
|
78
|
+
componentId: "sc-6q2ok2-18"
|
|
67
79
|
})([""]);
|
|
68
80
|
export var TripDetailsHeader = styled.div.withConfig({
|
|
69
81
|
displayName: "styled__TripDetailsHeader",
|
|
70
|
-
componentId: "
|
|
82
|
+
componentId: "sc-6q2ok2-19"
|
|
71
83
|
})(["font-size:18px;font-weight:600;"]);
|
|
72
84
|
export var TripDetailSummary = styled.div.withConfig({
|
|
73
85
|
displayName: "styled__TripDetailSummary",
|
|
74
|
-
componentId: "
|
|
86
|
+
componentId: "sc-6q2ok2-20"
|
|
75
87
|
})(["margin-left:28px;padding-top:2px;display:flex;align-items:baseline;"]);
|
|
76
88
|
//# sourceMappingURL=styled.js.map
|
package/esm/styled.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/styled.
|
|
1
|
+
{"version":3,"sources":["../src/styled.ts"],"names":["styled","BaseButton","button","CaloriesDescription","span","CaloriesSummary","ExpandButton","attrs","Fare","HideButton","TNCFare","TNCFareCompanies","Timing","TransitFare","details","TransitFareSingle","FlexSummary","FlexPickupSummary","FlexDropOffSummary","TripDetail","div","TripDetailDescription","TripDetailIcon","TripDetails","TripDetailsBody","TripDetailsHeader","TripDetailSummary"],"mappings":"AAAA,OAAOA,MAAP,MAAmB,mBAAnB;AAEA,IAAMC,UAAU,GAAGD,MAAM,CAACE,MAAV;AAAA;AAAA;AAAA,8PAAhB;AAiBA,OAAO,IAAMC,mBAAmB,GAAGH,MAAM,CAACI,IAAV;AAAA;AAAA;AAAA,QAAzB;AAEP,OAAO,IAAMC,eAAe,GAAGL,MAAM,CAACI,IAAV;AAAA;AAAA;AAAA,QAArB;AAEP,OAAO,IAAME,YAAY,GAAGN,MAAM,CAACC,UAAD,CAAN,CAAmBM,KAAnB,CAAyB;AACnD,gBAAc;AADqC,CAAzB,CAAH;AAAA;AAAA;AAAA,kEAAlB;AASP,OAAO,IAAMC,IAAI,GAAGR,MAAM,CAACI,IAAV;AAAA;AAAA;AAAA,QAAV;AAEP,OAAO,IAAMK,UAAU,GAAGT,MAAM,CAACC,UAAD,CAAT;AAAA;AAAA;AAAA,oBAAhB;AAIP,OAAO,IAAMS,OAAO,GAAGV,MAAM,CAACI,IAAV;AAAA;AAAA;AAAA,QAAb;AAEP,OAAO,IAAMO,gBAAgB,GAAGX,MAAM,CAACI,IAAV;AAAA;AAAA;AAAA,kCAAtB;AAIP,OAAO,IAAMQ,MAAM,GAAGZ,MAAM,CAACI,IAAV;AAAA;AAAA;AAAA,QAAZ;AAEP,OAAO,IAAMS,WAAW,GAAGb,MAAM,CAACc,OAAV;AAAA;AAAA;AAAA,uEAAjB;AAUP,OAAO,IAAMC,iBAAiB,GAAGf,MAAM,CAACI,IAAV;AAAA;AAAA;AAAA,QAAvB;AAEP,OAAO,IAAMY,WAAW,GAAGhB,MAAM,CAACI,IAAV;AAAA;AAAA;AAAA,QAAjB;AAEP,OAAO,IAAMa,iBAAiB,GAAGjB,MAAM,CAACI,IAAV;AAAA;AAAA;AAAA,QAAvB;AAEP,OAAO,IAAMc,kBAAkB,GAAGlB,MAAM,CAACI,IAAV;AAAA;AAAA;AAAA,QAAxB;AAEP,OAAO,IAAMe,UAAU,GAAGnB,MAAM,CAACoB,GAAV;AAAA;AAAA;AAAA,uBAAhB;AAIP,OAAO,IAAMC,qBAAqB,GAAGrB,MAAM,CAACoB,GAAV;AAAA;AAAA;AAAA,8FAA3B;AAQP,OAAO,IAAME,cAAc,GAAGtB,MAAM,CAACoB,GAAV;AAAA;AAAA;AAAA,kCAApB;AAKP,OAAO,IAAMG,WAAW,GAAGvB,MAAM,CAACoB,GAAV;AAAA;AAAA;AAAA,qGAAjB;AAQP,OAAO,IAAMI,eAAe,GAAGxB,MAAM,CAACoB,GAAV;AAAA;AAAA;AAAA,QAArB;AAEP,OAAO,IAAMK,iBAAiB,GAAGzB,MAAM,CAACoB,GAAV;AAAA;AAAA;AAAA,uCAAvB;AAKP,OAAO,IAAMM,iBAAiB,GAAG1B,MAAM,CAACoB,GAAV;AAAA;AAAA;AAAA,2EAAvB","sourcesContent":["import styled from \"styled-components\";\n\nconst BaseButton = styled.button`\n background: transparent;\n border: 0;\n cursor: pointer;\n display: inline-block;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.42857143;\n margin: 0;\n padding: 0;\n text-decoration: none;\n touch-action: manipulation;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n`;\n\nexport const CaloriesDescription = styled.span``;\n\nexport const CaloriesSummary = styled.span``;\n\nexport const ExpandButton = styled(BaseButton).attrs({\n \"aria-label\": \"What does this mean?\"\n})`\n color: #00f;\n font-size: 16px;\n margin-left: 6px;\n margin-top: -2px;\n`;\n\nexport const Fare = styled.span``;\n\nexport const HideButton = styled(BaseButton)`\n float: right;\n`;\n\nexport const TNCFare = styled.span``;\n\nexport const TNCFareCompanies = styled.span`\n text-transform: capitalize;\n`;\n\nexport const Timing = styled.span``;\n\nexport const TransitFare = styled.details`\n display: inline-block;\n\n > span {\n display: block;\n /* This may seem wrong, but this value gives the most aligned results */\n /* see: https://github.com/opentripplanner/otp-ui/pull/294#discussion_r742045851 */\n padding-left: 1.75ch;\n }\n`;\nexport const TransitFareSingle = styled.span``;\n\nexport const FlexSummary = styled.span``;\n\nexport const FlexPickupSummary = styled.span``;\n\nexport const FlexDropOffSummary = styled.span``;\n\nexport const TripDetail = styled.div`\n margin-top: 6px;\n`;\n\nexport const TripDetailDescription = styled.div`\n background-color: #fff;\n border: 1px solid #888;\n font-size: 12px;\n margin-top: 2px;\n padding: 8px;\n`;\n\nexport const TripDetailIcon = styled.div`\n float: left;\n font-size: 17px;\n`;\n\nexport const TripDetails = styled.div`\n background-color: #eee;\n border-radius: 6px;\n margin-bottom: 15px;\n margin-top: 16px;\n padding: 10px 16px;\n`;\n\nexport const TripDetailsBody = styled.div``;\n\nexport const TripDetailsHeader = styled.div`\n font-size: 18px;\n font-weight: 600;\n`;\n\nexport const TripDetailSummary = styled.div`\n margin-left: 28px;\n padding-top: 2px;\n display: flex;\n align-items: baseline;\n`;\n"],"file":"styled.js"}
|
package/esm/trip-detail.js
CHANGED
|
@@ -8,7 +8,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
8
8
|
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
10
|
|
|
11
|
-
import PropTypes from "prop-types";
|
|
12
11
|
import React, { Component } from "react";
|
|
13
12
|
import { QuestionCircle } from "@styled-icons/fa-solid/QuestionCircle";
|
|
14
13
|
import { TimesCircle } from "@styled-icons/fa-solid/TimesCircle";
|
|
@@ -81,12 +80,4 @@ var TripDetail = /*#__PURE__*/function (_Component) {
|
|
|
81
80
|
}(Component);
|
|
82
81
|
|
|
83
82
|
export { TripDetail as default };
|
|
84
|
-
TripDetail.propTypes = {
|
|
85
|
-
icon: PropTypes.node.isRequired,
|
|
86
|
-
summary: PropTypes.node.isRequired,
|
|
87
|
-
description: PropTypes.node
|
|
88
|
-
};
|
|
89
|
-
TripDetail.defaultProps = {
|
|
90
|
-
description: undefined
|
|
91
|
-
};
|
|
92
83
|
//# sourceMappingURL=trip-detail.js.map
|
package/esm/trip-detail.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/trip-detail.
|
|
1
|
+
{"version":3,"sources":["../src/trip-detail.tsx"],"names":["React","Component","QuestionCircle","TimesCircle","VelocityTransitionGroup","S","TripDetail","props","toggle","expanded","state","onHideClick","onExpandClick","setState","icon","summary","description","animation"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAA+C,OAA/C;AACA,SAASC,cAAT,QAA+B,uCAA/B;AACA,SAASC,WAAT,QAA4B,oCAA5B;AACA,SAASC,uBAAT,QAAwC,gBAAxC;AAEA,OAAO,KAAKC,CAAZ,MAAmB,UAAnB;;IAYqBC,U;;;;;AACnB,sBAAYC,KAAZ,EAA0B;AAAA;;AAAA;;AACxB,8BAAMA,KAAN;;AADwB,UAO1BC,MAP0B,GAOjB,YAAY;AACnB,UAAQC,QAAR,GAAqB,MAAKC,KAA1B,CAAQD,QAAR;AACA,UAAIA,QAAJ,EAAc,MAAKE,WAAL,GAAd,KACK,MAAKC,aAAL;AACN,KAXyB;;AAAA,UAa1BA,aAb0B,GAaV,YAAY;AAC1B,YAAKC,QAAL,CAAc;AAAEJ,QAAAA,QAAQ,EAAE;AAAZ,OAAd;AACD,KAfyB;;AAAA,UAiB1BE,WAjB0B,GAiBZ,YAAY;AACxB,YAAKE,QAAL,CAAc;AAAEJ,QAAAA,QAAQ,EAAE;AAAZ,OAAd;AACD,KAnByB;;AAExB,UAAKC,KAAL,GAAa;AACXD,MAAAA,QAAQ,EAAE;AADC,KAAb;AAFwB;AAKzB;;;;WAgBD,kBAAuB;AACrB,wBAAuC,KAAKF,KAA5C;AAAA,UAAQO,IAAR,eAAQA,IAAR;AAAA,UAAcC,OAAd,eAAcA,OAAd;AAAA,UAAuBC,WAAvB,eAAuBA,WAAvB;AACA,UAAQP,QAAR,GAAqB,KAAKC,KAA1B,CAAQD,QAAR;AACA,0BACE,oBAAC,CAAD,CAAG,UAAH,qBACE,oBAAC,CAAD,CAAG,cAAH,QAAmBK,IAAnB,CADF,eAEE,oBAAC,CAAD,CAAG,iBAAH,QACGC,OADH,EAEGC,WAAW,iBACV,oBAAC,CAAD,CAAG,YAAH;AAAgB,QAAA,OAAO,EAAE,KAAKR;AAA9B,sBACE,oBAAC,cAAD;AAAgB,QAAA,IAAI,EAAC;AAArB,QADF,CAHJ,CAFF,eAUE,oBAAC,uBAAD;AACE,QAAA,KAAK,EAAE;AAAES,UAAAA,SAAS,EAAE;AAAb,SADT;AAEE,QAAA,KAAK,EAAE;AAAEA,UAAAA,SAAS,EAAE;AAAb;AAFT,SAIGR,QAAQ,iBACP,oBAAC,CAAD,CAAG,qBAAH,qBACE,oBAAC,CAAD,CAAG,UAAH;AAAc,QAAA,OAAO,EAAE,KAAKE;AAA5B,sBACE,oBAAC,WAAD;AAAa,QAAA,IAAI,EAAC;AAAlB,QADF,CADF,EAIGK,WAJH,CALJ,CAVF,CADF;AA0BD;;;;EAnDqCf,S;;SAAnBK,U","sourcesContent":["import React, { Component, ReactElement } from \"react\";\nimport { QuestionCircle } from \"@styled-icons/fa-solid/QuestionCircle\";\nimport { TimesCircle } from \"@styled-icons/fa-solid/TimesCircle\";\nimport { VelocityTransitionGroup } from \"velocity-react\";\n\nimport * as S from \"./styled\";\n\ntype Props = {\n description?: ReactElement | string;\n icon: ReactElement;\n summary: ReactElement | string;\n};\n\ntype State = {\n expanded: boolean;\n};\n\nexport default class TripDetail extends Component<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = {\n expanded: false\n };\n }\n\n toggle = (): void => {\n const { expanded } = this.state;\n if (expanded) this.onHideClick();\n else this.onExpandClick();\n };\n\n onExpandClick = (): void => {\n this.setState({ expanded: true });\n };\n\n onHideClick = (): void => {\n this.setState({ expanded: false });\n };\n\n render(): ReactElement {\n const { icon, summary, description } = this.props;\n const { expanded } = this.state;\n return (\n <S.TripDetail>\n <S.TripDetailIcon>{icon}</S.TripDetailIcon>\n <S.TripDetailSummary>\n {summary}\n {description && (\n <S.ExpandButton onClick={this.toggle}>\n <QuestionCircle size=\"0.92em\" />\n </S.ExpandButton>\n )}\n </S.TripDetailSummary>\n <VelocityTransitionGroup\n enter={{ animation: \"slideDown\" }}\n leave={{ animation: \"slideUp\" }}\n >\n {expanded && (\n <S.TripDetailDescription>\n <S.HideButton onClick={this.onHideClick}>\n <TimesCircle size=\"0.92em\" />\n </S.HideButton>\n {description}\n </S.TripDetailDescription>\n )}\n </VelocityTransitionGroup>\n </S.TripDetail>\n );\n }\n}\n"],"file":"trip-detail.js"}
|
package/esm/types.js
ADDED
package/esm/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"types.js"}
|
package/i18n/en-US.yml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Default messages for the TripDetails component.
|
|
2
|
+
# To use from a react-intl application:
|
|
3
|
+
# - merge the content of this file into the messages object
|
|
4
|
+
# that has your other localized strings,
|
|
5
|
+
# - flatten the ids, i.e. convert a structure such as
|
|
6
|
+
# otpUi > TripDetails > calories
|
|
7
|
+
# into "otpUi.TripDetails.calories" (see TripDetail story for an example),
|
|
8
|
+
# - pass the resulting object to the messages prop of IntlProvider.
|
|
9
|
+
#
|
|
10
|
+
# The meaning of the pseudo <tags> used in the strings below is as follows:
|
|
11
|
+
# - <dietaryLink>: The link to the Dietary Guidelines for Americans will surround the text enclosed by the tag.
|
|
12
|
+
# - <strong>: The enclosed text will be rendered as strong (bold) text (same meaning as in HTML).
|
|
13
|
+
|
|
14
|
+
otpUi:
|
|
15
|
+
TripDetails:
|
|
16
|
+
calories: "Calories Burned: <strong>{calories, number, ::.}</strong>"
|
|
17
|
+
caloriesDescription: "Calories burned is based on
|
|
18
|
+
<strong>{walkMinutes, plural, one {# minute} other {# minutes}}</strong> spent walking and
|
|
19
|
+
<strong>{bikeMinutes, plural, one {# minute} other {# minutes}}</strong> spent biking during this trip.
|
|
20
|
+
Adapted from <dietaryLink>Dietary Guidelines for Americans 2005, page 16, Table 4</dietaryLink>."
|
|
21
|
+
departure: "Depart <strong>{departureDate, date, long}</strong> at <strong>{departureDate, time, short}</strong>"
|
|
22
|
+
flexDropOffMessage: >
|
|
23
|
+
{hasLeadTime, select,
|
|
24
|
+
true {To get off at your destination, you must call
|
|
25
|
+
{hasPhone, select,
|
|
26
|
+
true {{phoneNumber}}
|
|
27
|
+
other {ahead}
|
|
28
|
+
} at least {leadDays, plural, one {# day} other {# days}} in advance}
|
|
29
|
+
other {You must tell the operator where you want to get off.}
|
|
30
|
+
}.
|
|
31
|
+
flexPickupMessage: >
|
|
32
|
+
To take this route, you must call {hasPhone, select,
|
|
33
|
+
true {{phoneNumber}}
|
|
34
|
+
other {ahead}
|
|
35
|
+
}{hasLeadTime, select,
|
|
36
|
+
true { at least {leadDays, plural, one {# day} other {# days}} in advance}
|
|
37
|
+
other {}
|
|
38
|
+
}.
|
|
39
|
+
title: "Trip Details"
|
|
40
|
+
tncFare: "{companies} Fare: <strong>{minTNCFare} - {maxTNCFare}</strong>"
|
|
41
|
+
transitFare: "Transit Fare"
|
|
42
|
+
transitFareEntry: "{name}: <strong>{value}</strong>"
|
|
43
|
+
tripIncludesFlex: This trip includes flexible routes.
|
package/i18n/fr.yml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Example translations for the TripDetails component into French.
|
|
2
|
+
otpUi:
|
|
3
|
+
TripDetails:
|
|
4
|
+
calories: "Calories dépensées : <strong>{calories, number, ::.}</strong>"
|
|
5
|
+
caloriesDescription: "La dépense calorique est calculée sur la base de
|
|
6
|
+
{walkMinutes, plural, one {<strong># minute</strong> effectuée} other {<strong># minutes</strong> effectuées}} à pied et
|
|
7
|
+
{bikeMinutes, plural, one {<strong># minute</strong> effectuée} other {<strong># minutes</strong> effectuées}} en vélo sur ce trajet.
|
|
8
|
+
(d'après <dietaryLink>Dietary Guidelines for Americans 2005, page 16, Table 4</dietaryLink>)"
|
|
9
|
+
departure: "Départ le <strong>{departureDate, date, long}</strong> à <strong>{departureDate, time, short}</strong>"
|
|
10
|
+
flexDropOffMessage: >
|
|
11
|
+
{hasLeadTime, select,
|
|
12
|
+
true {Pour descendre à votre destination, vous devez faire une réservation préalable
|
|
13
|
+
{hasPhone, select,
|
|
14
|
+
true {au {phoneNumber}}
|
|
15
|
+
other {}
|
|
16
|
+
} au moins {leadDays, plural, one {# jour} other {# jours}} à l'avance.}
|
|
17
|
+
other {Vous devez informer le conducteur de votre destination.}
|
|
18
|
+
}.
|
|
19
|
+
flexPickupMessage: >
|
|
20
|
+
Pour ce trajet, vous devez faire une réservation préalable {hasPhone, select,
|
|
21
|
+
true {au {phoneNumber}}
|
|
22
|
+
other {}
|
|
23
|
+
}{hasLeadTime, select,
|
|
24
|
+
true { au moins {leadDays, plural, one {# jour} other {# jours}} à l'avance}
|
|
25
|
+
other {}
|
|
26
|
+
}.
|
|
27
|
+
title: "Détails du trajet"
|
|
28
|
+
tncFare: "Tarif {companies} : <strong>{minTNCFare} - {maxTNCFare}</strong>"
|
|
29
|
+
transitFare: "Tarif en transports"
|
|
30
|
+
transitFareEntry: "{name} : <strong>{value}</strong>"
|
|
31
|
+
tripIncludesFlex: Ce trajet comprend un service à la demande (Flex).
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import * as S from "./styled";
|
|
3
|
+
import { TripDetailsProps } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Renders trip details such as departure instructions, fare amount, and calories spent.
|
|
6
|
+
*/
|
|
7
|
+
export declare function TripDetails({ CaloriesDetails, className, DepartureDetails, defaultFareKey, FareDetails, fareKeyNameMap, itinerary }: TripDetailsProps): ReactElement;
|
|
8
|
+
export default TripDetails;
|
|
9
|
+
export { S as Styled };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAS5C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAG9B,OAAO,EAGL,gBAAgB,EACjB,MAAM,SAAS,CAAC;AA0HjB;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,eAAwC,EACxC,SAAc,EACd,gBAAuB,EACvB,cAA0B,EAC1B,WAAkB,EAClB,cAAmB,EACnB,SAAS,EACV,EAAE,gBAAgB,GAAG,YAAY,CAmPjC;AAED,eAAe,WAAW,CAAC;AAG3B,OAAO,EAAE,CAAC,IAAI,MAAM,EAAE,CAAC"}
|