related-ui-components 2.7.5 → 2.7.7
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/lib/module/app.js +17 -57
- package/lib/module/app.js.map +1 -1
- package/lib/module/components/CarouselCardStack/CarouselCardStack.js +99 -81
- package/lib/module/components/CarouselCardStack/CarouselCardStack.js.map +1 -1
- package/lib/module/components/TravelBooking/FlightSummary.js +219 -112
- package/lib/module/components/TravelBooking/FlightSummary.js.map +1 -1
- package/lib/module/components/TravelBooking/HotelSummary.js +168 -37
- package/lib/module/components/TravelBooking/HotelSummary.js.map +1 -1
- package/lib/module/components/TravelBooking/SummaryBar.js +239 -172
- package/lib/module/components/TravelBooking/SummaryBar.js.map +1 -1
- package/lib/module/components/TravelBooking/TravelBooking.js +407 -241
- package/lib/module/components/TravelBooking/TravelBooking.js.map +1 -1
- package/lib/module/components/TravelBooking/index.js +5 -4
- package/lib/module/components/TravelBooking/index.js.map +1 -1
- package/lib/typescript/src/app.d.ts.map +1 -1
- package/lib/typescript/src/components/CarouselCardStack/CarouselCardStack.d.ts.map +1 -1
- package/lib/typescript/src/components/TravelBooking/FlightSummary.d.ts +25 -11
- package/lib/typescript/src/components/TravelBooking/FlightSummary.d.ts.map +1 -1
- package/lib/typescript/src/components/TravelBooking/HotelSummary.d.ts +14 -0
- package/lib/typescript/src/components/TravelBooking/HotelSummary.d.ts.map +1 -1
- package/lib/typescript/src/components/TravelBooking/SummaryBar.d.ts +1 -16
- package/lib/typescript/src/components/TravelBooking/SummaryBar.d.ts.map +1 -1
- package/lib/typescript/src/components/TravelBooking/TravelBooking.d.ts +1 -83
- package/lib/typescript/src/components/TravelBooking/TravelBooking.d.ts.map +1 -1
- package/lib/typescript/src/components/TravelBooking/index.d.ts +0 -4
- package/lib/typescript/src/components/TravelBooking/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/app.tsx +18 -39
- package/src/components/CarouselCardStack/CarouselCardStack.tsx +130 -120
- package/src/components/TravelBooking/FlightSummary.tsx +264 -164
- package/src/components/TravelBooking/HotelSummary.tsx +243 -76
- package/src/components/TravelBooking/SummaryBar.tsx +239 -239
- package/src/components/TravelBooking/TravelBooking.tsx +407 -407
- package/src/components/TravelBooking/index.ts +4 -4
- package/src/index.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/TravelBooking/TravelBooking.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAAA","ignoreList":[]}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
export { default } from "./TravelBooking
|
|
4
|
-
export * from "./TravelBooking
|
|
3
|
+
// export { default, type TravelBookingProps } from "./TravelBooking";
|
|
4
|
+
// export * from "./TravelBooking"
|
|
5
|
+
|
|
5
6
|
export { default as CarRentalForm } from "./CarRentalForm.js";
|
|
6
7
|
export * from "./CarRentalForm.js";
|
|
7
8
|
export { default as FlightForm } from "./FlightForm.js";
|
|
8
9
|
export * from "./FlightForm.js";
|
|
9
10
|
export { default as HotelForm } from "./HotelForm.js";
|
|
10
11
|
export * from "./HotelForm.js";
|
|
11
|
-
export { default as SummaryBar } from "./SummaryBar
|
|
12
|
-
export * from "./SummaryBar
|
|
12
|
+
// export { default as SummaryBar, type SummaryBarProps, type SelectionCallbackDataType } from "./SummaryBar";
|
|
13
|
+
// export * from "./SummaryBar";
|
|
13
14
|
export { default as TabSelector } from "./TabSelector.js";
|
|
14
15
|
export * from "./TabSelector.js";
|
|
15
16
|
export { default as FlightSummary } from "./FlightSummary.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","CarRentalForm","FlightForm","HotelForm","
|
|
1
|
+
{"version":3,"names":["default","CarRentalForm","FlightForm","HotelForm","TabSelector","FlightSummary","HotelSummary"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/TravelBooking/index.ts"],"mappings":";;AACA;AACA;;AAEA,SAASA,OAAO,IAAIC,aAAa,QAAiC,oBAAiB;AACnF,cAAc,oBAAiB;AAC/B,SAASD,OAAO,IAAIE,UAAU,QAA8B,iBAAc;AAC1E,cAAc,iBAAc;AAC5B,SAASF,OAAO,IAAIG,SAAS,QAA6B,gBAAa;AACvE,cAAc,gBAAa;AAC3B;AACA;AACA,SAASH,OAAO,IAAII,WAAW,QAA+B,kBAAe;AAC7E,cAAc,kBAAe;AAC7B,SAASJ,OAAO,IAAIK,aAAa,QAAuD,oBAAiB;AACzG,cAAc,oBAAiB;AAC/B,SAASL,OAAO,IAAIM,YAAY,QAAgD,mBAAgB;AAChG,cAAc,mBAAgB;AAE9B,cAAc,YAAS","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AA+BnD,QAAA,MAAM,GAAG,yBA6GR,CAAC;AAWF,eAAe,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselCardStack.d.ts","sourceRoot":"","sources":["../../../../../src/components/CarouselCardStack/CarouselCardStack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CarouselCardStack.d.ts","sourceRoot":"","sources":["../../../../../src/components/CarouselCardStack/CarouselCardStack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAgC5D,UAAU,oBAAoB;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,UAAU,sBAAsB;IAC9B,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA4GD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAoIvD,CAAC;AAkDF,eAAe,iBAAiB,CAAC"}
|
|
@@ -2,34 +2,46 @@ import React from "react";
|
|
|
2
2
|
import { StyleProp, ViewStyle, TextStyle } from "react-native";
|
|
3
3
|
import { NumericStepperProps } from "../NumericStepper";
|
|
4
4
|
export interface PassengerConfig {
|
|
5
|
-
key:
|
|
5
|
+
key: "adults" | "children" | "infants";
|
|
6
6
|
name: string;
|
|
7
7
|
description: string;
|
|
8
8
|
defaultValue: number;
|
|
9
9
|
minValue: number;
|
|
10
10
|
maxValue?: number;
|
|
11
|
+
ageRange?: {
|
|
12
|
+
min: number;
|
|
13
|
+
max: number;
|
|
14
|
+
};
|
|
15
|
+
defaultAge?: number;
|
|
11
16
|
}
|
|
12
|
-
export interface
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
export interface FlightClassConfig {
|
|
17
|
-
value: string;
|
|
18
|
-
name: string;
|
|
17
|
+
export interface IndividualPassenger {
|
|
18
|
+
id: string;
|
|
19
|
+
age: number;
|
|
19
20
|
}
|
|
20
21
|
export interface FlightSelection {
|
|
21
22
|
flightType: string;
|
|
22
23
|
flightClass: string;
|
|
23
|
-
passengers:
|
|
24
|
+
passengers: {
|
|
25
|
+
adults: number;
|
|
26
|
+
children: IndividualPassenger[];
|
|
27
|
+
infants: IndividualPassenger[];
|
|
28
|
+
};
|
|
24
29
|
}
|
|
25
30
|
export interface FlightSummaryProps {
|
|
26
31
|
passengersData?: PassengerConfig[];
|
|
27
|
-
flightTypesData?:
|
|
28
|
-
|
|
32
|
+
flightTypesData?: {
|
|
33
|
+
value: string;
|
|
34
|
+
name: string;
|
|
35
|
+
}[];
|
|
36
|
+
flightClassesData?: {
|
|
37
|
+
value: string;
|
|
38
|
+
name: string;
|
|
39
|
+
}[];
|
|
29
40
|
flightTypeLabel?: string;
|
|
30
41
|
flightClassLabel?: string;
|
|
31
42
|
selection?: FlightSelection;
|
|
32
43
|
onSelectionChange?: (details: FlightSelection) => void;
|
|
44
|
+
formatPassengerAgeLabel?: (passengerType: string, index: number) => string;
|
|
33
45
|
containerStyle?: StyleProp<ViewStyle>;
|
|
34
46
|
buttonGroupContainerStyle?: StyleProp<ViewStyle>;
|
|
35
47
|
buttonStyle?: StyleProp<ViewStyle>;
|
|
@@ -42,6 +54,8 @@ export interface FlightSummaryProps {
|
|
|
42
54
|
passengerNameStyle?: StyleProp<TextStyle>;
|
|
43
55
|
passengerDescriptionStyle?: StyleProp<TextStyle>;
|
|
44
56
|
labelStyle?: StyleProp<TextStyle>;
|
|
57
|
+
agePickerRowStyle?: StyleProp<ViewStyle>;
|
|
58
|
+
agePickerLabelStyle?: StyleProp<TextStyle>;
|
|
45
59
|
stepperContainerStyle?: NumericStepperProps["style"];
|
|
46
60
|
stepperButtonStyle?: NumericStepperProps["buttonStyle"];
|
|
47
61
|
stepperButtonTextStyle?: NumericStepperProps["buttonTextStyle"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlightSummary.d.ts","sourceRoot":"","sources":["../../../../../src/components/TravelBooking/FlightSummary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"FlightSummary.d.ts","sourceRoot":"","sources":["../../../../../src/components/TravelBooking/FlightSummary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,EACL,SAAS,EAKT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAkB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAMxE,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb;AAGD,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAC;QACf,Q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S,CAAC,SAAS,CAAC,CAAC;IACjD,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,mBAAmB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3C,qBAAqB,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrD,kBAAkB,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACxD,sBAAsB,CAAC,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAChE,qBAAqB,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CAC/D;AAGD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgR/C,CAAC;AAwGF,eAAe,aAAa,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { ThemeType } from "../../theme";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { StyleProp, ViewStyle, TextStyle } from "react-native";
|
|
3
4
|
import { NumericStepperProps } from "../NumericStepper";
|
|
5
|
+
export interface IndividualGuest {
|
|
6
|
+
id: string;
|
|
7
|
+
age: number;
|
|
8
|
+
}
|
|
4
9
|
export interface RoomState {
|
|
5
10
|
id: string;
|
|
6
11
|
[key: string]: any;
|
|
@@ -12,6 +17,11 @@ export interface GuestConfigType {
|
|
|
12
17
|
defaultValue: number;
|
|
13
18
|
minValue: number;
|
|
14
19
|
maxValue?: number;
|
|
20
|
+
ageRange?: {
|
|
21
|
+
min: number;
|
|
22
|
+
max: number;
|
|
23
|
+
};
|
|
24
|
+
defaultAge?: number;
|
|
15
25
|
}
|
|
16
26
|
export interface HotelSummaryProps {
|
|
17
27
|
guestConfigData?: GuestConfigType[];
|
|
@@ -22,6 +32,7 @@ export interface HotelSummaryProps {
|
|
|
22
32
|
roomTitlePrefix?: string;
|
|
23
33
|
removeRoomText?: string;
|
|
24
34
|
addRoomText?: string;
|
|
35
|
+
formatChildAgeLabel?: (guestType: string, index: number) => string;
|
|
25
36
|
containerStyle?: StyleProp<ViewStyle>;
|
|
26
37
|
roomContainerStyle?: StyleProp<ViewStyle>;
|
|
27
38
|
roomListContainerStyle?: StyleProp<ViewStyle>;
|
|
@@ -33,12 +44,15 @@ export interface HotelSummaryProps {
|
|
|
33
44
|
guestLabelContainerStyle?: StyleProp<ViewStyle>;
|
|
34
45
|
guestNameStyle?: StyleProp<TextStyle>;
|
|
35
46
|
guestDescriptionStyle?: StyleProp<TextStyle>;
|
|
47
|
+
agePickerRowStyle?: StyleProp<ViewStyle>;
|
|
48
|
+
agePickerLabelStyle?: StyleProp<TextStyle>;
|
|
36
49
|
addRoomButtonStyle?: StyleProp<ViewStyle>;
|
|
37
50
|
addRoomButtonTextStyle?: StyleProp<TextStyle>;
|
|
38
51
|
stepperContainerStyle?: NumericStepperProps["style"];
|
|
39
52
|
stepperButtonStyle?: NumericStepperProps["buttonStyle"];
|
|
40
53
|
stepperButtonTextStyle?: NumericStepperProps["buttonTextStyle"];
|
|
41
54
|
stepperValueTextStyle?: NumericStepperProps["valueTextStyle"];
|
|
55
|
+
overrideTheme?: ThemeType;
|
|
42
56
|
}
|
|
43
57
|
declare const HotelSummary: React.FC<HotelSummaryProps>;
|
|
44
58
|
export default HotelSummary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotelSummary.d.ts","sourceRoot":"","sources":["../../../../../src/components/TravelBooking/HotelSummary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HotelSummary.d.ts","sourceRoot":"","sources":["../../../../../src/components/TravelBooking/HotelSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,MAAM,aAAa,CAAC;AAClD,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,EACL,SAAS,EAKT,SAAS,EACT,SAAS,EAGV,MAAM,cAAc,CAAC;AACtB,OAAO,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,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACvC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7C,mBAAmB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3C,aAAa,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACrC,wBAAwB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChD,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7C,iBAAiB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,mBAAmB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3C,kBAAkB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,sBAAsB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9C,qBAAqB,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrD,kBAAkB,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACxD,sBAAsB,CAAC,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;IAChE,qBAAqB,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC9D,aAAa,CAAC,EAAE,SAAS,CAAA;CAC1B;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA+S7C,CAAC;AAkGF,eAAe,YAAY,CAAC"}
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { StyleProp, ViewStyle, TextStyle } from "react-native";
|
|
3
|
-
import { FlightSelection, FlightSummaryProps } from "./FlightSummary";
|
|
4
|
-
import { RoomState, HotelSummaryProps } from "./HotelSummary";
|
|
5
|
-
export type SelectionCallbackDataType = FlightSelection | RoomState[];
|
|
6
|
-
export type SummaryBarProps = {
|
|
7
|
-
containerStyle?: StyleProp<ViewStyle>;
|
|
8
|
-
summaryTextStyle?: StyleProp<TextStyle>;
|
|
9
|
-
iconStyle?: StyleProp<TextStyle>;
|
|
10
|
-
onSelectionChange?: (selection: SelectionCallbackDataType) => void;
|
|
11
|
-
mode: "flight" | "hotel";
|
|
12
|
-
flightProps?: FlightSummaryProps;
|
|
13
|
-
hotelProps?: HotelSummaryProps;
|
|
14
|
-
};
|
|
15
|
-
declare const SummaryBar: React.FC<SummaryBarProps>;
|
|
16
|
-
export default SummaryBar;
|
|
1
|
+
export {};
|
|
17
2
|
//# sourceMappingURL=SummaryBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/TravelBooking/SummaryBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SummaryBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/TravelBooking/SummaryBar.tsx"],"names":[],"mappings":""}
|
|
@@ -1,84 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { StyleProp, ViewStyle, TextStyle } from "react-native";
|
|
3
|
-
import { TabSelectorProps } from "./TabSelector";
|
|
4
|
-
import { FlightFormProps } from "./FlightForm";
|
|
5
|
-
import { HotelFormProps } from "./HotelForm";
|
|
6
|
-
import { CarRentalFormProps } from "./CarRentalForm";
|
|
7
|
-
import { SelectionCallbackDataType, SummaryBarProps } from "./SummaryBar";
|
|
8
|
-
import { FlightSuggestions, FormInputType, HotelSuggestions, CarSuggestions } from "./types";
|
|
9
|
-
import { FlightSelection, FlightSummaryProps } from "./FlightSummary";
|
|
10
|
-
import { HotelSummaryProps, RoomState } from "./HotelSummary";
|
|
11
|
-
export interface TravelBookingProps {
|
|
12
|
-
/** Array of tab names. Defaults to ['Flights', 'Hotels', 'Car Rentals'] */
|
|
13
|
-
tabs?: string[];
|
|
14
|
-
/** The initially selected tab. Defaults to the first tab in the `tabs` array. */
|
|
15
|
-
initialTab?: string;
|
|
16
|
-
/** Callback when the selected tab changes */
|
|
17
|
-
onTabChange?: (tab: string) => void;
|
|
18
|
-
/** Callback when the search button is pressed in any form */
|
|
19
|
-
onSearch?: (details: any) => void;
|
|
20
|
-
/** Callback when any form input gains focus */
|
|
21
|
-
onInputFocus?: (input: FormInputType) => void;
|
|
22
|
-
/** Callback when text changes in location inputs */
|
|
23
|
-
onTextChange?: (text: string) => void;
|
|
24
|
-
/** Initial selection state for FlightSummary (if mode is 'flight') */
|
|
25
|
-
initialFlightSelection?: FlightSelection;
|
|
26
|
-
/** Initial selection state for HotelSummary (if mode is 'hotel') */
|
|
27
|
-
initialHotelSelection?: RoomState[];
|
|
28
|
-
/** Callback when the selection in SummaryBar changes */
|
|
29
|
-
onSummarySelectionChange?: (selection: SelectionCallbackDataType) => void;
|
|
30
|
-
/** Suggestion data for FlightForm */
|
|
31
|
-
flightSuggestionData?: FlightSuggestions[];
|
|
32
|
-
/** Suggestion data for HotelForm */
|
|
33
|
-
hotelSuggestionData?: HotelSuggestions[];
|
|
34
|
-
/** Suggestion data for CarRentalForm */
|
|
35
|
-
carSuggestionData?: CarSuggestions[];
|
|
36
|
-
/** Style for the root container of each form */
|
|
37
|
-
formContainerStyle?: StyleProp<ViewStyle>;
|
|
38
|
-
/** Style for input labels */
|
|
39
|
-
labelStyle?: StyleProp<TextStyle>;
|
|
40
|
-
/** Style for the CustomInput's TextInput component */
|
|
41
|
-
inputStyle?: StyleProp<ViewStyle>;
|
|
42
|
-
/** Style for the touchable wrapper around date displays (if applicable) */
|
|
43
|
-
inputTouchableStyle?: StyleProp<ViewStyle>;
|
|
44
|
-
/** Style for the text inside inputs or date displays */
|
|
45
|
-
inputTextStyle?: StyleProp<TextStyle>;
|
|
46
|
-
/** Style for the container holding the date picker(s) and search button */
|
|
47
|
-
dateSearchRowStyle?: StyleProp<ViewStyle>;
|
|
48
|
-
/** Style for the individual date display groups within DateRangePicker */
|
|
49
|
-
dateInputGroupStyle?: StyleProp<ViewStyle>;
|
|
50
|
-
/** Style for the search button */
|
|
51
|
-
searchButtonStyle?: StyleProp<ViewStyle>;
|
|
52
|
-
/** Style for the search icon */
|
|
53
|
-
searchIconStyle?: StyleProp<TextStyle>;
|
|
54
|
-
/** Theme overrides for the calendar component */
|
|
55
|
-
calendarThemeOverrides?: object;
|
|
56
|
-
/** Style for the container wrapping the calendar modal/view */
|
|
57
|
-
calendarContainerStyle?: StyleProp<ViewStyle>;
|
|
58
|
-
/** Style for the container wrapping the swap button (Flights/Cars) */
|
|
59
|
-
swapButtonContainerStyle?: StyleProp<ViewStyle>;
|
|
60
|
-
/** Style for the swap button itself (Flights/Cars) */
|
|
61
|
-
swapButtonStyle?: StyleProp<ViewStyle>;
|
|
62
|
-
/** Style for the swap icon (Flights/Cars) */
|
|
63
|
-
swapIconStyle?: StyleProp<TextStyle>;
|
|
64
|
-
/** Style for the container wrapping the input fields (Flights/Cars) */
|
|
65
|
-
inputGroupContainerStyle?: StyleProp<ViewStyle>;
|
|
66
|
-
/** Props to pass down to the TabSelector component */
|
|
67
|
-
tabSelectorProps?: Omit<TabSelectorProps, "tabs" | "initialTab" | "onTabChange">;
|
|
68
|
-
/** Props to pass down to the SummaryBar component */
|
|
69
|
-
summaryBarProps?: Omit<SummaryBarProps, "mode" | "initialSelection" | "onSelectionChange" | "flightProps" | "hotelProps">;
|
|
70
|
-
/** Props to pass down to the FlightSummary component (via SummaryBar) */
|
|
71
|
-
flightSummaryProps?: Omit<FlightSummaryProps, "selection" | "onSelectionChange">;
|
|
72
|
-
/** Props to pass down to the HotelSummary component (via SummaryBar) */
|
|
73
|
-
hotelSummaryProps?: Omit<HotelSummaryProps, "selection" | "onSelectionChange">;
|
|
74
|
-
/** Props to pass down to the FlightForm component */
|
|
75
|
-
/** Props to pass down to the FlightForm component */
|
|
76
|
-
flightFormProps?: Omit<FlightFormProps, "isOneWay" | "onSearchPress" | "onInputFocus" | "suggestionData" | "onTextChange">;
|
|
77
|
-
/** Props to pass down to the HotelForm component */
|
|
78
|
-
hotelFormProps?: Omit<HotelFormProps, "onSearchPress" | "onInputFocus" | "suggestionData" | "onTextChange">;
|
|
79
|
-
/** Props to pass down to the CarRentalForm component */
|
|
80
|
-
carRentalFormProps?: Omit<CarRentalFormProps, "onSearchPress" | "onInputFocus" | "suggestionData" | "onTextChange">;
|
|
81
|
-
}
|
|
82
|
-
declare const TravelBooking: React.FC<TravelBookingProps>;
|
|
83
|
-
export default TravelBooking;
|
|
1
|
+
export {};
|
|
84
2
|
//# sourceMappingURL=TravelBooking.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TravelBooking.d.ts","sourceRoot":"","sources":["../../../../../src/components/TravelBooking/TravelBooking.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TravelBooking.d.ts","sourceRoot":"","sources":["../../../../../src/components/TravelBooking/TravelBooking.tsx"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
export { default, type TravelBookingProps } from "./TravelBooking";
|
|
2
|
-
export * from "./TravelBooking";
|
|
3
1
|
export { default as CarRentalForm, type CarRentalFormProps } from "./CarRentalForm";
|
|
4
2
|
export * from "./CarRentalForm";
|
|
5
3
|
export { default as FlightForm, type FlightFormProps } from "./FlightForm";
|
|
6
4
|
export * from "./FlightForm";
|
|
7
5
|
export { default as HotelForm, type HotelFormProps } from "./HotelForm";
|
|
8
6
|
export * from "./HotelForm";
|
|
9
|
-
export { default as SummaryBar, type SummaryBarProps, type SelectionCallbackDataType } from "./SummaryBar";
|
|
10
|
-
export * from "./SummaryBar";
|
|
11
7
|
export { default as TabSelector, type TabSelectorProps } from "./TabSelector";
|
|
12
8
|
export * from "./TabSelector";
|
|
13
9
|
export { default as FlightSummary, type FlightSummaryProps, type FlightSelection } from "./FlightSummary";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TravelBooking/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TravelBooking/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACpF,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3E,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACxE,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9E,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC1G,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACjG,cAAc,gBAAgB,CAAA;AAE9B,cAAc,SAAS,CAAC"}
|
package/package.json
CHANGED
package/src/app.tsx
CHANGED
|
@@ -14,46 +14,20 @@ import {
|
|
|
14
14
|
RedemptionOption,
|
|
15
15
|
SelaDealCard,
|
|
16
16
|
} from "./components";
|
|
17
|
-
import { lightTheme, RelatedProvider, useTheme } from "./theme";
|
|
17
|
+
import { darkTheme, lightTheme, RelatedProvider, useTheme } from "./theme";
|
|
18
18
|
import CircularProgressBar from "./components/ProgressBar/CircularProgressBar";
|
|
19
19
|
import PhoneInput from "./components/Input/PhoneInput";
|
|
20
20
|
import { BottomSheetStackProvider } from "./contexts";
|
|
21
21
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
22
22
|
import { Ionicons } from "@expo/vector-icons";
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
const DUMMY_DATA =
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
// {
|
|
33
|
-
// id: "2",
|
|
34
|
-
// image:
|
|
35
|
-
// "https://images.pexels.com/photos/163273/sunrise-speedboat-ocean-water-163273.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",
|
|
36
|
-
// title: "Sunset Cruise",
|
|
37
|
-
// },
|
|
38
|
-
{
|
|
39
|
-
id: "3",
|
|
40
|
-
image:
|
|
41
|
-
"https://images.pexels.com/photos/1430677/pexels-photo-1430677.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",
|
|
42
|
-
title: "Ocean Horizon",
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
id: "4",
|
|
46
|
-
image:
|
|
47
|
-
"https://images.pexels.com/photos/2387793/pexels-photo-2387793.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",
|
|
48
|
-
title: "Forest Trail",
|
|
49
|
-
},
|
|
50
|
-
// {
|
|
51
|
-
// id: "5",
|
|
52
|
-
// image:
|
|
53
|
-
// "https://images.pexels.com/photos/302804/pexels-photo-302804.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",
|
|
54
|
-
// title: "City Lights",
|
|
55
|
-
// },
|
|
56
|
-
];
|
|
24
|
+
|
|
25
|
+
const DUMMY_DATA = Array.from({ length: 10 }, (_, i) => ({
|
|
26
|
+
id: `image-${i + 1}`,
|
|
27
|
+
// Using a random query parameter ensures you get a different image for each ID
|
|
28
|
+
image: `https://picsum.photos/seed/picsum/400/600`,
|
|
29
|
+
title: `Image #${i + 1}`,
|
|
30
|
+
}));
|
|
57
31
|
|
|
58
32
|
const App = () => {
|
|
59
33
|
const { theme } = useTheme();
|
|
@@ -70,8 +44,6 @@ const App = () => {
|
|
|
70
44
|
setProgress(newProgress);
|
|
71
45
|
};
|
|
72
46
|
|
|
73
|
-
|
|
74
|
-
|
|
75
47
|
return (
|
|
76
48
|
<>
|
|
77
49
|
<SafeAreaProvider>
|
|
@@ -80,6 +52,13 @@ const App = () => {
|
|
|
80
52
|
<BottomSheetStackProvider>
|
|
81
53
|
<StatusBar barStyle="light-content" />
|
|
82
54
|
<SafeAreaView style={styles.appContainer}>
|
|
55
|
+
<CarouselCardStack
|
|
56
|
+
data={DUMMY_DATA}
|
|
57
|
+
// backgroundColor="#333" // Set a background color for the component area
|
|
58
|
+
// onActiveIndexChange={(index) => {
|
|
59
|
+
// console.log("Active item index:", index);
|
|
60
|
+
// }}
|
|
61
|
+
/>
|
|
83
62
|
{/* <CircularProgressBar
|
|
84
63
|
progress={5}
|
|
85
64
|
lineCap="round"
|
|
@@ -121,7 +100,7 @@ const App = () => {
|
|
|
121
100
|
></Filters> */}
|
|
122
101
|
{/* <FlightSummary></FlightSummary> */}
|
|
123
102
|
{/* <FlightForm></FlightForm> */}
|
|
124
|
-
{/* <HotelSummary></HotelSummary> */}
|
|
103
|
+
{/* <HotelSummary overrideTheme={darkTheme}></HotelSummary> */}
|
|
125
104
|
{/* <HotelForm></HotelForm> */}
|
|
126
105
|
{/* <DateRangePicker onDatesChange={()=>{}} labelContainerStyle={{backgroundColor:"red"}}></DateRangePicker> */}
|
|
127
106
|
{/* <CarRentalForm onSelectionChange={console.log}></CarRentalForm> */}
|
|
@@ -134,7 +113,7 @@ const App = () => {
|
|
|
134
113
|
inputContainerStyle={{ height: 55 }}
|
|
135
114
|
></PhoneInput> */}
|
|
136
115
|
|
|
137
|
-
<SelaDealCard
|
|
116
|
+
{/* <SelaDealCard
|
|
138
117
|
variant="horizontal"
|
|
139
118
|
width={300}
|
|
140
119
|
height={300}
|
|
@@ -151,7 +130,7 @@ const App = () => {
|
|
|
151
130
|
textStyle={{ fontSize: 20 }}
|
|
152
131
|
icon={<Ionicons name="accessibility"></Ionicons>}
|
|
153
132
|
orientation="horizontal"
|
|
154
|
-
></RedemptionOption>
|
|
133
|
+
></RedemptionOption> */}
|
|
155
134
|
</SafeAreaView>
|
|
156
135
|
</BottomSheetStackProvider>
|
|
157
136
|
</RelatedProvider>
|