@duffel/components 3.12.0 → 3.12.1

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.
Files changed (255) hide show
  1. package/components/DuffelAncillaries/Counter.d.ts +10 -0
  2. package/components/DuffelAncillaries/DuffelAncillaries.d.ts +3 -0
  3. package/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +12 -0
  4. package/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +12 -0
  5. package/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +14 -0
  6. package/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +12 -0
  7. package/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +12 -0
  8. package/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +14 -0
  9. package/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +15 -0
  10. package/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +10 -0
  11. package/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +8 -0
  12. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +11 -0
  13. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +12 -0
  14. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +8 -0
  15. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +4 -0
  16. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +12 -0
  17. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +2 -0
  18. package/components/DuffelAncillaries/seats/Amenity.d.ts +7 -0
  19. package/components/DuffelAncillaries/seats/DeckSelect.d.ts +15 -0
  20. package/components/DuffelAncillaries/seats/Element.d.ts +16 -0
  21. package/components/DuffelAncillaries/seats/EmptyElement.d.ts +2 -0
  22. package/components/DuffelAncillaries/seats/ExitElement.d.ts +6 -0
  23. package/components/DuffelAncillaries/seats/Legend.d.ts +13 -0
  24. package/components/DuffelAncillaries/seats/Row.d.ts +14 -0
  25. package/components/DuffelAncillaries/seats/RowSection.d.ts +18 -0
  26. package/components/DuffelAncillaries/seats/SeatElement.d.ts +14 -0
  27. package/components/DuffelAncillaries/seats/SeatInfo.d.ts +8 -0
  28. package/components/DuffelAncillaries/seats/SeatMap.d.ts +13 -0
  29. package/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +2 -0
  30. package/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +13 -0
  31. package/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +15 -0
  32. package/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +4 -0
  33. package/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +16 -0
  34. package/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +11 -0
  35. package/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +6 -0
  36. package/components/DuffelCardForm/DuffelCardForm.d.ts +4 -0
  37. package/components/DuffelCardForm/DuffelCardFormCustomElement.d.ts +34 -0
  38. package/components/DuffelCardForm/lib/getIFrameEventListener.d.ts +7 -0
  39. package/components/DuffelCardForm/lib/getIFrameOriginForEnvironment.d.ts +2 -0
  40. package/components/DuffelCardForm/lib/getIframeURL.d.ts +2 -0
  41. package/components/DuffelCardForm/lib/getPathnameForIntent.d.ts +2 -0
  42. package/components/DuffelCardForm/lib/getTokenFromClientKey.d.ts +1 -0
  43. package/components/DuffelCardForm/lib/postMessageToCreateCardForTemporaryUse.d.ts +1 -0
  44. package/components/DuffelCardForm/lib/postMessageToSaveCard.d.ts +1 -0
  45. package/components/DuffelCardForm/lib/postMessageWithStyles.d.ts +2 -0
  46. package/components/DuffelCardForm/lib/types.d.ts +154 -0
  47. package/components/DuffelCardForm/lib/useDuffelCardFormActions.d.ts +24 -0
  48. package/components/DuffelNGSView/AirlineSelector.d.ts +10 -0
  49. package/components/DuffelNGSView/DuffelNGSView.d.ts +14 -0
  50. package/components/DuffelNGSView/FilterControl.d.ts +20 -0
  51. package/components/DuffelNGSView/FilterControls.d.ts +13 -0
  52. package/components/DuffelNGSView/NGSShelfInfoCard.d.ts +7 -0
  53. package/components/DuffelNGSView/NGSSliceFareCard.d.ts +10 -0
  54. package/components/DuffelNGSView/NGSTable.d.ts +15 -0
  55. package/components/DuffelNGSView/SliceSummary.d.ts +7 -0
  56. package/components/DuffelNGSView/SortingControl.d.ts +23 -0
  57. package/components/DuffelNGSView/StopsSelector.d.ts +8 -0
  58. package/components/DuffelNGSView/TimeRangeSelector.d.ts +8 -0
  59. package/components/DuffelNGSView/lib/deduplicate-mapped-offers-by-fare-brand.d.ts +7 -0
  60. package/components/DuffelNGSView/lib/does-slice-have-mixed-cabins.d.ts +4 -0
  61. package/components/DuffelNGSView/lib/filter-results.d.ts +14 -0
  62. package/components/DuffelNGSView/lib/get-initial-filter-values.d.ts +4 -0
  63. package/components/DuffelNGSView/lib/get-max-baggages-for-offer-slice.d.ts +8 -0
  64. package/components/DuffelNGSView/lib/getAirlines.d.ts +4 -0
  65. package/components/DuffelNGSView/lib/group-offers-for-ngs-view.d.ts +6 -0
  66. package/components/DuffelNGSView/lib/index.d.ts +14 -0
  67. package/components/DuffelNGSView/lib/sort-ngs-rows-by-duration.d.ts +5 -0
  68. package/components/DuffelNGSView/lib/sort-ngs-rows-by-recommended.d.ts +2 -0
  69. package/components/DuffelNGSView/lib/sort-ngs-rows-by-shelf-price.d.ts +6 -0
  70. package/components/DuffelNGSView/lib/useFilters.d.ts +28 -0
  71. package/components/DuffelPayments/DuffelPayments.d.ts +11 -0
  72. package/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +13 -0
  73. package/components/MapboxPlacesLookup/MapboxPlacesLookup.d.ts +12 -0
  74. package/components/MapboxPlacesLookup/MapboxPlacesLookupCustomElement.d.ts +13 -0
  75. package/components/MapboxPlacesLookup/lib/getPlacesFromMapboxClient.d.ts +7 -0
  76. package/components/OfferSlice/OfferSlice.d.ts +7 -0
  77. package/components/OfferSlice/OfferSliceConditions.d.ts +7 -0
  78. package/components/OfferSlice/OfferSliceDetailItem.d.ts +7 -0
  79. package/components/OfferSlice/OfferSliceDetailLayoverItem.d.ts +8 -0
  80. package/components/OfferSlice/OfferSliceDetailTravelItem.d.ts +9 -0
  81. package/components/OfferSlice/lib/getHighlightStyles.d.ts +7 -0
  82. package/components/OfferSliceModal/OfferSliceModal.d.ts +7 -0
  83. package/components/PlacesLookup/PlacesLookup.d.ts +20 -0
  84. package/components/Stays/StaysAmenities.d.ts +9 -0
  85. package/components/Stays/StaysAmenitiesCustomElement.d.ts +12 -0
  86. package/components/Stays/StaysCancellationTimeline/Policy.d.ts +8 -0
  87. package/components/Stays/StaysCancellationTimeline/StaysCancellationTimeline.d.ts +12 -0
  88. package/components/Stays/StaysCancellationTimeline/StaysCancellationTimelineDeposit.d.ts +12 -0
  89. package/components/Stays/StaysCancellationTimeline/StaysCancellationTimelineGuarantee.d.ts +12 -0
  90. package/components/Stays/StaysCancellationTimeline/StaysCancellationTimelinePayNow.d.ts +12 -0
  91. package/components/Stays/StaysCancellationTimeline/TimelineItem.d.ts +15 -0
  92. package/components/Stays/StaysCancellationTimeline/lib/isTimezoneDate.d.ts +4 -0
  93. package/components/Stays/StaysCancellationTimeline/lib/renderTimelineDateTime.d.ts +1 -0
  94. package/components/Stays/StaysRating.d.ts +6 -0
  95. package/components/Stays/StaysRatingCustomElement.d.ts +14 -0
  96. package/components/Stays/StaysRoomRateCard.d.ts +13 -0
  97. package/components/Stays/StaysRoomRateCardCustomElement.d.ts +14 -0
  98. package/components/Stays/StaysSummary.d.ts +12 -0
  99. package/components/Stays/StaysSummaryCustomElement.d.ts +12 -0
  100. package/components/Stays/lib/getRateLabel.d.ts +2 -0
  101. package/components/Stays/lib/types.d.ts +29 -0
  102. package/components/shared/AirlineLogo.d.ts +8 -0
  103. package/components/shared/AnimatedLoaderEllipsis.d.ts +2 -0
  104. package/components/shared/Button.d.ts +23 -0
  105. package/components/shared/Card.d.ts +14 -0
  106. package/components/shared/ErrorBoundary.d.ts +13 -0
  107. package/components/shared/FetchOfferErrorState.d.ts +5 -0
  108. package/components/shared/HSpace.d.ts +28 -0
  109. package/components/shared/Icon.d.ts +98 -0
  110. package/components/shared/IconButton.d.ts +16 -0
  111. package/components/shared/Modal.d.ts +14 -0
  112. package/components/shared/NonIdealState.d.ts +4 -0
  113. package/components/shared/RadioButton.d.ts +7 -0
  114. package/components/shared/SliceCarriersTitle.d.ts +8 -0
  115. package/components/shared/Stamp.d.ts +7 -0
  116. package/components/shared/Tabs.d.ts +16 -0
  117. package/components/shared/VSpace.d.ts +14 -0
  118. package/components/shared/WithComponentStyles.d.ts +7 -0
  119. package/custom-elements.d.ts +12 -0
  120. package/custom-elements.js +70 -0
  121. package/custom-elements.js.map +7 -0
  122. package/fixtures/offer-requests/orq_duplicates.d.ts +2 -0
  123. package/fixtures/passengers/mock_passengers.d.ts +4 -0
  124. package/functions/createThreeDSecureSession/client.d.ts +43 -0
  125. package/functions/createThreeDSecureSession/createThreeDSecureSession.d.ts +25 -0
  126. package/functions/createThreeDSecureSession/initEvervault.d.ts +1 -0
  127. package/functions/createThreeDSecureSession/loadEvervaultScript.d.ts +1 -0
  128. package/functions/hasService.d.ts +3 -0
  129. package/functions.d.ts +10 -0
  130. package/index.d.ts +19 -0
  131. package/index.js +55 -0
  132. package/index.js.map +7 -0
  133. package/lib/captureErrorInSentry.d.ts +1 -0
  134. package/lib/colors.d.ts +31 -0
  135. package/lib/compileCreateOrderPayload.d.ts +13 -0
  136. package/lib/convertDurationToString.d.ts +1 -0
  137. package/lib/createPriceFormatters.d.ts +12 -0
  138. package/lib/fetchFromDuffelAPI.d.ts +8 -0
  139. package/lib/fetchFromFixtures.d.ts +3 -0
  140. package/lib/formatAvailableServices.d.ts +12 -0
  141. package/lib/formatDate.d.ts +2 -0
  142. package/lib/formatSeatMaps.d.ts +4 -0
  143. package/lib/getAirlinesText.d.ts +2 -0
  144. package/lib/getBaggageServiceDescription.d.ts +2 -0
  145. package/lib/getCabinsForSegmentAndDeck.d.ts +3 -0
  146. package/lib/getCarriers.d.ts +6 -0
  147. package/lib/getCurrencyForSeatMaps.d.ts +10 -0
  148. package/lib/getCurrencyForServices.d.ts +11 -0
  149. package/lib/getDateObject.d.ts +10 -0
  150. package/lib/getDateString.d.ts +73 -0
  151. package/lib/getDayDiff.d.ts +5 -0
  152. package/lib/getDurationString.d.ts +1 -0
  153. package/lib/getFareBrandName.d.ts +2 -0
  154. package/lib/getFirstSeatElementMatchingCriteria.d.ts +4 -0
  155. package/lib/getLayoverOriginDestinationKey.d.ts +1 -0
  156. package/lib/getPassengerBySegmentList.d.ts +7 -0
  157. package/lib/getPassengerInitials.d.ts +1 -0
  158. package/lib/getPassengerMapById.d.ts +4 -0
  159. package/lib/getPassengerName.d.ts +2 -0
  160. package/lib/getRowNumber.d.ts +2 -0
  161. package/lib/getSegmentDates.d.ts +5 -0
  162. package/lib/getSegmentFlightNumber.d.ts +2 -0
  163. package/lib/getSegmentList.d.ts +3 -0
  164. package/lib/getServicePriceMapById.d.ts +4 -0
  165. package/lib/getSliceDetails.d.ts +3 -0
  166. package/lib/getSymbols.d.ts +2 -0
  167. package/lib/getTimeString.d.ts +1 -0
  168. package/lib/getTotalAmountForServices.d.ts +4 -0
  169. package/lib/getTotalQuantity.d.ts +2 -0
  170. package/lib/getTravelItem.d.ts +3 -0
  171. package/lib/hasAvailableSeatService.d.ts +3 -0
  172. package/lib/hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +4 -0
  173. package/lib/hasHighLuminance.d.ts +1 -0
  174. package/lib/hasService.d.ts +2 -0
  175. package/lib/hasWings.d.ts +2 -0
  176. package/lib/isAmenityElement.d.ts +3 -0
  177. package/lib/isBaggageService.d.ts +3 -0
  178. package/lib/isCancelForAnyReasonService.d.ts +3 -0
  179. package/lib/isFixtureOfferId.d.ts +2 -0
  180. package/lib/isISO8601Duration.d.ts +2 -0
  181. package/lib/isPayloadComplete.d.ts +3 -0
  182. package/lib/isSeatElement.d.ts +3 -0
  183. package/lib/isValidDateString.d.ts +6 -0
  184. package/lib/logging.d.ts +46 -0
  185. package/lib/moneyStringFormatter.d.ts +8 -0
  186. package/lib/offerIsExpired.d.ts +2 -0
  187. package/lib/retrieveOffer.d.ts +3 -0
  188. package/lib/retrieveOfferFromDuffelAPI.d.ts +1 -0
  189. package/lib/retrieveSeatMaps.d.ts +3 -0
  190. package/lib/retrieveSeatMapsFromDuffelAPI.d.ts +1 -0
  191. package/lib/setBodyScrollability.d.ts +1 -0
  192. package/lib/toUTCDate.d.ts +1 -0
  193. package/lib/validateProps.d.ts +7 -0
  194. package/lib/withPlural.d.ts +1 -0
  195. package/package.json +1 -1
  196. package/stories/AirlineLogo.stories.d.ts +3 -0
  197. package/stories/AirlineSelector.stories.d.ts +3 -0
  198. package/stories/BaggageSelectionModalHeader.stories.d.ts +6 -0
  199. package/stories/Button.stories.d.ts +15 -0
  200. package/stories/DuffelAncillaries.stories.d.ts +24 -0
  201. package/stories/DuffelCardForm.stories.d.ts +7 -0
  202. package/stories/DuffelNGSView.stories.d.ts +8 -0
  203. package/stories/DuffelPayments.stories.d.ts +7 -0
  204. package/stories/Icon.stories.d.ts +3 -0
  205. package/stories/IconButton.stories.d.ts +8 -0
  206. package/stories/MapboxPlacesLookup.stories.d.ts +5 -0
  207. package/stories/NGSShelfInfoCard.stories.d.ts +3 -0
  208. package/stories/NGSSliceFareCard.stories.d.ts +3 -0
  209. package/stories/OfferSlice.stories.d.ts +5 -0
  210. package/stories/OfferSliceModal.stories.d.ts +6 -0
  211. package/stories/PlacesLookup.stories.d.ts +3 -0
  212. package/stories/SeatMap.stories.d.ts +4 -0
  213. package/stories/SliceCarriersTitle.stories.d.ts +10 -0
  214. package/stories/SliceSummary.stories.d.ts +5 -0
  215. package/stories/StaysAmenities.stories.d.ts +10 -0
  216. package/stories/StaysCancellationTimeline.stories.d.ts +122 -0
  217. package/stories/StaysRating.stories.d.ts +16 -0
  218. package/stories/StaysRoomRateCard.stories.d.ts +141 -0
  219. package/stories/StaysSummary.stories.d.ts +47 -0
  220. package/tests/components/DuffelAncillaries.test.d.ts +1 -0
  221. package/tests/functions/createThreeDSecureSession.test.d.ts +1 -0
  222. package/tests/lib/convertDurationToString.test.d.ts +1 -0
  223. package/tests/lib/createPriceFormatters.test.d.ts +1 -0
  224. package/tests/lib/formatAvailableServices.test.d.ts +1 -0
  225. package/tests/lib/formatSeatMaps.test.d.ts +1 -0
  226. package/tests/lib/getAirlines.test.d.ts +1 -0
  227. package/tests/lib/getAirlinesText.test.d.ts +1 -0
  228. package/tests/lib/getCarriers.test.d.ts +1 -0
  229. package/tests/lib/getCurrencyForServices.test.d.ts +1 -0
  230. package/tests/lib/getDateObject.test.d.ts +1 -0
  231. package/tests/lib/getDateString.spec.d.ts +1 -0
  232. package/tests/lib/getDayDiff.test.d.ts +1 -0
  233. package/tests/lib/getDurationString.test.d.ts +1 -0
  234. package/tests/lib/getFareBrandName.test.d.ts +1 -0
  235. package/tests/lib/getLayoverOriginDestinationKey.test.d.ts +1 -0
  236. package/tests/lib/getRateLabel.spec.d.ts +1 -0
  237. package/tests/lib/getSegmentDates.d.ts +1 -0
  238. package/tests/lib/getSegmentDates.test.d.ts +1 -0
  239. package/tests/lib/getSegmentFlightNumber.test.d.ts +1 -0
  240. package/tests/lib/getSliceDetails.test.d.ts +1 -0
  241. package/tests/lib/getTimeString.test.d.ts +1 -0
  242. package/tests/lib/getTravelItem.test.d.ts +1 -0
  243. package/tests/lib/groupOffersForNGSView.test.d.ts +1 -0
  244. package/tests/lib/hasAvailableSeatService.test.d.ts +1 -0
  245. package/tests/lib/hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected.test.d.ts +1 -0
  246. package/tests/lib/isValidDateString.test.d.ts +1 -0
  247. package/tests/lib/logging.test.d.ts +1 -0
  248. package/tests/lib/moneyStringFormatter.test.d.ts +1 -0
  249. package/tests/lib/toUTCDate.test.d.ts +1 -0
  250. package/tests/lib/validateProps.test.d.ts +5 -0
  251. package/tsconfig.tsbuildinfo +1 -0
  252. package/types/CurrencyConversion.d.ts +10 -0
  253. package/types/DuffelAncillariesProps.d.ts +127 -0
  254. package/types/TravelDetails.d.ts +77 -0
  255. package/types/index.d.ts +4 -0
