mautourco-components 0.2.18 → 0.2.20
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/dist/components/atoms/Icon/icons/BookingIcon.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/BookingIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/BusIcon.js +1 -1
- package/dist/components/atoms/Icon/icons/CarFront.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/CarFront.js +36 -0
- package/dist/components/atoms/Icon/icons/CatamaranIcon.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/CatamaranIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/ClockIcon.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/ClockIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/CloseCircleIcon.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/CloseCircleIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/Land.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/Land.js +36 -0
- package/dist/components/atoms/Icon/icons/MapIcon.js +1 -1
- package/dist/components/atoms/Icon/icons/PlusCircleIcon.js +1 -1
- package/dist/components/atoms/Icon/icons/SeaIcon.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/SeaIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/registry.d.ts +7 -0
- package/dist/components/atoms/Icon/icons/registry.js +14 -0
- package/dist/components/atoms/Inputs/Input/Input.d.ts +2 -1
- package/dist/components/atoms/Inputs/Input/Input.js +1 -1
- package/dist/components/atoms/Inputs/Textarea/Textarea.d.ts +3 -1
- package/dist/components/atoms/Inputs/Textarea/Textarea.js +7 -5
- package/dist/components/molecules/BookingPax/BookingPax.d.ts +7 -0
- package/dist/components/molecules/BookingPax/BookingPax.js +21 -0
- package/dist/components/molecules/BookingPax/BookingPaxAccom.d.ts +22 -0
- package/dist/components/molecules/BookingPax/BookingPaxAccom.js +61 -0
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +2090 -0
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.d.ts +31 -0
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.js +96 -0
- package/dist/components/molecules/BookingPax/BookingPaxExcursion.d.ts +14 -0
- package/dist/components/molecules/BookingPax/BookingPaxExcursion.js +31 -0
- package/dist/components/molecules/BookingPax/BookingPaxHeader.d.ts +16 -0
- package/dist/components/molecules/BookingPax/BookingPaxHeader.js +28 -0
- package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.css +2103 -0
- package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.d.ts +11 -0
- package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.js +19 -0
- package/dist/components/molecules/BookingPax/BookingPaxRemarks.d.ts +5 -0
- package/dist/components/molecules/BookingPax/BookingPaxRemarks.js +37 -0
- package/dist/components/molecules/BookingPax/BookingPaxTransfer.d.ts +18 -0
- package/dist/components/molecules/BookingPax/BookingPaxTransfer.js +40 -0
- package/dist/components/molecules/BookingPax/index.d.ts +5 -0
- package/dist/components/molecules/BookingPax/index.js +1 -0
- package/dist/components/molecules/BookingResume/BookingResume.d.ts +9 -0
- package/dist/components/molecules/BookingResume/BookingResume.js +25 -0
- package/dist/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.css +2107 -0
- package/dist/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.d.ts +11 -0
- package/dist/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.js +19 -0
- package/dist/components/molecules/BookingResume/ResumeAccom/ResumeAccom.css +2094 -0
- package/dist/components/molecules/BookingResume/ResumeAccom/ResumeAccom.d.ts +13 -0
- package/dist/components/molecules/BookingResume/ResumeAccom/ResumeAccom.js +26 -0
- package/dist/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.css +2082 -0
- package/dist/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.d.ts +15 -0
- package/dist/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.js +28 -0
- package/dist/components/molecules/BookingResume/ResumeOtherService.d.ts +6 -0
- package/dist/components/molecules/BookingResume/ResumeOtherService.js +19 -0
- package/dist/components/molecules/BookingResume/ResumeTransfer.d.ts +12 -0
- package/dist/components/molecules/BookingResume/ResumeTransfer.js +23 -0
- package/dist/components/molecules/BookingResume/index.d.ts +6 -0
- package/dist/components/molecules/BookingResume/index.js +1 -0
- package/dist/components/molecules/Calendar/CalendarInput.d.ts +6 -3
- package/dist/components/molecules/Calendar/CalendarInput.js +10 -10
- package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +2 -0
- package/dist/components/molecules/DateDisplay/DateDisplay.js +2 -2
- package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css +2142 -0
- package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.d.ts +11 -0
- package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.js +19 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.d.ts +9 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.js +24 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.d.ts +17 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.js +20 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.d.ts +11 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.js +33 -0
- package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.d.ts +11 -0
- package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.js +27 -0
- package/dist/components/molecules/DialogContentPolicy/index.d.ts +4 -0
- package/dist/components/molecules/DialogContentPolicy/index.js +1 -0
- package/dist/components/molecules/PaxDisplay/PaxDisplay.css +2104 -0
- package/dist/components/molecules/PaxDisplay/PaxDisplay.d.ts +7 -0
- package/dist/components/molecules/PaxDisplay/PaxDisplay.js +32 -0
- package/dist/components/molecules/ServiceInfo/ServiceInfo.css +3 -7
- package/dist/components/molecules/ServiceInfo/ServiceInfo.d.ts +1 -0
- package/dist/components/molecules/ServiceInfo/ServiceInfo.js +5 -4
- package/dist/components/molecules/ServiceTitle/ServiceTitle.css +3 -0
- package/dist/components/molecules/ServiceTitle/ServiceTitle.d.ts +7 -1
- package/dist/components/molecules/ServiceTitle/ServiceTitle.js +4 -3
- package/dist/components/molecules/StepperTimeline/StepperTimeline.css +2151 -0
- package/dist/components/molecules/StepperTimeline/StepperTimeline.d.ts +23 -0
- package/dist/components/molecules/StepperTimeline/StepperTimeline.js +45 -0
- package/dist/components/organisms/Booking/Booking.css +2080 -0
- package/dist/components/organisms/Booking/Booking.d.ts +13 -0
- package/dist/components/organisms/Booking/Booking.js +37 -0
- package/dist/components/organisms/Booking/BookingDocket/BookingDocket.css +2159 -0
- package/dist/components/organisms/Booking/BookingDocket/BookingDocket.d.ts +13 -0
- package/dist/components/organisms/Booking/BookingDocket/BookingDocket.js +44 -0
- package/dist/components/organisms/Booking/BookingHeader.d.ts +8 -0
- package/dist/components/organisms/Booking/BookingHeader.js +17 -0
- package/dist/components/organisms/Booking/BookingPaxList.d.ts +25 -0
- package/dist/components/organisms/Booking/BookingPaxList.js +117 -0
- package/dist/components/organisms/Booking/BookingStep/BookingStep.css +2103 -0
- package/dist/components/organisms/Booking/BookingStep/BookingStep.d.ts +11 -0
- package/dist/components/organisms/Booking/BookingStep/BookingStep.js +30 -0
- package/dist/components/organisms/Booking/index.d.ts +3 -0
- package/dist/components/organisms/Booking/index.js +1 -0
- package/dist/components/organisms/DateTimePicker/DateTimePicker.d.ts +6 -3
- package/dist/components/organisms/DateTimePicker/DateTimePicker.js +28 -22
- package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.d.ts +10 -0
- package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.js +17 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +2 -8
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +31 -0
- package/dist/hooks/useBookingPax.d.ts +8 -0
- package/dist/hooks/useBookingPax.js +43 -0
- package/dist/hooks/useStays.d.ts +1 -0
- package/dist/hooks/useStays.js +11 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/types/table/booking.types.d.ts +12 -0
- package/dist/types/table/detail-resume.types.d.ts +3 -1
- package/package.json +4 -1
- package/src/components/atoms/Icon/icons/BookingIcon.tsx +40 -0
- package/src/components/atoms/Icon/icons/BusIcon.tsx +1 -1
- package/src/components/atoms/Icon/icons/CarFront.tsx +44 -0
- package/src/components/atoms/Icon/icons/CatamaranIcon.tsx +51 -0
- package/src/components/atoms/Icon/icons/ClockIcon.tsx +46 -0
- package/src/components/atoms/Icon/icons/CloseCircleIcon.tsx +55 -0
- package/src/components/atoms/Icon/icons/Land.tsx +40 -0
- package/src/components/atoms/Icon/icons/MapIcon.tsx +6 -2
- package/src/components/atoms/Icon/icons/PlusCircleIcon.tsx +1 -1
- package/src/components/atoms/Icon/icons/SeaIcon.tsx +47 -0
- package/src/components/atoms/Icon/icons/registry.tsx +14 -0
- package/src/components/atoms/Inputs/Input/Input.tsx +6 -5
- package/src/components/atoms/Inputs/Textarea/Textarea.tsx +18 -4
- package/src/components/molecules/BookingPax/BookingPax.tsx +12 -0
- package/src/components/molecules/BookingPax/BookingPaxAccom.tsx +120 -0
- package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +4 -0
- package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.tsx +188 -0
- package/src/components/molecules/BookingPax/BookingPaxExcursion.tsx +77 -0
- package/src/components/molecules/BookingPax/BookingPaxHeader.tsx +47 -0
- package/src/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.css +15 -0
- package/src/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.tsx +25 -0
- package/src/components/molecules/BookingPax/BookingPaxRemarks.tsx +46 -0
- package/src/components/molecules/BookingPax/BookingPaxTransfer.tsx +121 -0
- package/src/components/molecules/BookingPax/index.ts +9 -0
- package/src/components/molecules/BookingResume/BookingResume.tsx +16 -0
- package/src/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.css +28 -0
- package/src/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.tsx +37 -0
- package/src/components/molecules/BookingResume/ResumeAccom/ResumeAccom.css +12 -0
- package/src/components/molecules/BookingResume/ResumeAccom/ResumeAccom.tsx +63 -0
- package/src/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.css +5 -0
- package/src/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.tsx +75 -0
- package/src/components/molecules/BookingResume/ResumeOtherService.tsx +21 -0
- package/src/components/molecules/BookingResume/ResumeTransfer.tsx +49 -0
- package/src/components/molecules/BookingResume/index.ts +6 -0
- package/src/components/molecules/Calendar/CalendarInput.tsx +26 -24
- package/src/components/molecules/DateDisplay/DateDisplay.tsx +9 -5
- package/src/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css +37 -0
- package/src/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.tsx +28 -0
- package/src/components/molecules/DialogContentPolicy/DialogCancellationAccom.tsx +65 -0
- package/src/components/molecules/DialogContentPolicy/DialogCancellationExcursion.tsx +59 -0
- package/src/components/molecules/DialogContentPolicy/DialogCancellationList.tsx +49 -0
- package/src/components/molecules/DialogContentPolicy/DialogContentPolicy.tsx +45 -0
- package/src/components/molecules/DialogContentPolicy/index.ts +5 -0
- package/src/components/molecules/PaxDisplay/PaxDisplay.css +19 -0
- package/src/components/molecules/PaxDisplay/PaxDisplay.tsx +59 -0
- package/src/components/molecules/ServiceInfo/ServiceInfo.css +3 -5
- package/src/components/molecules/ServiceInfo/ServiceInfo.tsx +18 -3
- package/src/components/molecules/ServiceTitle/ServiceTitle.css +1 -1
- package/src/components/molecules/ServiceTitle/ServiceTitle.tsx +25 -7
- package/src/components/molecules/StepperTimeline/StepperTimeline.css +59 -0
- package/src/components/molecules/StepperTimeline/StepperTimeline.tsx +105 -0
- package/src/components/organisms/Booking/Booking.css +3 -0
- package/src/components/organisms/Booking/Booking.tsx +25 -0
- package/src/components/organisms/Booking/BookingDocket/BookingDocket.css +67 -0
- package/src/components/organisms/Booking/BookingDocket/BookingDocket.tsx +165 -0
- package/src/components/organisms/Booking/BookingHeader.tsx +24 -0
- package/src/components/organisms/Booking/BookingPaxList.tsx +224 -0
- package/src/components/organisms/Booking/BookingStep/BookingStep.css +12 -0
- package/src/components/organisms/Booking/BookingStep/BookingStep.tsx +51 -0
- package/src/components/organisms/Booking/index.ts +3 -0
- package/src/components/organisms/CarBookingCard/index.ts +1 -0
- package/src/components/organisms/DateTimePicker/DateTimePicker.tsx +69 -49
- package/src/components/organisms/DialogBookingConfirm/DialogBookingConfirm.tsx +25 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderAccom.tsx +2 -8
- package/src/components/ui/checkbox.tsx +32 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BookingPax } from '@/src/types/table/booking.types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './ResumeExcursion.css';
|
|
4
|
+
export interface ResumeExcursionProps {
|
|
5
|
+
image: string;
|
|
6
|
+
date: string;
|
|
7
|
+
pax: BookingPax;
|
|
8
|
+
pickUpPoint: string;
|
|
9
|
+
duration: string;
|
|
10
|
+
meal: string;
|
|
11
|
+
accessibility: string;
|
|
12
|
+
transferType: string;
|
|
13
|
+
type: 'sea' | 'land' | 'catamaran';
|
|
14
|
+
}
|
|
15
|
+
export declare const ResumeExcursion: React.FC<ResumeExcursionProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Text } from '../../../atoms/Typography/Typography';
|
|
14
|
+
import { DateDisplay } from '../../DateDisplay/DateDisplay';
|
|
15
|
+
import { PaxDisplay } from '../../PaxDisplay/PaxDisplay';
|
|
16
|
+
import { ServiceInfo } from '../../ServiceInfo/ServiceInfo';
|
|
17
|
+
import TextWithIcon from '../../TextWithIcon/TextWithIcon';
|
|
18
|
+
import { BookingResumeLayout } from '../BookingResumeLayout/BookingResumeLayout';
|
|
19
|
+
import './ResumeExcursion.css';
|
|
20
|
+
var mapType = {
|
|
21
|
+
sea: 'Sea excursion',
|
|
22
|
+
land: 'Land excursion',
|
|
23
|
+
catamaran: 'Cruise excursion',
|
|
24
|
+
};
|
|
25
|
+
export var ResumeExcursion = function (props) {
|
|
26
|
+
var image = props.image, date = props.date, pax = props.pax, pickUpPoint = props.pickUpPoint, duration = props.duration, meal = props.meal, accessibility = props.accessibility, transferType = props.transferType, type = props.type;
|
|
27
|
+
return (_jsx(BookingResumeLayout, __assign({ title: "Excursion", icon: "map", image: image, className: "resume-excursion" }, { children: _jsxs("div", __assign({ className: "space-y-3" }, { children: [_jsx(DateDisplay, { dates: [date], textColor: "accent" }), _jsxs("div", __assign({ className: "space-y-1" }, { children: [_jsx(TextWithIcon, __assign({ icon: type, textSize: "sm", textVariant: "medium" }, { children: mapType[type] })), _jsxs(Text, __assign({ variant: "medium", size: "sm", leading: "4" }, { children: [_jsx("strong", { children: "Pickup: " }), " ", pickUpPoint] }))] })), _jsx(PaxDisplay, { pax: pax }), _jsxs(ServiceInfo, __assign({ className: "space-y-1", contentTextVariant: "regular" }, { children: [_jsx(ServiceInfo.Item, __assign({ icon: "stopwatch", label: "Duration" }, { children: duration })), _jsx(ServiceInfo.Item, __assign({ icon: "utensils", label: "Meal" }, { children: meal })), _jsx(ServiceInfo.Item, __assign({ icon: "bike", label: "Difficulty" }, { children: accessibility })), _jsx(ServiceInfo.Item, __assign({ icon: "car", label: "Vehicle" }, { children: transferType }))] }))] })) })));
|
|
28
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { PaxDisplay } from '../PaxDisplay/PaxDisplay';
|
|
14
|
+
import TextWithIcon from '../TextWithIcon/TextWithIcon';
|
|
15
|
+
import { BookingResumeLayout } from './BookingResumeLayout/BookingResumeLayout';
|
|
16
|
+
export var ResumeOtherService = function (props) {
|
|
17
|
+
var pax = props.pax;
|
|
18
|
+
return (_jsx(BookingResumeLayout, __assign({ title: "Other Services", icon: "more" }, { children: _jsxs("div", __assign({ className: "space-y-1" }, { children: [_jsx(TextWithIcon, __assign({ icon: "wallet" }, { children: "Handling Fee" })), _jsx(PaxDisplay, { pax: pax })] })) })));
|
|
19
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BookingPax } from '@/src/types/table/booking.types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FromToProps } from '../FromTo/FromTo';
|
|
4
|
+
export interface ResumeTransferProps {
|
|
5
|
+
type: 'ARV' | 'DEP' | 'INH';
|
|
6
|
+
pax: BookingPax;
|
|
7
|
+
date: string;
|
|
8
|
+
location: Omit<FromToProps, 'transferType'>;
|
|
9
|
+
carName: string;
|
|
10
|
+
image: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ResumeTransfer: React.FC<ResumeTransferProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
14
|
+
import { DateDisplay } from '../DateDisplay/DateDisplay';
|
|
15
|
+
import FromTo from '../FromTo/FromTo';
|
|
16
|
+
import { PaxDisplay } from '../PaxDisplay/PaxDisplay';
|
|
17
|
+
import TextWithIcon from '../TextWithIcon/TextWithIcon';
|
|
18
|
+
import { BookingResumeLayout } from './BookingResumeLayout/BookingResumeLayout';
|
|
19
|
+
export var ResumeTransfer = function (props) {
|
|
20
|
+
var type = props.type, pax = props.pax, date = props.date, location = props.location, carName = props.carName, image = props.image;
|
|
21
|
+
var transferType = type === 'ARV' ? 'Arrival' : type === 'DEP' ? 'Departure' : 'Inter-Hotel';
|
|
22
|
+
return (_jsx(BookingResumeLayout, __assign({ title: _jsxs(_Fragment, { children: ["Transfer", ' ', _jsx(Text, __assign({ color: "accent", as: "span", size: "lg" }, { children: transferType }))] }), icon: "car-front", image: image }, { children: _jsxs("div", __assign({ className: "space-y-3" }, { children: [_jsx(DateDisplay, { dates: [date], textColor: "accent" }), _jsx(FromTo, { from: location.from, to: location.to }), _jsxs("div", __assign({ className: "space-y-1" }, { children: [_jsx(PaxDisplay, { pax: pax }), _jsx(TextWithIcon, __assign({ icon: "car", textSize: "sm", textVariant: "medium" }, { children: carName }))] }))] })) })));
|
|
23
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './BookingResume';
|
|
2
|
+
export type { BookingResumeLayoutProps } from './BookingResumeLayout/BookingResumeLayout';
|
|
3
|
+
export type { ResumeAccomProps } from './ResumeAccom/ResumeAccom';
|
|
4
|
+
export type { ResumeExcursionProps } from './ResumeExcursion/ResumeExcursion';
|
|
5
|
+
export type { ResumeOtherServiceProps } from './ResumeOtherService';
|
|
6
|
+
export type { ResumeTransferProps } from './ResumeTransfer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BookingResume';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconName } from '../../atoms/Icon/Icon';
|
|
2
3
|
export interface CalendarInputProps {
|
|
3
4
|
/** Placeholder text */
|
|
4
5
|
placeholder?: string;
|
|
5
6
|
/** Selected date value (formatted as string) */
|
|
6
7
|
value?: string;
|
|
7
8
|
/** State of the input: default, active, typing, disabled, success, error */
|
|
8
|
-
state?:
|
|
9
|
+
state?: 'default' | 'active' | 'typing' | 'disabled' | 'success' | 'error';
|
|
9
10
|
/** Helper/support text below input */
|
|
10
11
|
/** Whether the input is disabled */
|
|
11
12
|
disabled?: boolean;
|
|
@@ -24,11 +25,13 @@ export interface CalendarInputProps {
|
|
|
24
25
|
/** Whether the calendar icon has full bg*/
|
|
25
26
|
iconBGFull?: boolean;
|
|
26
27
|
/** Position of the calendar icon: left or right */
|
|
27
|
-
iconPosition?:
|
|
28
|
+
iconPosition?: 'left' | 'right';
|
|
28
29
|
/** Show chevron on the right when icon is on the left */
|
|
29
30
|
showChevron?: boolean;
|
|
30
31
|
/** Whether the calendar popover is open */
|
|
31
32
|
isOpen?: boolean;
|
|
33
|
+
/** Icon to display on the left of the input */
|
|
34
|
+
icon?: IconName;
|
|
32
35
|
}
|
|
33
36
|
declare const CalendarInput: React.FC<CalendarInputProps>;
|
|
34
37
|
export default CalendarInput;
|
|
@@ -10,15 +10,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import React, { useState } from
|
|
14
|
-
import Icon from
|
|
13
|
+
import React, { useState } from 'react';
|
|
14
|
+
import Icon from '../../atoms/Icon/Icon';
|
|
15
15
|
var CalendarInput = function (_a) {
|
|
16
|
-
var _b = _a.placeholder, placeholder = _b === void 0 ?
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var finalState = disabled ?
|
|
21
|
-
var displayState = isFocused && isTyping ?
|
|
16
|
+
var _b = _a.placeholder, placeholder = _b === void 0 ? 'Select date' : _b, _c = _a.value, value = _c === void 0 ? '' : _c, _d = _a.state, state = _d === void 0 ? 'default' : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, onClick = _a.onClick, onCalendarClick = _a.onCalendarClick, onChange = _a.onChange, onFocus = _a.onFocus, onBlur = _a.onBlur, _f = _a.className, className = _f === void 0 ? '' : _f, _g = _a.iconBGFull, iconBGFull = _g === void 0 ? true : _g, _h = _a.iconPosition, iconPosition = _h === void 0 ? 'right' : _h, _j = _a.showChevron, showChevron = _j === void 0 ? false : _j, _k = _a.isOpen, isOpen = _k === void 0 ? false : _k, _l = _a.icon, icon = _l === void 0 ? 'calendar' : _l;
|
|
17
|
+
var _m = useState(false), isFocused = _m[0], setIsFocused = _m[1];
|
|
18
|
+
var _o = useState(value), localValue = _o[0], setLocalValue = _o[1];
|
|
19
|
+
var _p = useState(false), isTyping = _p[0], setIsTyping = _p[1];
|
|
20
|
+
var finalState = disabled ? 'disabled' : state;
|
|
21
|
+
var displayState = isFocused && isTyping ? 'typing' : isFocused ? 'active' : finalState;
|
|
22
22
|
var handleInputChange = function (e) {
|
|
23
23
|
var newValue = e.target.value;
|
|
24
24
|
setLocalValue(newValue);
|
|
@@ -43,7 +43,7 @@ var CalendarInput = function (_a) {
|
|
|
43
43
|
React.useEffect(function () {
|
|
44
44
|
setLocalValue(value);
|
|
45
45
|
}, [value]);
|
|
46
|
-
var iconButton = (_jsx("button", __assign({ type: "button", className: "calendar-input__icon-button ".concat(iconBGFull ?
|
|
47
|
-
return (_jsxs("div", __assign({ className: "calendar-input calendar-input--".concat(displayState, " calendar-input--icon-").concat(iconPosition, " ").concat(className).trim(), "data-node-id": "3425:11289", onClick: onClick }, { children: [iconPosition ===
|
|
46
|
+
var iconButton = (_jsx("button", __assign({ type: "button", className: "calendar-input__icon-button ".concat(iconBGFull ? ' calendar-input__icon-button--full-bg' : '', " calendar-input__icon-button--").concat(iconPosition), onClick: handleCalendarClick, disabled: disabled, "aria-label": "Open calendar picker", title: "Select date" }, { children: _jsx(Icon, { name: icon, size: "sm", className: "calendar-input__icon" }) })));
|
|
47
|
+
return (_jsxs("div", __assign({ className: "calendar-input calendar-input--".concat(displayState, " calendar-input--icon-").concat(iconPosition, " ").concat(className).trim(), "data-node-id": "3425:11289", onClick: onClick }, { children: [iconPosition === 'left' && iconButton, _jsxs("div", __assign({ className: "calendar-input__input-wrapper" }, { children: [_jsx("input", { type: "text", className: "calendar-input__field", placeholder: placeholder, value: localValue || placeholder, disabled: disabled, onChange: handleInputChange, onFocus: handleFocus, onBlur: handleBlur, readOnly: true, "aria-label": 'Select date' }), iconPosition === 'left' && showChevron && (_jsx("div", __assign({ className: "calendar-input__chevron ".concat(isOpen ? 'calendar-input__chevron--open' : '') }, { children: _jsx(Icon, { name: 'chevron-down', size: "sm" }) })))] })), iconPosition === 'right' && iconButton] })));
|
|
48
48
|
};
|
|
49
49
|
export default CalendarInput;
|
|
@@ -9,6 +9,8 @@ export interface DateDisplayProps {
|
|
|
9
9
|
calendarSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
10
10
|
/** Size of the text */
|
|
11
11
|
textSize?: TextProps['size'];
|
|
12
|
+
/** Text color */
|
|
13
|
+
textColor?: TextProps['color'];
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* A component for displaying a list of dates in a readable format.
|
|
@@ -23,7 +23,7 @@ import { Text } from '../../atoms/Typography/Typography';
|
|
|
23
23
|
* @returns
|
|
24
24
|
*/
|
|
25
25
|
export var DateDisplay = function (_a) {
|
|
26
|
-
var dates = _a.dates, _b = _a.arrowSize, arrowSize = _b === void 0 ? 'sm' : _b, _c = _a.calendarSize, calendarSize = _c === void 0 ? 'sm' : _c, _d = _a.textSize, textSize = _d === void 0 ? 'sm' : _d;
|
|
26
|
+
var dates = _a.dates, _b = _a.arrowSize, arrowSize = _b === void 0 ? 'sm' : _b, _c = _a.calendarSize, calendarSize = _c === void 0 ? 'sm' : _c, _d = _a.textSize, textSize = _d === void 0 ? 'sm' : _d, _e = _a.textColor, textColor = _e === void 0 ? 'default' : _e;
|
|
27
27
|
var formattedDate = useMemo(function () {
|
|
28
28
|
return dates.map(function (d) {
|
|
29
29
|
var dateObj = new Date(d);
|
|
@@ -35,5 +35,5 @@ export var DateDisplay = function (_a) {
|
|
|
35
35
|
return d;
|
|
36
36
|
});
|
|
37
37
|
}, [dates]);
|
|
38
|
-
return (_jsx(
|
|
38
|
+
return (_jsx(Text, __assign({ className: "flex items-center gap-x-3", as: "div", color: textColor }, { children: formattedDate.map(function (date, index) { return (_jsxs(Fragment, { children: [_jsxs(Text, __assign({ className: "flex items-center gap-x-2", color: textColor, as: "span" }, { children: [_jsx(Icon, { name: "calendar2", size: calendarSize }), _jsx(Text, __assign({ variant: "medium", size: textSize, color: textColor }, { children: date }))] })), formattedDate.length > 1 && index === 0 && (_jsx(Icon, { name: "arrow-right-outline", size: arrowSize }))] }, "dd-".concat(index))); }) })));
|
|
39
39
|
};
|