mautourco-components 0.2.159 → 0.2.161
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/molecules/DialogContentPolicy/DialogCancellationList.js +2 -1
- package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.d.ts +4 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.js +2 -2
- package/dist/components/organisms/DialogBookingConfirm/BookingMailSent.d.ts +4 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingMailSent.js +2 -2
- package/dist/components/organisms/DialogBookingConfirm/BookingSuccess.d.ts +4 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingSuccess.js +2 -2
- package/package.json +1 -1
- package/src/components/molecules/DialogContentPolicy/DialogCancellationList.tsx +3 -2
- package/src/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.tsx +6 -2
- package/src/components/organisms/DialogBookingConfirm/BookingMailSent.tsx +11 -2
- package/src/components/organisms/DialogBookingConfirm/BookingSuccess.tsx +12 -2
|
@@ -43,5 +43,6 @@ export function CancellationsList(props) {
|
|
|
43
43
|
* @returns The DialogCancellationList component.
|
|
44
44
|
*/
|
|
45
45
|
export function DialogCancellationList(props) {
|
|
46
|
-
|
|
46
|
+
var cancellations = props.cancellations, onSubmit = props.onSubmit;
|
|
47
|
+
return (_jsx(DialogContentPolicy, { onSubmit: onSubmit, children: _jsx(CancellationsList, { cancellations: cancellations }) }));
|
|
47
48
|
}
|
|
@@ -12,6 +12,10 @@ export interface BookingCancellationPolicyProps {
|
|
|
12
12
|
* The cancellations to display.
|
|
13
13
|
*/
|
|
14
14
|
cancellations: CancellationPolicyItem[];
|
|
15
|
+
/**
|
|
16
|
+
* The callback function to call when the submit button is clicked.
|
|
17
|
+
*/
|
|
18
|
+
onSubmit?: () => void;
|
|
15
19
|
}
|
|
16
20
|
/**
|
|
17
21
|
* BookingCancellationPolicy is a component that allows the user to display the booking cancellation policy.
|
|
@@ -15,6 +15,6 @@ import { DialogBookingConfirm } from './DialogBookingConfirm';
|
|
|
15
15
|
* @returns The BookingCancellationPolicy component.
|
|
16
16
|
*/
|
|
17
17
|
export function BookingCancellationPolicy(props) {
|
|
18
|
-
var open = props.open, setOpen = props.setOpen, cancellations = props.cancellations;
|
|
19
|
-
return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, title: "Confirmation of Terms & Cancellation policy", className: "!max-w-[800px]", children: _jsx(DialogContentPolicy.List, { cancellations: cancellations }) }));
|
|
18
|
+
var open = props.open, setOpen = props.setOpen, cancellations = props.cancellations, onSubmit = props.onSubmit;
|
|
19
|
+
return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, title: "Confirmation of Terms & Cancellation policy", className: "!max-w-[800px]", children: _jsx(DialogContentPolicy.List, { cancellations: cancellations, onSubmit: onSubmit }) }));
|
|
20
20
|
}
|
|
@@ -15,6 +15,6 @@ import { DialogBookingConfirm } from './DialogBookingConfirm';
|
|
|
15
15
|
* @returns
|
|
16
16
|
*/
|
|
17
17
|
export function BookingMailSent(props) {
|
|
18
|
-
var open = props.open, setOpen = props.setOpen, onNext = props.onNext;
|
|
19
|
-
return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, className: "!max-w-[800px]", children: _jsxs("div", { className: "space-y-9", children: [_jsxs("div", { className: "space-y-8", children: [_jsx("img", { src:
|
|
18
|
+
var open = props.open, setOpen = props.setOpen, onNext = props.onNext, _a = props.illustration, illustration = _a === void 0 ? '/images/svg/booking-mail-sent.svg' : _a;
|
|
19
|
+
return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, className: "!max-w-[800px]", children: _jsxs("div", { className: "space-y-9", children: [_jsxs("div", { className: "space-y-8", children: [_jsx("img", { src: illustration, alt: "Booking success", className: "mx-auto", width: 150, height: 150 }), _jsx(Heading, { as: "p", level: 6, variant: "medium", className: "text-center", children: "You will receive a copy of your booking in your mail inbox." })] }), _jsx(Button, { variant: "secondary", onClick: onNext, className: "w-full", children: "Go to booking grid" })] }) }));
|
|
20
20
|
}
|
|
@@ -17,6 +17,6 @@ import { DialogBookingConfirm } from './DialogBookingConfirm';
|
|
|
17
17
|
* @returns The BookingSuccess component.
|
|
18
18
|
*/
|
|
19
19
|
export function BookingSuccess(props) {
|
|
20
|
-
var open = props.open, bookingName = props.bookingName, setOpen = props.setOpen, onNext = props.onNext;
|
|
21
|
-
return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, className: "!max-w-[800px]", children: _jsxs("div", { className: "space-y-9", children: [_jsxs("div", { className: "space-y-8", children: [_jsx("img", { src:
|
|
20
|
+
var open = props.open, bookingName = props.bookingName, setOpen = props.setOpen, onNext = props.onNext, _a = props.illustration, illustration = _a === void 0 ? '/images/svg/booking-confirm.svg' : _a;
|
|
21
|
+
return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, className: "!max-w-[800px]", children: _jsxs("div", { className: "space-y-9", children: [_jsxs("div", { className: "space-y-8", children: [_jsx("img", { src: illustration, alt: "Booking success", className: "mx-auto", width: 150, height: 150 }), _jsxs("div", { className: "text-center", children: [_jsx(Heading, { as: "p", level: 6, variant: "medium", children: "Your booking has been successfully confirmed!" }), _jsxs(Text, { variant: "bold", size: "lg", children: ["\"", bookingName, "\""] })] })] }), _jsx(Button, { variant: "secondary", onClick: onNext, className: "w-full", children: "Confirm booking" })] }) }));
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -71,9 +71,10 @@ export function CancellationsList(props: DialogCancellationListProps) {
|
|
|
71
71
|
* @returns The DialogCancellationList component.
|
|
72
72
|
*/
|
|
73
73
|
export function DialogCancellationList(props: DialogCancellationListProps) {
|
|
74
|
+
const { cancellations, onSubmit } = props;
|
|
74
75
|
return (
|
|
75
|
-
<DialogContentPolicy>
|
|
76
|
-
<CancellationsList {
|
|
76
|
+
<DialogContentPolicy onSubmit={onSubmit}>
|
|
77
|
+
<CancellationsList cancellations={cancellations} />
|
|
77
78
|
</DialogContentPolicy>
|
|
78
79
|
);
|
|
79
80
|
}
|
|
@@ -15,6 +15,10 @@ export interface BookingCancellationPolicyProps {
|
|
|
15
15
|
* The cancellations to display.
|
|
16
16
|
*/
|
|
17
17
|
cancellations: CancellationPolicyItem[];
|
|
18
|
+
/**
|
|
19
|
+
* The callback function to call when the submit button is clicked.
|
|
20
|
+
*/
|
|
21
|
+
onSubmit?: () => void;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
/**
|
|
@@ -31,14 +35,14 @@ export interface BookingCancellationPolicyProps {
|
|
|
31
35
|
* @returns The BookingCancellationPolicy component.
|
|
32
36
|
*/
|
|
33
37
|
export function BookingCancellationPolicy(props: BookingCancellationPolicyProps) {
|
|
34
|
-
const { open, setOpen, cancellations } = props;
|
|
38
|
+
const { open, setOpen, cancellations, onSubmit } = props;
|
|
35
39
|
return (
|
|
36
40
|
<DialogBookingConfirm
|
|
37
41
|
open={open}
|
|
38
42
|
setOpen={setOpen}
|
|
39
43
|
title="Confirmation of Terms & Cancellation policy"
|
|
40
44
|
className="!max-w-[800px]">
|
|
41
|
-
<DialogContentPolicy.List cancellations={cancellations} />
|
|
45
|
+
<DialogContentPolicy.List cancellations={cancellations} onSubmit={onSubmit} />
|
|
42
46
|
</DialogBookingConfirm>
|
|
43
47
|
);
|
|
44
48
|
}
|
|
@@ -6,6 +6,10 @@ export interface BookingMailSentProps {
|
|
|
6
6
|
* Whether the dialog is open.
|
|
7
7
|
*/
|
|
8
8
|
open: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The illustration to display.
|
|
11
|
+
*/
|
|
12
|
+
illustration?: string;
|
|
9
13
|
/**
|
|
10
14
|
* The callback function to call when the dialog is closed.
|
|
11
15
|
*/
|
|
@@ -30,13 +34,18 @@ export interface BookingMailSentProps {
|
|
|
30
34
|
* @returns
|
|
31
35
|
*/
|
|
32
36
|
export function BookingMailSent(props: BookingMailSentProps) {
|
|
33
|
-
const {
|
|
37
|
+
const {
|
|
38
|
+
open,
|
|
39
|
+
setOpen,
|
|
40
|
+
onNext,
|
|
41
|
+
illustration = '/images/svg/booking-mail-sent.svg',
|
|
42
|
+
} = props;
|
|
34
43
|
return (
|
|
35
44
|
<DialogBookingConfirm open={open} setOpen={setOpen} className="!max-w-[800px]">
|
|
36
45
|
<div className="space-y-9">
|
|
37
46
|
<div className="space-y-8">
|
|
38
47
|
<img
|
|
39
|
-
src=
|
|
48
|
+
src={illustration}
|
|
40
49
|
alt="Booking success"
|
|
41
50
|
className="mx-auto"
|
|
42
51
|
width={150}
|
|
@@ -10,6 +10,10 @@ export interface BookingSuccessProps {
|
|
|
10
10
|
* The name of the booking.
|
|
11
11
|
*/
|
|
12
12
|
bookingName: string;
|
|
13
|
+
/**
|
|
14
|
+
* The illustration to display.
|
|
15
|
+
*/
|
|
16
|
+
illustration?: string;
|
|
13
17
|
/**
|
|
14
18
|
* The callback function to call when the dialog is closed.
|
|
15
19
|
*/
|
|
@@ -36,13 +40,19 @@ export interface BookingSuccessProps {
|
|
|
36
40
|
* @returns The BookingSuccess component.
|
|
37
41
|
*/
|
|
38
42
|
export function BookingSuccess(props: BookingSuccessProps) {
|
|
39
|
-
const {
|
|
43
|
+
const {
|
|
44
|
+
open,
|
|
45
|
+
bookingName,
|
|
46
|
+
setOpen,
|
|
47
|
+
onNext,
|
|
48
|
+
illustration = '/images/svg/booking-confirm.svg',
|
|
49
|
+
} = props;
|
|
40
50
|
return (
|
|
41
51
|
<DialogBookingConfirm open={open} setOpen={setOpen} className="!max-w-[800px]">
|
|
42
52
|
<div className="space-y-9">
|
|
43
53
|
<div className="space-y-8">
|
|
44
54
|
<img
|
|
45
|
-
src=
|
|
55
|
+
src={illustration}
|
|
46
56
|
alt="Booking success"
|
|
47
57
|
className="mx-auto"
|
|
48
58
|
width={150}
|