@duffel/components 3.3.0 → 3.3.1--canary.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.
@@ -0,0 +1,9 @@
1
+ /// <reference types="@duffel/api" />
2
+ import * as React from "react";
3
+ import { IconName } from "@components/shared/Icon";
4
+ import { StaysAccommodation, StaysAmenity } from "@duffel/api/types";
5
+ export declare const amenityIcon: (type: StaysAmenity["type"]) => IconName;
6
+ export interface StaysAmenitiesProps {
7
+ amenities: StaysAccommodation["amenities"];
8
+ }
9
+ export declare const StaysAmenities: React.FC<StaysAmenitiesProps>;
@@ -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,11 @@
1
+ import { StaysRatingProps } from "./StaysRating";
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ "duffel-stays-rating": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ type DuffelStaysRatingCustomElementRenderArguments = StaysRatingProps;
10
+ export declare function renderDuffelStaysRatingCustomElement(props: DuffelStaysRatingCustomElementRenderArguments): void;
11
+ export {};
@@ -0,0 +1,12 @@
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
+ showPotentialCommission?: boolean;
7
+ searchNumberOfRooms: number;
8
+ numberOfNights: number;
9
+ selected: boolean;
10
+ onSelectRate: (rateId: string) => void;
11
+ }
12
+ export declare const StaysRoomRateCard: React.FC<StaysRoomRateCardProps>;
@@ -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,22 @@
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 getBoardTypeLabel: (boardType: StaysRoomRate["board_type"]) => "Room only, no meals" | "Breakfast included" | "Half board" | "Full board" | "All inclusive";
22
+ export declare const boardTypeIcon: (boardType: StaysRoomRate["board_type"]) => IconName;
@@ -8,7 +8,21 @@ export interface HSpaceProps extends DivProps {
8
8
  /**
9
9
  * The vertical spacing between each child element
10
10
  */
11
- space: 0 | 4 | 8 | 16;
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;
12
26
  }
13
27
  export declare const HSpace: React.FC<HSpaceProps>;
14
28
  export {};
@@ -1,35 +1,64 @@
1
+ import { Color } from "@lib/colors";
1
2
  import * as React from "react";
