@duffel/components 3.1.1 → 3.1.2--prototype
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/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- package/.storybook/__snapshots__/Storyshots.test.js.snap +14636 -1384
- package/.tool-versions +1 -1
- package/package.json +1 -1
- package/react-dist/index.js +19 -19
- package/src/components/DuffelAncillaries/DuffelAncillaries.tsx +2 -1
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.tsx +2 -2
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.tsx +3 -2
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.tsx +1 -1
- package/src/components/DuffelAncillaries/seats/SeatSelectionModalHeader.tsx +3 -2
- package/src/components/DuffelPayments/DuffelPayments.tsx +1 -0
- package/src/components/ShowData/ShowData.tsx +38 -0
- package/src/components/ShowData/ShowDataCustomElement.tsx +85 -0
- package/src/fixtures/offers/off_1.json +1 -10
- package/src/stories/Button.stories.tsx +1 -0
- package/src/stories/DuffelAncillaries.stories.tsx +19 -1
- package/src/stories/ShowData.stories.tsx +16 -0
- package/src/styles/components/Card.css +3 -3
- package/src/styles/components/CfarSelectionModal.css +1 -1
- package/src/styles/components/Legend.css +10 -6
- package/src/styles/components/LoadingState.css +8 -2
- package/src/styles/components/PassengerSelect.css +8 -2
- package/src/styles/components/Seat.css +9 -7
- package/src/styles/components/Tabs.css +5 -2
- package/react-dist/components/DuffelAncillaries/Card.d.ts +0 -14
- package/react-dist/components/DuffelAncillaries/Counter.d.ts +0 -10
- package/react-dist/components/DuffelAncillaries/DuffelAncillaries.d.ts +0 -3
- package/react-dist/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +0 -14
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +0 -9
- package/react-dist/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +0 -7
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +0 -10
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +0 -7
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +0 -4
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +0 -2
- package/react-dist/components/DuffelAncillaries/seats/Amenity.d.ts +0 -6
- package/react-dist/components/DuffelAncillaries/seats/DeckSelect.d.ts +0 -15
- package/react-dist/components/DuffelAncillaries/seats/Element.d.ts +0 -15
- package/react-dist/components/DuffelAncillaries/seats/EmptyElement.d.ts +0 -2
- package/react-dist/components/DuffelAncillaries/seats/ExitElement.d.ts +0 -6
- package/react-dist/components/DuffelAncillaries/seats/Legend.d.ts +0 -12
- package/react-dist/components/DuffelAncillaries/seats/Row.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/RowSection.d.ts +0 -17
- package/react-dist/components/DuffelAncillaries/seats/SeatElement.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/SeatInfo.d.ts +0 -7
- package/react-dist/components/DuffelAncillaries/seats/SeatMap.d.ts +0 -12
- package/react-dist/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +0 -2
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +0 -4
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +0 -16
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +0 -10
- package/react-dist/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +0 -5
- package/react-dist/components/DuffelPayments/DuffelPayments.d.ts +0 -11
- package/react-dist/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +0 -14
- package/react-dist/components/PlacesLookup/PlacesLookup.d.ts +0 -20
- package/react-dist/components/shared/AnimatedLoaderEllipsis.d.ts +0 -2
- package/react-dist/components/shared/Button.d.ts +0 -23
- package/react-dist/components/shared/ErrorBoundary.d.ts +0 -13
- package/react-dist/components/shared/FetchOfferErrorState.d.ts +0 -5
- package/react-dist/components/shared/Icon.d.ts +0 -46
- package/react-dist/components/shared/IconButton.d.ts +0 -16
- package/react-dist/components/shared/Modal.d.ts +0 -11
- package/react-dist/components/shared/NonIdealState.d.ts +0 -4
- package/react-dist/components/shared/Stamp.d.ts +0 -7
- package/react-dist/components/shared/Tabs.d.ts +0 -16
- package/react-dist/custom-elements.d.ts +0 -6
- package/react-dist/custom-elements.js +0 -37
- package/react-dist/custom-elements.js.map +0 -7
- package/react-dist/index.d.ts +0 -8
- package/react-dist/index.js.map +0 -7
- package/react-dist/lib/captureErrorInSentry.d.ts +0 -1
- package/react-dist/lib/compileCreateOrderPayload.d.ts +0 -14
- package/react-dist/lib/createPriceFormatters.d.ts +0 -12
- package/react-dist/lib/fetchFromDuffelAPI.d.ts +0 -8
- package/react-dist/lib/fetchFromFixtures.d.ts +0 -4
- package/react-dist/lib/formatAvailableServices.d.ts +0 -12
- package/react-dist/lib/formatDate.d.ts +0 -2
- package/react-dist/lib/formatSeatMaps.d.ts +0 -4
- package/react-dist/lib/getBaggageServiceDescription.d.ts +0 -2
- package/react-dist/lib/getCabinsForSegmentAndDeck.d.ts +0 -2
- package/react-dist/lib/getCurrencyForSeatMaps.d.ts +0 -10
- package/react-dist/lib/getCurrencyForServices.d.ts +0 -11
- package/react-dist/lib/getFirstSeatElementMatchingCriteria.d.ts +0 -3
- package/react-dist/lib/getPassengerBySegmentList.d.ts +0 -6
- package/react-dist/lib/getPassengerInitials.d.ts +0 -1
- package/react-dist/lib/getPassengerMapById.d.ts +0 -3
- package/react-dist/lib/getPassengerName.d.ts +0 -3
- package/react-dist/lib/getRowNumber.d.ts +0 -2
- package/react-dist/lib/getSegmentList.d.ts +0 -2
- package/react-dist/lib/getServicePriceMapById.d.ts +0 -3
- package/react-dist/lib/getSymbols.d.ts +0 -2
- package/react-dist/lib/getTotalAmountForServices.d.ts +0 -6
- package/react-dist/lib/getTotalQuantity.d.ts +0 -2
- package/react-dist/lib/hasHighLuminance.d.ts +0 -1
- package/react-dist/lib/hasService.d.ts +0 -2
- package/react-dist/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +0 -3
- package/react-dist/lib/hasWings.d.ts +0 -2
- package/react-dist/lib/isBaggageService.d.ts +0 -2
- package/react-dist/lib/isCancelForAnyReasonService.d.ts +0 -2
- package/react-dist/lib/isFixtureOfferId.d.ts +0 -2
- package/react-dist/lib/isPayloadComplete.d.ts +0 -2
- package/react-dist/lib/isSeatElement.d.ts +0 -2
- package/react-dist/lib/logging.d.ts +0 -46
- package/react-dist/lib/moneyStringFormatter.d.ts +0 -8
- package/react-dist/lib/offerIsExpired.d.ts +0 -2
- package/react-dist/lib/retrieveOffer.d.ts +0 -2
- package/react-dist/lib/retrieveOfferFromDuffelAPI.d.ts +0 -1
- package/react-dist/lib/retrieveSeatMaps.d.ts +0 -2
- package/react-dist/lib/retrieveSeatMapsFromDuffelAPI.d.ts +0 -1
- package/react-dist/lib/setBodyScrollability.d.ts +0 -1
- package/react-dist/lib/validateProps.d.ts +0 -7
- package/react-dist/lib/withPlural.d.ts +0 -1
- package/react-dist/types/Aircraft.d.ts +0 -14
- package/react-dist/types/Airline.d.ts +0 -14
- package/react-dist/types/Airport.d.ts +0 -44
- package/react-dist/types/City.d.ts +0 -18
- package/react-dist/types/CreateOrderPayload.d.ts +0 -72
- package/react-dist/types/CurrencyConversion.d.ts +0 -10
- package/react-dist/types/DuffelAncillariesProps.d.ts +0 -70
- package/react-dist/types/Offer.d.ts +0 -711
- package/react-dist/types/Order.d.ts +0 -8
- package/react-dist/types/Place.d.ts +0 -8
- package/react-dist/types/SeatMap.d.ts +0 -190
- package/react-dist/types/index.d.ts +0 -11
- package/src/examples/just-typescript/yarn.lock +0 -154
- package/src/examples/payments-just-typescript/yarn.lock +0 -154
- package/src/examples/react-app/yarn.lock +0 -219
|
@@ -266,7 +266,8 @@ export const DuffelAncillaries: React.FC<DuffelAncillariesProps> = (props) => {
|
|
|
266
266
|
}),
|
|
267
267
|
...(props.styles?.accentColor &&
|
|
268
268
|
hasHighLuminance(props.styles.accentColor) && {
|
|
269
|
-
"--SECONDARY": "
|
|
269
|
+
"--SECONDARY": "var(--GREY-900)",
|
|
270
|
+
"--TERTIARY": "var(--GREY-400)",
|
|
270
271
|
}),
|
|
271
272
|
...(props.styles?.fontFamily && {
|
|
272
273
|
"--FONT-FAMILY": props.styles.fontFamily,
|
|
@@ -38,9 +38,9 @@ export const BaggageSelectionModalBodyPassenger: React.FC<
|
|
|
38
38
|
<h3 style={{ margin: 0 }} className="p1--semibold">
|
|
39
39
|
{passengerName}
|
|
40
40
|
</h3>
|
|
41
|
-
{hasIncludedBaggage
|
|
41
|
+
{hasIncludedBaggage ? (
|
|
42
42
|
<IncludedBaggageBanner includedBaggage={includedBaggage} />
|
|
43
|
-
)}
|
|
43
|
+
) : null}
|
|
44
44
|
|
|
45
45
|
<div style={{ display: "flex", rowGap: "8px", flexDirection: "column" }}>
|
|
46
46
|
{passengerServicesForSegment.map((availableService) => (
|
|
@@ -64,7 +64,8 @@ const InactiveSegment: React.FC<{
|
|
|
64
64
|
height: "4px",
|
|
65
65
|
padding: "0",
|
|
66
66
|
borderRadius: "4px",
|
|
67
|
-
backgroundColor:
|
|
67
|
+
backgroundColor:
|
|
68
|
+
"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",
|
|
68
69
|
transition: "background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",
|
|
69
70
|
...style,
|
|
70
71
|
}}
|
|
@@ -75,7 +76,7 @@ const ActiveSegment = () => (
|
|
|
75
76
|
<InactiveSegment
|
|
76
77
|
onClick={undefined}
|
|
77
78
|
style={{
|
|
78
|
-
backgroundColor: "rgb(var(--ACCENT))",
|
|
79
|
+
backgroundColor: "var(--SECONDARY, rgb(var(--ACCENT)))",
|
|
79
80
|
}}
|
|
80
81
|
/>
|
|
81
82
|
);
|
|
@@ -79,7 +79,8 @@ const InactiveSegment: React.FC<{
|
|
|
79
79
|
height: "4px",
|
|
80
80
|
padding: "0",
|
|
81
81
|
borderRadius: "4px",
|
|
82
|
-
backgroundColor:
|
|
82
|
+
backgroundColor:
|
|
83
|
+
"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",
|
|
83
84
|
transition: "background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",
|
|
84
85
|
...style,
|
|
85
86
|
}}
|
|
@@ -90,7 +91,7 @@ const ActiveSegment = () => (
|
|
|
90
91
|
<InactiveSegment
|
|
91
92
|
onClick={undefined}
|
|
92
93
|
style={{
|
|
93
|
-
backgroundColor: "rgb(var(--ACCENT))",
|
|
94
|
+
backgroundColor: "var(--SECONDARY, rgb(var(--ACCENT)))",
|
|
94
95
|
}}
|
|
95
96
|
/>
|
|
96
97
|
);
|
|
@@ -196,6 +196,7 @@ export const DuffelPayments: React.FC<DuffelPaymentsProps> = (props) => {
|
|
|
196
196
|
...(props.styles?.accentColor &&
|
|
197
197
|
hasHighLuminance(props.styles.accentColor) && {
|
|
198
198
|
"--SECONDARY": "black",
|
|
199
|
+
"--TERTIARY": "grey",
|
|
199
200
|
}),
|
|
200
201
|
...(props.styles?.fontFamily && {
|
|
201
202
|
"--FONT-FAMILY": props.styles.fontFamily,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Button } from "@components/shared/Button";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
function isJsonString(dataString: string) {
|
|
5
|
+
try {
|
|
6
|
+
JSON.parse(dataString);
|
|
7
|
+
} catch (e) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ShowDataProps {
|
|
14
|
+
data: any;
|
|
15
|
+
onFinished: (newData: any) => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const ShowData: React.FC<ShowDataProps> = ({ data, onFinished }) => {
|
|
19
|
+
const [textareaData, setTextareaData] = React.useState("{}");
|
|
20
|
+
const isValid = isJsonString(textareaData);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div>
|
|
24
|
+
<pre>{JSON.stringify(data, null, 2)}</pre>
|
|
25
|
+
<textarea
|
|
26
|
+
value={textareaData}
|
|
27
|
+
onChange={(e) => setTextareaData(e.target.value)}
|
|
28
|
+
/>
|
|
29
|
+
<Button
|
|
30
|
+
disabled={!isValid}
|
|
31
|
+
onClick={() => onFinished(JSON.parse(textareaData))}
|
|
32
|
+
>
|
|
33
|
+
Click me to trigger `onFinished` event
|
|
34
|
+
</Button>
|
|
35
|
+
{!isValid && <p style={{ color: "tomato" }}>Invalid JSON</p>}
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { createRoot, Root } from "react-dom/client";
|
|
2
|
+
import { ShowData, ShowDataProps } from "./ShowData";
|
|
3
|
+
declare global {
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
5
|
+
namespace JSX {
|
|
6
|
+
interface IntrinsicElements {
|
|
7
|
+
"show-data": React.DetailedHTMLProps<
|
|
8
|
+
React.HTMLAttributes<HTMLElement>,
|
|
9
|
+
HTMLElement
|
|
10
|
+
>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const CUSTOM_ELEMENT_TAG = "show-data";
|
|
16
|
+
|
|
17
|
+
type ShowDataRenderArguments = Pick<ShowDataProps, "data">;
|
|
18
|
+
|
|
19
|
+
class ShowDataCustomElement extends HTMLElement {
|
|
20
|
+
/**
|
|
21
|
+
* The React root for displaying content inside a browser DOM element.
|
|
22
|
+
*/
|
|
23
|
+
private root!: Root;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* `connectedCallback` is called to initialise the custom element
|
|
27
|
+
*/
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
const container = document.createElement("div");
|
|
30
|
+
this.appendChild(container);
|
|
31
|
+
|
|
32
|
+
this.root = createRoot(container);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* When this function is called, it will render/re-render
|
|
37
|
+
* the `DuffelPayments` component with the given props.
|
|
38
|
+
*/
|
|
39
|
+
public render(withProps: ShowDataRenderArguments) {
|
|
40
|
+
if (!this.root) {
|
|
41
|
+
throw "It was not possible to render `duffel-payments` because `this.root` is missing.";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
this.root.render(
|
|
45
|
+
<ShowData
|
|
46
|
+
{...withProps}
|
|
47
|
+
onFinished={() => {
|
|
48
|
+
this.dispatchEvent(
|
|
49
|
+
new CustomEvent("onFinished", {
|
|
50
|
+
composed: true,
|
|
51
|
+
})
|
|
52
|
+
);
|
|
53
|
+
}}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
window.customElements.get(CUSTOM_ELEMENT_TAG) ||
|
|
60
|
+
window.customElements.define(CUSTOM_ELEMENT_TAG, ShowDataCustomElement);
|
|
61
|
+
|
|
62
|
+
function tryToGetShowData(caller: string): ShowDataCustomElement {
|
|
63
|
+
const element =
|
|
64
|
+
document.querySelector<ShowDataCustomElement>(CUSTOM_ELEMENT_TAG);
|
|
65
|
+
if (!element) {
|
|
66
|
+
throw new Error(
|
|
67
|
+
`Could not find duffel-payments element in the DOM. Maybe you need to call ${caller} after 'window.onload'?`
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
return element;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function renderShowData(props: ShowDataRenderArguments) {
|
|
74
|
+
const element = tryToGetShowData("renderShowData");
|
|
75
|
+
element.render(props);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function onShowDataFinished(onFinished: ShowDataProps["onFinished"]) {
|
|
79
|
+
const element = tryToGetShowData("onShowDataFinished");
|
|
80
|
+
|
|
81
|
+
// using `as EventListener` here because typescript doesn't know the event type for `onPayloadReady`
|
|
82
|
+
// There's a few different suggestions to resolve this seemed good enough
|
|
83
|
+
// You can learn more here: https://github.com/microsoft/TypeScript/issues/28357
|
|
84
|
+
element.addEventListener("onFinished", onFinished as EventListener);
|
|
85
|
+
}
|
|
@@ -33,16 +33,7 @@
|
|
|
33
33
|
"fare_basis_code": "Y20LGTN2",
|
|
34
34
|
"cabin_class_marketing_name": "Economy",
|
|
35
35
|
"cabin_class": "economy",
|
|
36
|
-
"baggages": [
|
|
37
|
-
{
|
|
38
|
-
"type": "checked",
|
|
39
|
-
"quantity": 1
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "carry_on",
|
|
43
|
-
"quantity": 1
|
|
44
|
-
}
|
|
45
|
-
]
|
|
36
|
+
"baggages": []
|
|
46
37
|
}
|
|
47
38
|
],
|
|
48
39
|
"origin_terminal": "2",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
2
2
|
import { DuffelAncillaries } from "../components/DuffelAncillaries/DuffelAncillaries";
|
|
3
3
|
import mockPassengers from "../fixtures/passengers/mock_passengers";
|
|
4
4
|
import { DuffelAncillariesPropsWithOffersAndSeatMaps } from "../types/DuffelAncillariesProps";
|
|
@@ -146,3 +146,21 @@ export const MarkupUsingPriceFormattersWithCustomCurrency: DuffelAncillariesStor
|
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
148
|
};
|
|
149
|
+
|
|
150
|
+
export const WithAccentColorSet: StoryFn<
|
|
151
|
+
DuffelAncillariesPropsWithOffersAndSeatMaps
|
|
152
|
+
> = () => (
|
|
153
|
+
<DuffelAncillaries
|
|
154
|
+
{...defaultProps}
|
|
155
|
+
styles={{ accentColor: "29, 78, 216" }}
|
|
156
|
+
/>
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
export const WithWhiteAccentColorSet: StoryFn<
|
|
160
|
+
DuffelAncillariesPropsWithOffersAndSeatMaps
|
|
161
|
+
> = () => (
|
|
162
|
+
<DuffelAncillaries
|
|
163
|
+
{...defaultProps}
|
|
164
|
+
styles={{ accentColor: "255, 255, 255" }}
|
|
165
|
+
/>
|
|
166
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { ShowData, ShowDataProps } from "../components/ShowData/ShowData";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "ShowData",
|
|
6
|
+
component: ShowData,
|
|
7
|
+
} as Meta;
|
|
8
|
+
|
|
9
|
+
const defaultProps: ShowDataProps = {
|
|
10
|
+
data: { heres: "some test data" },
|
|
11
|
+
onFinished: console.log,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const AllServices: StoryObj<typeof ShowData> = {
|
|
15
|
+
args: defaultProps,
|
|
16
|
+
};
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
.ancillary-card:not(:disabled):not(.ancillary-card--loading):hover,
|
|
34
34
|
.ancillary-card:not(:disabled):not(.ancillary-card--loading):focus-visible {
|
|
35
35
|
/* important is needed here to override the inline border style from Card.tsx */
|
|
36
|
-
border-color: rgb(var(--ACCENT)) !important;
|
|
36
|
+
border-color: var(--SECONDARY, rgb(var(--ACCENT))) !important;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.ancillary-card:not(:disabled):not(.ancillary-card--loading):hover
|
|
40
40
|
.ancillary-card__expand-icon,
|
|
41
41
|
.ancillary-card:not(:disabled):not(.ancillary-card--loading):focus-visible
|
|
42
42
|
.ancillary-card__expand-icon {
|
|
43
|
-
color: rgb(var(--ACCENT));
|
|
43
|
+
color: var(--SECONDARY, rgb(var(--ACCENT)));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.ancillary-card__selected-icon {
|
|
47
|
-
background-color: rgb(var(--ACCENT));
|
|
47
|
+
background-color: var(--SECONDARY, rgb(var(--ACCENT)));
|
|
48
48
|
border-radius: 20px;
|
|
49
49
|
color: rgb(var(--WHITE));
|
|
50
50
|
height: 24px;
|
|
@@ -27,8 +27,9 @@
|
|
|
27
27
|
width: var(--SPACING-MD-1);
|
|
28
28
|
height: var(--SPACING-MD-1);
|
|
29
29
|
border-radius: 5px;
|
|
30
|
-
border: 2px solid var(--GREY-
|
|
31
|
-
color: var(--GREY-
|
|
30
|
+
border: 2px solid var(--GREY-200);
|
|
31
|
+
color: var(--GREY-600);
|
|
32
|
+
background-color: var(--GREY-100);
|
|
32
33
|
display: flex;
|
|
33
34
|
align-items: center;
|
|
34
35
|
justify-content: center;
|
|
@@ -37,22 +38,25 @@
|
|
|
37
38
|
|
|
38
39
|
.seat-map__legend-seat--fee-payable {
|
|
39
40
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-100));
|
|
40
|
-
border: 2px solid
|
|
41
|
+
border: 2px solid
|
|
42
|
+
var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)));
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
.seat-map__legend-seat--fee-payable-indicator {
|
|
44
46
|
position: relative;
|
|
45
47
|
top: var(--SPACING-XS-2);
|
|
46
48
|
left: var(--SPACING-XS-2);
|
|
47
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-300));
|
|
49
|
+
color: var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-300)));
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
.seat-map__legend-seat--included {
|
|
51
53
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-100));
|
|
52
|
-
border: 2px solid
|
|
54
|
+
border: 2px solid
|
|
55
|
+
var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)));
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
.seat-map__legend-seat--selected {
|
|
56
59
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
57
|
-
border: 2px solid
|
|
60
|
+
border: 2px solid
|
|
61
|
+
var(--SECONDARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000)));
|
|
58
62
|
}
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
margin: var(--SPACING-SM-3) 0;
|
|
25
25
|
border-radius: 999px;
|
|
26
26
|
width: calc(100% - var(--SPACING-SM-1));
|
|
27
|
-
background-color:
|
|
27
|
+
background-color: var(
|
|
28
|
+
--SECONDARY,
|
|
29
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-100))
|
|
30
|
+
);
|
|
28
31
|
position: relative;
|
|
29
32
|
transition: var(--TRANSITIONS-CUBIC-BEZIER);
|
|
30
33
|
}
|
|
@@ -33,7 +36,10 @@
|
|
|
33
36
|
display: block;
|
|
34
37
|
height: 100%;
|
|
35
38
|
border-radius: 999px;
|
|
36
|
-
background-color:
|
|
39
|
+
background-color: var(
|
|
40
|
+
--TERTIARY,
|
|
41
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000))
|
|
42
|
+
);
|
|
37
43
|
position: relative;
|
|
38
44
|
animation: fillstatus 1s linear;
|
|
39
45
|
}
|
|
@@ -43,7 +43,10 @@
|
|
|
43
43
|
.passenger-selection-passenger:hover,
|
|
44
44
|
.passenger-selection-passenger:focus,
|
|
45
45
|
.passenger-selection-passenger:active {
|
|
46
|
-
background-color:
|
|
46
|
+
background-color: var(
|
|
47
|
+
--SECONDARY,
|
|
48
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-100))
|
|
49
|
+
);
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
.passenger-selection-passenger__identifier,
|
|
@@ -78,7 +81,10 @@
|
|
|
78
81
|
.passenger-selection-passenger--selected {
|
|
79
82
|
box-shadow: 4px 0px 0px 0px rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000))
|
|
80
83
|
inset;
|
|
81
|
-
background-color:
|
|
84
|
+
background-color: var(
|
|
85
|
+
--SECONDARY,
|
|
86
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-100))
|
|
87
|
+
);
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
.passenger-selection-segment {
|
|
@@ -21,16 +21,17 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.map-element--available {
|
|
24
|
-
border: 2px solid
|
|
24
|
+
border: 2px solid
|
|
25
|
+
var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)));
|
|
25
26
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-100));
|
|
26
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-300));
|
|
27
|
+
color: var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-300)));
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
.map-element--fee-payable {
|
|
30
31
|
position: absolute;
|
|
31
32
|
bottom: -2px;
|
|
32
33
|
right: -2px;
|
|
33
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-300));
|
|
34
|
+
color: var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-300)));
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
@media (hover: hover) and (pointer: fine) {
|
|
@@ -40,18 +41,19 @@
|
|
|
40
41
|
|
|
41
42
|
.map-element--actionable:not(.map-element--selected):hover {
|
|
42
43
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-200));
|
|
43
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
44
|
+
color: var(--SECONDARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000)));
|
|
44
45
|
transition: var(--TRANSITIONS-CUBIC-BEZIER);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
.map-element--fee-payable {
|
|
48
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
49
|
+
color: var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000)));
|
|
49
50
|
transition: var(--TRANSITIONS-CUBIC-BEZIER);
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
.map-element--selected {
|
|
54
55
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
55
|
-
border: 2px solid
|
|
56
|
-
|
|
56
|
+
border: 2px solid
|
|
57
|
+
var(--SECONDARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000)));
|
|
58
|
+
color: var(--SECONDARY, rgba(var(--WHITE), 1));
|
|
57
59
|
}
|
|
@@ -28,8 +28,11 @@
|
|
|
28
28
|
.seat-map__tab-select-option:hover,
|
|
29
29
|
.seat-map__tab-select-option:focus,
|
|
30
30
|
.seat-map__tab-select-option:active {
|
|
31
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
32
|
-
background-color:
|
|
31
|
+
color: var(--SECONDARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000)));
|
|
32
|
+
background-color: var(
|
|
33
|
+
--TERTIARY,
|
|
34
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-200))
|
|
35
|
+
);
|
|
33
36
|
transition: var(--TRANSITIONS-CUBIC-BEZIER);
|
|
34
37
|
}
|
|
35
38
|
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IconName } from "@components/shared/Icon";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
export interface CardProps {
|
|
4
|
-
buttonTitle: string;
|
|
5
|
-
title: string;
|
|
6
|
-
icon: IconName;
|
|
7
|
-
onClick?: (() => void) | null;
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
copy: string;
|
|
10
|
-
isLoading?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
isSelected?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const Card: React.FC<CardProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DuffelAncillariesPropsWithClientKeyAndOfferId, DuffelAncillariesPropsWithOfferIdForFixture, DuffelAncillariesPropsWithOffersAndSeatMaps, DuffelAncillariesPropWithOfferAndClientKey, OnPayloadReady } from "../../types/DuffelAncillariesProps";
|
|
3
|
-
declare global {
|
|
4
|
-
namespace JSX {
|
|
5
|
-
interface IntrinsicElements {
|
|
6
|
-
"duffel-ancillaries": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
type DuffelAncillariesCustomElementRenderArguments = Omit<DuffelAncillariesPropsWithOfferIdForFixture, "onPayloadReady"> | Omit<DuffelAncillariesPropsWithClientKeyAndOfferId, "onPayloadReady"> | Omit<DuffelAncillariesPropWithOfferAndClientKey, "onPayloadReady"> | Omit<DuffelAncillariesPropsWithOffersAndSeatMaps, "onPayloadReady">;
|
|
11
|
-
export declare function renderDuffelAncillariesCustomElement(props: DuffelAncillariesCustomElementRenderArguments): void;
|
|
12
|
-
export declare function onDuffelAncillariesPayloadReady(onPayloadReady: OnPayloadReady): void;
|
|
13
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayload, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer } from "../../../types/Offer";
|
|
4
|
-
export interface BaggageSelectionCardProps {
|
|
5
|
-
isLoading: boolean;
|
|
6
|
-
offer?: Offer;
|
|
7
|
-
passengers: CreateOrderPayload["passengers"];
|
|
8
|
-
selectedServices: CreateOrderPayloadServices;
|
|
9
|
-
setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const BaggageSelectionCard: React.FC<BaggageSelectionCardProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { OfferAvailableServiceBaggage } from "../../../types/Offer";
|
|
4
|
-
interface BaggageSelectionControllerProps {
|
|
5
|
-
segmentId: string;
|
|
6
|
-
passengerId: string;
|
|
7
|
-
availableService: OfferAvailableServiceBaggage;
|
|
8
|
-
selectedServices: CreateOrderPayloadServices;
|
|
9
|
-
quantity: number;
|
|
10
|
-
onQuantityChanged: (quantity: number) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const BaggageSelectionController: React.FC<BaggageSelectionControllerProps>;
|
|
13
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayload, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer } from "../../../types/Offer";
|
|
4
|
-
export interface BaggageSelectionModalProps {
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
offer?: Offer;
|
|
7
|
-
passengers: CreateOrderPayload["passengers"];
|
|
8
|
-
selectedServices: CreateOrderPayloadServices;
|
|
9
|
-
onClose: (selectedServices: CreateOrderPayloadServices) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const BaggageSelectionModal: React.FC<BaggageSelectionModalProps>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadPassenger, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer, OfferSliceSegment } from "../../../types/Offer";
|
|
4
|
-
export interface BaggageSelectionModalBodyProps {
|
|
5
|
-
offer: Offer;
|
|
6
|
-
segment: OfferSliceSegment;
|
|
7
|
-
passengersById: Record<CreateOrderPayloadPassenger["id"], CreateOrderPayloadPassenger>;
|
|
8
|
-
selectedServices: CreateOrderPayloadServices;
|
|
9
|
-
setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const BaggageSelectionModalBody: React.FC<BaggageSelectionModalBodyProps>;
|
package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { OfferAvailableServiceBaggage, OfferSliceSegmentPassengerBaggage } from "../../../types/Offer";
|
|
4
|
-
export interface BaggageSelectionModalBodyPassengerProps {
|
|
5
|
-
segmentId: string;
|
|
6
|
-
passengerId: string;
|
|
7
|
-
passengerName: string;
|
|
8
|
-
includedBaggage: OfferSliceSegmentPassengerBaggage[];
|
|
9
|
-
passengerServicesForSegment: OfferAvailableServiceBaggage[];
|
|
10
|
-
selectedServices: CreateOrderPayloadServices;
|
|
11
|
-
setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare const BaggageSelectionModalBodyPassenger: React.FC<BaggageSelectionModalBodyPassengerProps>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ServicePriceMapById } from "@lib/getServicePriceMapById";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
4
|
-
export interface BaggageSelectionModalFooterProps {
|
|
5
|
-
currency: string;
|
|
6
|
-
selectedServices: CreateOrderPayloadServices;
|
|
7
|
-
servicePrices: ServicePriceMapById;
|
|
8
|
-
isFirstSegment: boolean;
|
|
9
|
-
isLastSegment: boolean;
|
|
10
|
-
onNextSegmentButtonClicked: () => void;
|
|
11
|
-
onPreviousSegmentButtonClicked: () => void;
|
|
12
|
-
onClose: () => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const BaggageSelectionModalFooter: React.FC<BaggageSelectionModalFooterProps>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { OfferSliceSegment } from "../../../types/Offer";
|
|
3
|
-
export interface BaggageSelectionModalHeaderProps {
|
|
4
|
-
segmentCount: number;
|
|
5
|
-
currentSegmentIndex: number;
|
|
6
|
-
currentSegment: OfferSliceSegment;
|
|
7
|
-
setCurrentSegmentIndex: (index: number) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const BaggageSelectionModalHeader: React.FC<BaggageSelectionModalHeaderProps>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { OfferSliceSegmentPassengerBaggage } from "../../../types/Offer";
|
|
3
|
-
interface IncludedBaggageBannerProps {
|
|
4
|
-
includedBaggage: OfferSliceSegmentPassengerBaggage[];
|
|
5
|
-
}
|
|
6
|
-
export declare const IncludedBaggageBanner: React.FC<IncludedBaggageBannerProps>;
|
|
7
|
-
export {};
|
package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer } from "../../../types/Offer";
|
|
4
|
-
export interface CfarSelectionCardProps {
|
|
5
|
-
isLoading: boolean;
|
|
6
|
-
offer?: Offer;
|
|
7
|
-
selectedServices: CreateOrderPayloadServices;
|
|
8
|
-
setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const CfarSelectionCard: React.FC<CfarSelectionCardProps>;
|
package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer, OfferAvailableServiceCancelForAnyReason } from "../../../types/Offer";
|
|
4
|
-
export interface CfarSelectionModalProps {
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
offerCurrency?: Offer["base_currency"];
|
|
7
|
-
service?: OfferAvailableServiceCancelForAnyReason;
|
|
8
|
-
selectedServices: CreateOrderPayloadServices;
|
|
9
|
-
onClose: (selectedServices: CreateOrderPayloadServices) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const CfarSelectionModal: React.FC<CfarSelectionModalProps>;
|
package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Offer, OfferAvailableServiceCancelForAnyReason } from "../../../types/Offer";
|
|
3
|
-
export interface CfarSelectionModalBodyProps {
|
|
4
|
-
offerCurrency: Offer["base_currency"];
|
|
5
|
-
service: OfferAvailableServiceCancelForAnyReason;
|
|
6
|
-
}
|
|
7
|
-
export declare const CfarSelectionModalBody: React.FC<CfarSelectionModalBodyProps>;
|