@@ -0,0 +1,8 @@
1
+ import { IconName } from "@components/shared/Icon";
2
+ import { Color } from "@lib/colors";
3
+ import * as React from "react";
4
+ export declare const Policy: React.FC<React.PropsWithChildren<{
5
+ iconName: IconName;
6
+ iconColor: Color;
7
+ label?: string;
8
+ }>>;
@@ -0,0 +1,12 @@
1
+ /// <reference types="@duffel/api" />
2
+ import * as React from "react";
3
+ import { StaysRate, StaysRateCancellationTimeline } from "@duffel/api/types";
4
+ export interface StaysCancellationTimelineProps {
5
+ paymentType?: StaysRate["payment_type"];
6
+ cancellationTimeline: StaysRateCancellationTimeline[];
7
+ totalAmount: string;
8
+ bookingDate: string;
9
+ checkInDate: string;
10
+ checkInAfterTime?: string;
11
+ }
12
+ export declare const StaysCancellationTimeline: React.FC<StaysCancellationTimelineProps>;
@@ -0,0 +1,12 @@
1
+ /// <reference types="@duffel/api" />
2
+ import * as React from "react";
3
+ import { StaysRateCancellationTimeline } from "@duffel/api/types";
4
+ interface StaysCancellationTimelineDepositProps {
5
+ cancellationTimeline: StaysRateCancellationTimeline[];
6
+ totalAmount: string;
7
+ bookingDate: string;
8
+ checkInDate: string;
9
+ checkInAfterTime?: string;
10
+ }
11
+ export declare const StaysCancellationTimelineDeposit: React.FC<StaysCancellationTimelineDepositProps>;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="@duffel/api" />
2
+ import * as React from "react";
3
+ import { StaysRateCancellationTimeline } from "@duffel/api/types";
4
+ interface StaysCancellationTimelineGuaranteeProps {
5
+ cancellationTimeline: StaysRateCancellationTimeline[];
6
+ totalAmount: string;
7
+ bookingDate: string;
8
+ checkInDate: string;
9
+ checkInAfterTime?: string;
10
+ }
11
+ export declare const StaysCancellationTimelineGuarantee: React.FC<StaysCancellationTimelineGuaranteeProps>;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="@duffel/api" />
2
+ import * as React from "react";
3
+ import { StaysRateCancellationTimeline } from "@duffel/api/types";
4
+ interface StaysCancellationTimelinePayNowProps {
5
+ cancellationTimeline: StaysRateCancellationTimeline[];
6
+ totalAmount: string;
7
+ bookingDate: string;
8
+ checkInDate: string;
9
+ checkInAfterTime?: string;
10
+ }
11
+ export declare const StaysCancellationTimelinePayNow: React.FC<StaysCancellationTimelinePayNowProps>;
12
+ export {};
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { Color } from "@lib/colors";
3
+ export interface TimelineItemProps {
4
+ label?: string | React.ReactNode;
5
+ description?: string;
6
+ dot?: boolean;
7
+ dotColor?: Color;
8
+ lineColorLeft?: Color;
9
+ lineColorRight?: Color;
10
+ size?: "extra-small" | "small" | "medium" | "large" | "extra-large";
11
+ tooltip?: string | boolean;
12
+ aboveDot?: React.ReactNode;
13
+ date?: string;
14
+ }
15
+ export declare const TimelineItem: React.ForwardRefExoticComponent<TimelineItemProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Checks if an ISO string is a timezoned date.
3
+ */
4
+ export declare const isTimezoneDate: (date: string) => boolean;
@@ -0,0 +1 @@
1
+ export declare const renderTimelineDateTime: (date: string, showTime?: boolean, dateTimeZone?: string) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ export interface StaysRatingProps {
3
+ rating: number;
4
+ small?: boolean;
5
+ }
6
+ export declare const StaysRating: React.FC<StaysRatingProps>;
@@ -0,0 +1,14 @@
1
+ import { StaysRatingProps } from "./StaysRating";
2
+ declare const CUSTOM_ELEMENT_TAG = "duffel-stays-rating";
3
+ type CustomElementRenderArguments = StaysRatingProps & {
4
+ elementId: string;
5
+ };
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ [CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
10
+ }
11
+ }
12
+ }
13
+ export declare function renderDuffelStaysRatingCustomElement(props: CustomElementRenderArguments): void;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="@duffel/api" />
2
+ import * as React from "react";
3
+ import { StaysRoomRate } from "@duffel/api/types";
4
+ export interface StaysRoomRateCardProps {
5
+ rate: StaysRoomRate;
6
+ searchNumberOfRooms: number;
7
+ numberOfNights: number;
8
+ selected: boolean;
9
+ onSelectRate: (rateId: string) => void;
10
+ hidePaymentMethod?: boolean;
11
+ hideSource?: boolean;
12
+ }
13
+ export declare const StaysRoomRateCard: React.FC<StaysRoomRateCardProps>;
@@ -0,0 +1,14 @@
1
+ import { StaysRoomRateCardProps } from "./StaysRoomRateCard";
2
+ declare const CUSTOM_ELEMENT_TAG = "duffel-stays-room-rate-card";
3
+ type CustomElementRenderArguments = StaysRoomRateCardProps & {
4
+ elementId: string;
5
+ };
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ [CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
10
+ }
11
+ }
12
+ }
13
+ export declare function renderDuffelStaysRoomRateCardCustomElement(props: CustomElementRenderArguments): void;
14
+ export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="@duffel/api" />
2
+ import { StaysAccommodation, StaysBooking } from "@duffel/api/types";
3
+ export interface StaysSummaryProps {
4
+ accommodation: StaysAccommodation;
5
+ checkInDate: Date;
6
+ checkOutDate: Date;
7
+ numRooms?: number;
8
+ supportedLoyaltyProgramme?: StaysBooking["supported_loyalty_programme"];
9
+ loyaltyProgrammeAccountNumber?: string | null;
10
+ accommodationSpecialRequests?: string | null;
11
+ }
12
+ export declare const StaysSummary: React.FC<React.PropsWithChildren<StaysSummaryProps>>;
@@ -0,0 +1,12 @@
1
+ import { StaysSummaryProps } from "./StaysSummary";
2
+ declare const CUSTOM_ELEMENT_TAG = "duffel-stays-summary";
3
+ type CustomElementRenderArguments = StaysSummaryProps;
4
+ declare global {
5
+ namespace JSX {
6
+ interface IntrinsicElements {
7
+ [CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
8
+ }
9
+ }
10
+ }
11
+ export declare function renderDuffelStaysSummaryCustomElement(props: CustomElementRenderArguments): void;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ import { StaysRate } from "@duffel/api/types";
2
+ export declare const getRateLabel: (paymentMethod: StaysRate["available_payment_methods"][number], paymentType: StaysRate["payment_type"]) => string | undefined;
@@ -0,0 +1,29 @@
1
+ import { IconName } from "@components/shared/Icon";
2
+ import { StaysRoomRate } from "@duffel/api/types";
3
+ export declare const LOYALTY_PROGRAMS_NAME_MAP: {
4
+ wyndham_rewards: string;
5
+ choice_privileges: string;
6
+ marriott_bonvoy: string;
7
+ best_western_rewards: string;
8
+ world_of_hyatt: string;
9
+ hilton_honors: string;
10
+ ihg_one_rewards: string;
11
+ leaders_club: string;
12
+ stash_rewards: string;
13
+ omni_select_guest: string;
14
+ i_prefer: string;
15
+ accor_live_limitless: string;
16
+ my_6: string;
17
+ jumeirah_one: string;
18
+ global_hotel_alliance_discovery: string;
19
+ duffel_hotel_group_rewards: string;
20
+ };
21
+ export declare const SOURCE_NAME_MAP: {
22
+ bookingcom: string;
23
+ expedia: string;
24
+ priceline: string;
25
+ travelport: string;
26
+ duffel_hotel_group: string;
27
+ };
28
+ export declare const getBoardTypeLabel: (boardType: StaysRoomRate["board_type"]) => "Room only, no meals" | "Breakfast included" | "Half board" | "Full board" | "All inclusive";
29
+ export declare const boardTypeIcon: (boardType: StaysRoomRate["board_type"]) => IconName;
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ interface AirlineLogoProps {
3
+ name: string;
4
+ iataCode: string | null;
5
+ size?: number;
6
+ }
7
+ export declare const AirlineLogo: React.FC<AirlineLogoProps>;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export declare const AnimatedLoaderEllipsis: React.FC;
@@ -0,0 +1,23 @@
1
+ import { IconName } from "@components/shared/Icon";
2
+ import * as React from "react";
3
+ declare const BUTTON_VARIANTS: {
4
+ primary: string;
5
+ outlined: string;
6
+ destructive: string;
7
+ };
8
+ type ButtonVariants = keyof typeof BUTTON_VARIANTS;
9
+ declare const BUTTON_SIZES: {
10
+ 32: string;
11
+ 40: string;
12
+ 48: string;
13
+ };
14
+ type ButtonSizes = keyof typeof BUTTON_SIZES;
15
+ type NativeButtonProps = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
16
+ export interface ButtonProps extends Pick<NativeButtonProps, "id" | "onClick" | "disabled" | "children" | "className" | "type"> {
17
+ "data-testid"?: string;
18
+ iconBefore?: IconName;
19
+ variant?: ButtonVariants;
20
+ size?: ButtonSizes;
21
+ }
22
+ export declare const Button: React.FC<ButtonProps>;
23
+ export {};
@@ -0,0 +1,14 @@
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>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export declare class ErrorBoundary extends React.Component<{
3
+ children: React.ReactNode | React.ReactNode[];
4
+ }> {
5
+ state: {
6
+ hasError: boolean;
7
+ };
8
+ static getDerivedStateFromError(): {
9
+ hasError: boolean;
10
+ };
11
+ componentDidCatch(error: Error): void;
12
+ render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
13
+ }
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export declare const FetchOfferErrorState: React.FC<{
3
+ height: string;
4
+ message: string;
5
+ }>;
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ type DivProps = JSX.IntrinsicElements["div"];
3
+ export interface HSpaceProps extends DivProps {
4
+ /**
5
+ * A space-delimited list of class names to pass along to a child element.
6
+ */
7
+ className?: string;
8
+ /**
9
+ * The vertical spacing between each child element
10
+ */
11
+ space: 0 | 4 | 8 | 12 | 16;
12
+ /**
13
+ * If you'd like all children inside your horizontal space container
14
+ * to be vertically aligned to the center of the div, you can set `alignCenter` to `true`
15
+ *
16
+ * Default: `false`
17
+ */
18
+ alignCenter?: boolean;
19
+ /**
20
+ * If you'd like all children inside your horizontal space container
21
+ * to be spread out from one another, you can set `spaceBetween` to `true`
22
+ *
23
+ * Default: `false`
24
+ */
25
+ spaceBetween?: boolean;
26
+ }
27
+ export declare const HSpace: React.FC<HSpaceProps>;
28
+ export {};
@@ -0,0 +1,98 @@
1
+ import { Color } from "@lib/colors";
2
+ import * as React from "react";
3
+ export declare const ICON_MAP: {
4
+ accessible: import("react/jsx-runtime").JSX.Element;
5
+ add: import("react/jsx-runtime").JSX.Element;
6
+ airline_seat_flat: import("react/jsx-runtime").JSX.Element;
7
+ airline_seat_individual_suite: import("react/jsx-runtime").JSX.Element;
8
+ airline_seat_legroom_extra: import("react/jsx-runtime").JSX.Element;
9
+ airline_seat_recline_extra: import("react/jsx-runtime").JSX.Element;
10
+ airline_seat_recline_normal: import("react/jsx-runtime").JSX.Element;
11
+ airline_stops: import("react/jsx-runtime").JSX.Element;
12
+ airplane_ticket: import("react/jsx-runtime").JSX.Element;
13
+ apartment: import("react/jsx-runtime").JSX.Element;
14
+ arrow_downward: import("react/jsx-runtime").JSX.Element;
15
+ arrow_drop_down: import("react/jsx-runtime").JSX.Element;
16
+ arrow_forward: import("react/jsx-runtime").JSX.Element;
17
+ arrow_left: import("react/jsx-runtime").JSX.Element;
18
+ arrow_right: import("react/jsx-runtime").JSX.Element;
19
+ arrow_upward: import("react/jsx-runtime").JSX.Element;
20
+ atm: import("react/jsx-runtime").JSX.Element;
21
+ autorenew: import("react/jsx-runtime").JSX.Element;
22
+ bakery_dining: import("react/jsx-runtime").JSX.Element;
23
+ bassinet: import("react/jsx-runtime").JSX.Element;
24
+ bedroom_parent: import("react/jsx-runtime").JSX.Element;
25
+ brunch_dining: import("react/jsx-runtime").JSX.Element;
26
+ cabin_bag: import("react/jsx-runtime").JSX.Element;
27
+ calendar_month: import("react/jsx-runtime").JSX.Element;
28
+ carry_on_bag_inactive: import("react/jsx-runtime").JSX.Element;
29
+ check: import("react/jsx-runtime").JSX.Element;
30
+ check_circle: import("react/jsx-runtime").JSX.Element;
31
+ check_large: import("react/jsx-runtime").JSX.Element;
32
+ check_small: import("react/jsx-runtime").JSX.Element;
33
+ checked_bag: import("react/jsx-runtime").JSX.Element;
34
+ chevron: import("react/jsx-runtime").JSX.Element;
35
+ child_care: import("react/jsx-runtime").JSX.Element;
36
+ close: import("react/jsx-runtime").JSX.Element;
37
+ closet: import("react/jsx-runtime").JSX.Element;
38
+ concierge: import("react/jsx-runtime").JSX.Element;
39
+ credit_card: import("react/jsx-runtime").JSX.Element;
40
+ currency_exchange: import("react/jsx-runtime").JSX.Element;
41
+ dinner_dining: import("react/jsx-runtime").JSX.Element;
42
+ exit_row: import("react/jsx-runtime").JSX.Element;
43
+ exit_row_right: import("react/jsx-runtime").JSX.Element;
44
+ expand_content: import("react/jsx-runtime").JSX.Element;
45
+ fitness_center: import("react/jsx-runtime").JSX.Element;
46
+ flight: import("react/jsx-runtime").JSX.Element;
47
+ flight_class: import("react/jsx-runtime").JSX.Element;
48
+ flight_landing: import("react/jsx-runtime").JSX.Element;
49
+ flight_takeoff: import("react/jsx-runtime").JSX.Element;
50
+ galley: import("react/jsx-runtime").JSX.Element;
51
+ hearing: import("react/jsx-runtime").JSX.Element;
52
+ image_not_supported: import("react/jsx-runtime").JSX.Element;
53
+ info_outline: import("react/jsx-runtime").JSX.Element;
54
+ laundry: import("react/jsx-runtime").JSX.Element;
55
+ lavatory: import("react/jsx-runtime").JSX.Element;
56
+ lie_flat_seat: import("react/jsx-runtime").JSX.Element;
57
+ local_bar: import("react/jsx-runtime").JSX.Element;
58
+ local_parking: import("react/jsx-runtime").JSX.Element;
59
+ loyalty: import("react/jsx-runtime").JSX.Element;
60
+ luggage: import("react/jsx-runtime").JSX.Element;
61
+ meeting_room: import("react/jsx-runtime").JSX.Element;
62
+ minus: import("react/jsx-runtime").JSX.Element;
63
+ no_airplane: import("react/jsx-runtime").JSX.Element;
64
+ no_bag: import("react/jsx-runtime").JSX.Element;
65
+ no_seat: import("react/jsx-runtime").JSX.Element;
66
+ no_stroller: import("react/jsx-runtime").JSX.Element;
67
+ north_east: import("react/jsx-runtime").JSX.Element;
68
+ pet_supplies: import("react/jsx-runtime").JSX.Element;
69
+ pool: import("react/jsx-runtime").JSX.Element;
70
+ refund: import("react/jsx-runtime").JSX.Element;
71
+ restaurant: import("react/jsx-runtime").JSX.Element;
72
+ room_service: import("react/jsx-runtime").JSX.Element;
73
+ seat: import("react/jsx-runtime").JSX.Element;
74
+ seat_paid_indicator: import("react/jsx-runtime").JSX.Element;
75
+ shield_with_moon: import("react/jsx-runtime").JSX.Element;
76
+ shopfront: import("react/jsx-runtime").JSX.Element;
77
+ shopping_bag: import("react/jsx-runtime").JSX.Element;
78
+ spa: import("react/jsx-runtime").JSX.Element;
79
+ stairs: import("react/jsx-runtime").JSX.Element;
80
+ star: import("react/jsx-runtime").JSX.Element;
81
+ unfold_more: import("react/jsx-runtime").JSX.Element;
82
+ wallet: import("react/jsx-runtime").JSX.Element;
83
+ warning: import("react/jsx-runtime").JSX.Element;
84
+ wifi: import("react/jsx-runtime").JSX.Element;
85
+ };
86
+ export type IconName = keyof typeof ICON_MAP;
87
+ interface IconProps {
88
+ name: IconName;
89
+ className?: string;
90
+ color?: Color;
91
+ size?: number;
92
+ onClick?: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
93
+ ml?: string;
94
+ viewBox?: string;
95
+ style?: React.CSSProperties;
96
+ }
97
+ export declare const Icon: React.FunctionComponent<IconProps>;
98
+ export {};
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import { IconName } from "./Icon";
3
+ declare const ICON_BUTTON_VARIANTS: {
4
+ primary: string;
5
+ outlined: string;
6
+ };
7
+ type IconButtonVariants = keyof typeof ICON_BUTTON_VARIANTS;
8
+ type NativeButtonProps = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
9
+ export interface IconButtonProps extends Pick<NativeButtonProps, "id" | "onClick" | "disabled" | "className"> {
10
+ "data-testid"?: string;
11
+ icon: IconName;
12
+ title: string;
13
+ variant?: IconButtonVariants;
14
+ }
15
+ export declare const IconButton: React.FC<IconButtonProps>;
16
+ export {};
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ export interface ModalProps {
3
+ onClose: () => void;
4
+ isOpen: boolean;
5
+ children: React.ReactNode;
6
+ }
7
+ export declare const Modal: React.FC<ModalProps>;
8
+ interface ModalBodyProps {
9
+ tall?: boolean;
10
+ noPadding?: boolean;
11
+ children: React.ReactNode;
12
+ }
13
+ export declare const ModalBody: React.FC<ModalBodyProps>;
14
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export declare const NonIdealState: React.FC<React.PropsWithChildren<{
3
+ style?: React.CSSProperties;
4
+ }>>;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export interface RadioButtonProps {
3
+ value: string;
4
+ checked?: boolean;
5
+ className?: string;
6
+ }
7
+ export declare const RadioButton: React.FC<RadioButtonProps>;
@@ -0,0 +1,8 @@
1
+ /// <reference types="@duffel/api" />
2
+ import { OfferSlice, OfferSliceSegment } from "@duffel/api/types";
3
+ import * as React from "react";
4
+ export interface SliceCarriersTitleProps {
5
+ slice: OfferSlice;
6
+ }
7
+ export declare const SliceCarriersTitle: React.FC<SliceCarriersTitleProps>;
8
+ export declare function getSegmentCarriersTitle(segment: OfferSliceSegment): string;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ export interface StampProps {
3
+ backgroundColor: React.CSSProperties["backgroundColor"];
4
+ color: React.CSSProperties["color"];
5
+ children: React.ReactNode;
6
+ }
7
+ export declare const Stamp: React.FC<StampProps>;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ export interface TabsProps {
3
+ /**
4
+ * The currently selected tab option
5
+ */
6
+ value: string;
7
+ /**
8
+ * Callback for when a new tab option is selected
9
+ */
10
+ onChange: (value: string) => void;
11
+ /**
12
+ * The options you want to render on the tabs
13
+ */
14
+ options: string[];
15
+ }
16
+ export declare const Tabs: React.FC<TabsProps>;
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ type DivProps = JSX.IntrinsicElements["div"];
3
+ export interface VSpaceProps extends DivProps {
4
+ /**
5
+ * A space-delimited list of class names to pass along to a child element.
6
+ */
7
+ className?: string;
8
+ /**
9
+ * The vertical spacing between each child element
10
+ */
11
+ space: 0 | 4 | 8 | 12 | 16 | 24;
12
+ }
13
+ export declare const VSpace: React.FC<VSpaceProps>;
14
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export declare const hrefToComponentStyles: string;
3
+ type WithComponentStylesProps = {
4
+ children?: React.ReactNode;
5
+ };
6
+ export declare const WithComponentStyles: React.FC<WithComponentStylesProps>;
7
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is one of the entry points for the library -- `@duffel/components/custom-elements`.
3
+ * If you'd like to expose other custom element functions, please add them here.
4
+ */
5
+ export { onDuffelAncillariesPayloadReady, renderDuffelAncillariesCustomElement, } from "./components/DuffelAncillaries/DuffelAncillariesCustomElement";
6
+ export { createCardForTemporaryUse, onCreateCardForTemporaryUseFailure, onCreateCardForTemporaryUseSuccess, onSaveCardFailure, onSaveCardSuccess, onSecurityPolicyViolation, renderDuffelCardFormCustomElement, saveCard, } from "./components/DuffelCardForm/DuffelCardFormCustomElement";
7
+ export { onDuffelPaymentsFailedPayment, onDuffelPaymentsSuccessfulPayment, renderDuffelPaymentsCustomElement, } from "./components/DuffelPayments/DuffelPaymentsCustomElement";
8
+ export { onMapboxPlacesLookupPlaceSelected, renderMapboxPlacesLookupCustomElement, } from "./components/MapboxPlacesLookup/MapboxPlacesLookupCustomElement";
9
+ export { renderDuffelStaysAmenitiesCustomElement } from "./components/Stays/StaysAmenitiesCustomElement";
10
+ export { renderDuffelStaysRatingCustomElement } from "./components/Stays/StaysRatingCustomElement";
11
+ export { renderDuffelStaysRoomRateCardCustomElement } from "./components/Stays/StaysRoomRateCardCustomElement";
12
+ export { renderDuffelStaysSummaryCustomElement } from "./components/Stays/StaysSummaryCustomElement";