2
3
  export declare const ICON_MAP: {
4
+ accessible: import("react/jsx-runtime").JSX.Element;
3
5
  add: import("react/jsx-runtime").JSX.Element;
4
6
  apartment: import("react/jsx-runtime").JSX.Element;
5
7
  arrow_forward: import("react/jsx-runtime").JSX.Element;
6
8
  arrow_left: import("react/jsx-runtime").JSX.Element;
7
9
  arrow_right: import("react/jsx-runtime").JSX.Element;
10
+ atm: import("react/jsx-runtime").JSX.Element;
8
11
  autorenew: import("react/jsx-runtime").JSX.Element;
12
+ bakery_dining: import("react/jsx-runtime").JSX.Element;
9
13
  bassinet: import("react/jsx-runtime").JSX.Element;
14
+ bedroom_parent: import("react/jsx-runtime").JSX.Element;
15
+ brunch_dining: import("react/jsx-runtime").JSX.Element;
10
16
  cabin_bag: import("react/jsx-runtime").JSX.Element;
11
17
  check: import("react/jsx-runtime").JSX.Element;
18
+ check_circle: import("react/jsx-runtime").JSX.Element;
12
19
  checked_bag: import("react/jsx-runtime").JSX.Element;
13
20
  chevron: import("react/jsx-runtime").JSX.Element;
21
+ child_care: import("react/jsx-runtime").JSX.Element;
14
22
  close: import("react/jsx-runtime").JSX.Element;
15
23
  closet: import("react/jsx-runtime").JSX.Element;
24
+ concierge: import("react/jsx-runtime").JSX.Element;
25
+ credit_card: import("react/jsx-runtime").JSX.Element;
26
+ dinner_dining: import("react/jsx-runtime").JSX.Element;
16
27
  exit_row: import("react/jsx-runtime").JSX.Element;
17
28
  exit_row_right: import("react/jsx-runtime").JSX.Element;
18
29
  expand_content: import("react/jsx-runtime").JSX.Element;
30
+ fitness_center: import("react/jsx-runtime").JSX.Element;
19
31
  flight_class: import("react/jsx-runtime").JSX.Element;
20
32
  flight_takeoff: import("react/jsx-runtime").JSX.Element;
21
33
  galley: import("react/jsx-runtime").JSX.Element;
34
+ hearing: import("react/jsx-runtime").JSX.Element;
35
+ image_not_supported: import("react/jsx-runtime").JSX.Element;
36
+ info_outline: import("react/jsx-runtime").JSX.Element;
37
+ laundry: import("react/jsx-runtime").JSX.Element;
22
38
  lavatory: import("react/jsx-runtime").JSX.Element;
23
39
  lie_flat_seat: import("react/jsx-runtime").JSX.Element;
40
+ local_bar: import("react/jsx-runtime").JSX.Element;
41
+ local_parking: import("react/jsx-runtime").JSX.Element;
42
+ loyalty: import("react/jsx-runtime").JSX.Element;
43
+ meeting_room: import("react/jsx-runtime").JSX.Element;
24
44
  minus: import("react/jsx-runtime").JSX.Element;
25
45
  no_airplane: import("react/jsx-runtime").JSX.Element;
26
46
  no_bag: import("react/jsx-runtime").JSX.Element;
27
47
  no_seat: import("react/jsx-runtime").JSX.Element;
48
+ no_stroller: import("react/jsx-runtime").JSX.Element;
28
49
  north_east: import("react/jsx-runtime").JSX.Element;
50
+ pet_supplies: import("react/jsx-runtime").JSX.Element;
51
+ pool: import("react/jsx-runtime").JSX.Element;
52
+ refund: import("react/jsx-runtime").JSX.Element;
53
+ restaurant: import("react/jsx-runtime").JSX.Element;
54
+ room_service: import("react/jsx-runtime").JSX.Element;
29
55
  seat: import("react/jsx-runtime").JSX.Element;
30
56
  seat_paid_indicator: import("react/jsx-runtime").JSX.Element;
31
57
  shield_with_moon: import("react/jsx-runtime").JSX.Element;
58
+ spa: import("react/jsx-runtime").JSX.Element;
32
59
  stairs: import("react/jsx-runtime").JSX.Element;
60
+ star: import("react/jsx-runtime").JSX.Element;
61
+ wallet: import("react/jsx-runtime").JSX.Element;
33
62
  warning: import("react/jsx-runtime").JSX.Element;
34
63
  wifi: import("react/jsx-runtime").JSX.Element;
35
64
  };
@@ -37,6 +66,7 @@ export type IconName = keyof typeof ICON_MAP;
37
66
  interface IconProps {
38
67
  name: IconName;
39
68
  className?: string;
69
+ color?: Color;
40
70
  size?: number;
41
71
  onClick?: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
42
72
  ml?: string;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ export interface RadioButtonProps<T extends string | number> {
3
+ value: T;
4
+ checked?: boolean;
5
+ }
6
+ export declare const RadioButton: React.FC<RadioButtonProps<any>>;
@@ -8,7 +8,7 @@ export interface VSpaceProps extends DivProps {
8
8
  /**
9
9
  * The vertical spacing between each child element
10
10
  */
11
- space: 0 | 4 | 8 | 16;
11
+ space: 0 | 4 | 8 | 12 | 16 | 24;
12
12
  }
13
13
  export declare const VSpace: React.FC<VSpaceProps>;
14
14
  export {};
@@ -4,3 +4,4 @@
4
4
  */
5
5
  export { onDuffelAncillariesPayloadReady, renderDuffelAncillariesCustomElement, } from "./components/DuffelAncillaries/DuffelAncillariesCustomElement";
6
6
  export { onDuffelPaymentsFailedPayment, onDuffelPaymentsSuccessfulPayment, renderDuffelPaymentsCustomElement, } from "./components/DuffelPayments/DuffelPaymentsCustomElement";
7
+ export { renderDuffelStaysRatingCustomElement } from "./components/Stays/StaysRatingCustomElement";