mautourco-components 0.2.21 → 0.2.22

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 (105) hide show
  1. package/dist/components/atoms/Checkbox/Checkbox.d.ts +3 -2
  2. package/dist/components/atoms/Checkbox/Checkbox.js +16 -6
  3. package/dist/components/atoms/Inputs/Input/Input.d.ts +1 -1
  4. package/dist/components/molecules/BookingPax/BookingPax.d.ts +43 -0
  5. package/dist/components/molecules/BookingPax/BookingPax.js +43 -0
  6. package/dist/components/molecules/BookingPax/BookingPaxAccom.d.ts +34 -0
  7. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +10 -0
  8. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.d.ts +89 -1
  9. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.js +34 -11
  10. package/dist/components/molecules/BookingPax/BookingPaxExcursion.d.ts +43 -0
  11. package/dist/components/molecules/BookingPax/BookingPaxExcursion.js +19 -0
  12. package/dist/components/molecules/BookingPax/BookingPaxHeader.d.ts +15 -0
  13. package/dist/components/molecules/BookingPax/BookingPaxHeader.js +13 -0
  14. package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.d.ts +30 -0
  15. package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.js +15 -0
  16. package/dist/components/molecules/BookingPax/BookingPaxRemarks.d.ts +14 -0
  17. package/dist/components/molecules/BookingPax/BookingPaxRemarks.js +11 -0
  18. package/dist/components/molecules/BookingPax/BookingPaxTransfer.d.ts +51 -0
  19. package/dist/components/molecules/BookingPax/BookingPaxTransfer.js +19 -2
  20. package/dist/components/molecules/BookingPax/index.d.ts +1 -0
  21. package/dist/components/molecules/BookingPax/index.js +1 -0
  22. package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.d.ts +20 -0
  23. package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.js +17 -6
  24. package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.d.ts +18 -0
  25. package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.js +14 -3
  26. package/dist/components/organisms/Booking/BookingPaxList.d.ts +64 -0
  27. package/dist/components/organisms/Booking/BookingPaxList.js +19 -0
  28. package/dist/components/organisms/Dialog/Dialog.d.ts +1 -1
  29. package/dist/components/organisms/Dialog/Dialog.js +4 -4
  30. package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.d.ts +29 -0
  31. package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.js +31 -0
  32. package/dist/components/organisms/DialogBookingConfirm/BookingMailSent.d.ts +29 -0
  33. package/dist/components/organisms/DialogBookingConfirm/BookingMailSent.js +31 -0
  34. package/dist/components/organisms/DialogBookingConfirm/BookingReference.d.ts +35 -0
  35. package/dist/components/organisms/DialogBookingConfirm/BookingReference.js +37 -0
  36. package/dist/components/organisms/DialogBookingConfirm/BookingSuccess.d.ts +35 -0
  37. package/dist/components/organisms/DialogBookingConfirm/BookingSuccess.js +33 -0
  38. package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.d.ts +39 -2
  39. package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.js +25 -1
  40. package/dist/components/organisms/DialogBookingConfirm/index.d.ts +5 -0
  41. package/dist/components/organisms/DialogBookingConfirm/index.js +1 -0
  42. package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.d.ts +25 -0
  43. package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.js +16 -0
  44. package/dist/components/organisms/TabCancellationPolicy/CancellationBody.d.ts +24 -0
  45. package/dist/components/organisms/TabCancellationPolicy/CancellationBody.js +24 -0
  46. package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.d.ts +30 -0
  47. package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.js +15 -0
  48. package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.d.ts +23 -0
  49. package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.js +23 -0
  50. package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.d.ts +22 -0
  51. package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.js +13 -0
  52. package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.d.ts +22 -0
  53. package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +13 -0
  54. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.d.ts +18 -0
  55. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.js +12 -0
  56. package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +7 -0
  57. package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.js +2 -1
  58. package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.d.ts +18 -0
  59. package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.js +12 -0
  60. package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.d.ts +11 -0
  61. package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.js +11 -0
  62. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.d.ts +29 -0
  63. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.js +29 -0
  64. package/dist/index.d.ts +4 -0
  65. package/dist/index.js +2 -2
  66. package/dist/styles/components/checkbox.css +11 -5
  67. package/package.json +1 -2
  68. package/src/components/atoms/Checkbox/Checkbox.tsx +38 -23
  69. package/src/components/atoms/Inputs/Input/Input.tsx +1 -1
  70. package/src/components/molecules/BookingPax/BookingPax.tsx +43 -0
  71. package/src/components/molecules/BookingPax/BookingPaxAccom.tsx +34 -0
  72. package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +6 -0
  73. package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.tsx +92 -18
  74. package/src/components/molecules/BookingPax/BookingPaxExcursion.tsx +43 -0
  75. package/src/components/molecules/BookingPax/BookingPaxHeader.tsx +28 -1
  76. package/src/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.tsx +30 -0
  77. package/src/components/molecules/BookingPax/BookingPaxRemarks.tsx +14 -0
  78. package/src/components/molecules/BookingPax/BookingPaxTransfer.tsx +52 -2
  79. package/src/components/molecules/BookingPax/index.ts +2 -0
  80. package/src/components/molecules/DialogContentPolicy/DialogCancellationList.tsx +32 -12
  81. package/src/components/molecules/DialogContentPolicy/DialogContentPolicy.tsx +27 -11
  82. package/src/components/organisms/Booking/BookingPaxList.tsx +64 -0
  83. package/src/components/organisms/Dialog/Dialog.tsx +13 -20
  84. package/src/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.tsx +44 -0
  85. package/src/components/organisms/DialogBookingConfirm/BookingMailSent.tsx +56 -0
  86. package/src/components/organisms/DialogBookingConfirm/BookingReference.tsx +74 -0
  87. package/src/components/organisms/DialogBookingConfirm/BookingSuccess.tsx +67 -0
  88. package/src/components/organisms/DialogBookingConfirm/DialogBookingConfirm.tsx +43 -2
  89. package/src/components/organisms/DialogBookingConfirm/index.ts +6 -0
  90. package/src/components/organisms/TabCancellationPolicy/CancellationAccom.tsx +25 -0
  91. package/src/components/organisms/TabCancellationPolicy/CancellationBody.tsx +24 -0
  92. package/src/components/organisms/TabCancellationPolicy/CancellationExcursion.tsx +30 -0
  93. package/src/components/organisms/TabCancellationPolicy/CancellationHeader.tsx +23 -0
  94. package/src/components/organisms/TabCancellationPolicy/CancellationTransfer.tsx +22 -0
  95. package/src/components/organisms/TabCancellationPolicy/HeaderAccom.tsx +22 -0
  96. package/src/components/organisms/TabCancellationPolicy/HeaderExcursion.tsx +18 -0
  97. package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +3 -0
  98. package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.tsx +3 -2
  99. package/src/components/organisms/TabCancellationPolicy/PolicyExcursion.tsx +18 -0
  100. package/src/components/organisms/TabCancellationPolicy/PolicyTransfer.tsx +11 -0
  101. package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicy.tsx +29 -0
  102. package/src/styles/components/checkbox.css +11 -5
  103. package/dist/components/ui/checkbox.d.ts +0 -4
  104. package/dist/components/ui/checkbox.js +0 -31
  105. package/src/components/ui/checkbox.tsx +0 -32
@@ -0,0 +1,74 @@
1
+ import React, { useState } from 'react';
2
+ import Button from '../../atoms/Button/Button';
3
+ import Input from '../../atoms/Inputs/Input/Input';
4
+ import { Text } from '../../atoms/Typography/Typography';
5
+ import { DialogBookingConfirm } from './DialogBookingConfirm';
6
+
7
+ export interface BookingReferenceProps {
8
+ /**
9
+ * Whether the dialog is open.
10
+ */
11
+ open: boolean;
12
+ /**
13
+ * The callback function to call when the dialog is closed.
14
+ */
15
+ setOpen: (open: boolean) => void;
16
+ /**
17
+ * The callback function to call when the cancel button is clicked.
18
+ */
19
+ onCancel: () => void;
20
+ /**
21
+ * The callback function to call when the confirm button is clicked.
22
+ */
23
+ onConfirm: (ref: string) => void;
24
+ }
25
+
26
+ /**
27
+ * BookingReference is a component that allows the user to display the booking reference.
28
+ *
29
+ * @example
30
+ * <BookingReference
31
+ * open={open}
32
+ * setOpen={setOpen}
33
+ * onCancel={onCancel}
34
+ * onConfirm={onConfirm}
35
+ * />
36
+ *
37
+ *
38
+ * @param props - The props for the BookingReference component.
39
+ * @returns The BookingReference component.
40
+ */
41
+ export const BookingReference: React.FC<BookingReferenceProps> = (props) => {
42
+ const { open, setOpen, onCancel, onConfirm } = props;
43
+ const [reference, setReference] = useState('');
44
+ return (
45
+ <DialogBookingConfirm
46
+ open={open}
47
+ setOpen={setOpen}
48
+ title="Reference number"
49
+ className="!max-w-[500px]">
50
+ <div className="space-y-9">
51
+ <div className="space-y-2">
52
+ <label>
53
+ <Text as="span" size="sm">
54
+ Reference number
55
+ </Text>
56
+ </label>
57
+ <Input
58
+ placeholder="Please insert a reference number"
59
+ value={reference}
60
+ onChange={(e) => setReference(e.target.value)}
61
+ />
62
+ </div>
63
+ <div className="grid grid-cols-2 gap-x-4">
64
+ <Button variant="outline-secondary" onClick={onCancel}>
65
+ Cancel
66
+ </Button>
67
+ <Button variant="secondary" onClick={() => onConfirm(reference)}>
68
+ Confirm booking
69
+ </Button>
70
+ </div>
71
+ </div>
72
+ </DialogBookingConfirm>
73
+ );
74
+ };
@@ -0,0 +1,67 @@
1
+ import { Button, Heading, Text } from '@/src';
2
+ import React from 'react';
3
+ import { DialogBookingConfirm } from './DialogBookingConfirm';
4
+
5
+ export interface BookingSuccessProps {
6
+ /**
7
+ * Whether the dialog is open.
8
+ */
9
+ open: boolean;
10
+ /**
11
+ * The name of the booking.
12
+ */
13
+ bookingName: string;
14
+ /**
15
+ * The callback function to call when the dialog is closed.
16
+ */
17
+ setOpen: (open: boolean) => void;
18
+ /**
19
+ * The callback function to call when the next button is clicked.
20
+ */
21
+ onNext: () => void;
22
+ }
23
+
24
+ /**
25
+ * BookingSuccess is a component that allows the user to display the booking success.
26
+ *
27
+ * @example
28
+ * <BookingSuccess
29
+ * open={open}
30
+ * bookingName={bookingName}
31
+ * setOpen={setOpen}
32
+ * onNext={onNext}
33
+ * />
34
+ *
35
+ *
36
+ * @param props - The props for the BookingSuccess component.
37
+ * @returns The BookingSuccess component.
38
+ */
39
+ export const BookingSuccess: React.FC<BookingSuccessProps> = (props) => {
40
+ const { open, bookingName, setOpen, onNext } = props;
41
+ return (
42
+ <DialogBookingConfirm open={open} setOpen={setOpen} className="!max-w-[800px]">
43
+ <div className="space-y-9">
44
+ <div className="space-y-8">
45
+ <img
46
+ src="/images/svg/booking-confirm.svg"
47
+ alt="Booking success"
48
+ className="mx-auto"
49
+ width={150}
50
+ height={150}
51
+ />
52
+ <div className="text-center">
53
+ <Heading as="p" level={6} variant="medium">
54
+ Your booking has been successfully confirmed!
55
+ </Heading>
56
+ <Text variant="bold" size="lg">
57
+ "{bookingName}"
58
+ </Text>
59
+ </div>
60
+ </div>
61
+ <Button variant="secondary" onClick={onNext} className="w-full">
62
+ Confirm booking
63
+ </Button>
64
+ </div>
65
+ </DialogBookingConfirm>
66
+ );
67
+ };
@@ -1,14 +1,49 @@
1
1
  import React from 'react';
2
2
  import Dialog from '../Dialog/Dialog';
3
+ import { BookingCancellationPolicy } from './BookingCancellationPolicy';
4
+ import { BookingMailSent } from './BookingMailSent';
5
+ import { BookingReference } from './BookingReference';
6
+ import { BookingSuccess } from './BookingSuccess';
3
7
 
4
8
  interface DialogBookingConfirmProps {
9
+ /**
10
+ * Whether the dialog is open.
11
+ */
5
12
  open: boolean;
6
- title: string;
13
+ /**
14
+ * The title of the dialog.
15
+ */
16
+ title?: string;
17
+ /**
18
+ * The children of the dialog.
19
+ */
7
20
  children: React.ReactNode;
21
+ /**
22
+ * The callback function to call when the dialog is closed.
23
+ */
8
24
  setOpen: (open: boolean) => void;
25
+ /**
26
+ * The class name of the dialog.
27
+ */
9
28
  className?: string;
10
29
  }
11
30
 
31
+ /**
32
+ * DialogBookingConfirm is a component that allows the user to display the booking confirmation.
33
+ *
34
+ * @example
35
+ * <DialogBookingConfirm
36
+ * open={open}
37
+ * title={title}
38
+ * children={children}
39
+ * setOpen={setOpen}
40
+ * className={className}
41
+ * />
42
+ *
43
+ *
44
+ * @param props - The props for the DialogBookingConfirm component.
45
+ * @returns The DialogBookingConfirm component.
46
+ */
12
47
  export const DialogBookingConfirm = (props: DialogBookingConfirmProps) => {
13
48
  const { open, title, children, setOpen, className } = props;
14
49
 
@@ -18,8 +53,14 @@ export const DialogBookingConfirm = (props: DialogBookingConfirmProps) => {
18
53
  onClose={() => setOpen(false)}
19
54
  title={title}
20
55
  className={className}
21
- showFooter={false}>
56
+ showFooter={false}
57
+ closeOnOverlayClick={false}>
22
58
  {children}
23
59
  </Dialog>
24
60
  );
25
61
  };
62
+
63
+ DialogBookingConfirm.Reference = BookingReference;
64
+ DialogBookingConfirm.CancellationPolicy = BookingCancellationPolicy;
65
+ DialogBookingConfirm.Success = BookingSuccess;
66
+ DialogBookingConfirm.MailSent = BookingMailSent;
@@ -0,0 +1,6 @@
1
+ export * from './DialogBookingConfirm';
2
+
3
+ export type { BookingCancellationPolicyProps } from './BookingCancellationPolicy';
4
+ export type { BookingMailSentProps } from './BookingMailSent';
5
+ export type { BookingReferenceProps } from './BookingReference';
6
+ export type { BookingSuccessProps } from './BookingSuccess';
@@ -5,14 +5,39 @@ import { Policy } from './PolicyAccom/PolicyAccom';
5
5
  import DetailsCancellationPolicy from './TabCancellationPolicy';
6
6
 
7
7
  export interface CancellationAccomProps extends HeaderAccomProps {
8
+ /**
9
+ * The image of the cancellation accommodation.
10
+ */
8
11
  image: string;
12
+ /**
13
+ * Whether the cancellation accommodation is on request.
14
+ */
9
15
  isOnRequest?: boolean;
16
+ /**
17
+ * The room policies of the cancellation accommodation.
18
+ */
10
19
  roomPolicies: Array<{
11
20
  roomName: string;
12
21
  policies: Policy[];
13
22
  }>;
14
23
  }
15
24
 
25
+ /**
26
+ * CancellationAccom is a component that allows the user to display the cancellation accommodation.
27
+ *
28
+ * @example
29
+ * <CancellationAccom
30
+ * hotelName="Hotel Name"
31
+ * pax="8 pax"
32
+ * dates={['2024-01-01', '2024-01-02']}
33
+ * image="/images/accom.png"
34
+ * roomPolicies={roomPolicies}
35
+ * isOnRequest={false}
36
+ * />
37
+ *
38
+ * @param props - The props for the CancellationAccom component.
39
+ * @returns The CancellationAccom component.
40
+ */
16
41
  export default function CancellationAccom(props: CancellationAccomProps) {
17
42
  const { hotelName, pax, dates, image, roomPolicies, isOnRequest } = props;
18
43
  return (
@@ -3,6 +3,30 @@ import PolicyAccom from './PolicyAccom/PolicyAccom';
3
3
  import PolicyExcursion from './PolicyExcursion';
4
4
  import PolicyTransfer from './PolicyTransfer';
5
5
 
6
+ /**
7
+ * CancellationBody is a component that allows the user to display the cancellation body.
8
+ *
9
+ * @example
10
+ * <CancellationBody>
11
+ * <CancellationBody.Accom
12
+ * roomName="Room Name"
13
+ * policies={policies}
14
+ * />
15
+ * <CancellationBody.Excursion
16
+ * name="Excursion Name"
17
+ * date="2024-01-01"
18
+ * pickUpPoint="Pick Up Point"
19
+ * policies={policies}
20
+ * />
21
+ * <CancellationBody.Transfer
22
+ * carName="Car Name"
23
+ * transferData={transferData}
24
+ * />
25
+ * </CancellationBody>
26
+ *
27
+ * @param props - The props for the CancellationBody component.
28
+ * @returns The CancellationBody component.
29
+ */
6
30
  export default function CancellationBody(props: React.PropsWithChildren) {
7
31
  return <div className="cancellation-body" {...props} />;
8
32
  }
@@ -3,13 +3,43 @@ import CancellationHeader from './CancellationHeader';
3
3
  import DetailsCancellationPolicy from './TabCancellationPolicy';
4
4
 
5
5
  export interface CancellationExcursionProps {
6
+ /**
7
+ * The name of the cancellation excursion.
8
+ */
6
9
  name: string;
10
+ /**
11
+ * The date of the cancellation excursion.
12
+ */
7
13
  date: string;
14
+ /**
15
+ * The image of the cancellation excursion.
16
+ */
8
17
  image: string;
18
+ /**
19
+ * The pick up point of the cancellation excursion.
20
+ */
9
21
  pickUpPoint: string;
22
+ /**
23
+ * The policies of the cancellation excursion.
24
+ */
10
25
  policies: string;
11
26
  }
12
27
 
28
+ /**
29
+ * CancellationExcursion is a component that allows the user to display the cancellation excursion.
30
+ *
31
+ * @example
32
+ * <CancellationExcursion
33
+ * name="Excursion Name"
34
+ * date="2024-01-01"
35
+ * image="/images/excursion.png"
36
+ * pickUpPoint="Pick Up Point"
37
+ * policies="Policies"
38
+ * />
39
+ *
40
+ * @param props - The props for the CancellationExcursion component.
41
+ * @returns The CancellationExcursion component.
42
+ */
13
43
  export default function CancellationExcursion(props: CancellationExcursionProps) {
14
44
  const { name, date, image, pickUpPoint, policies } = props;
15
45
  return (
@@ -2,6 +2,29 @@ import HeaderAccom from './HeaderAccom';
2
2
  import HeaderExcursion from './HeaderExcursion';
3
3
  import HeaderTransfer from './HeaderExcursion/HeaderTransfer';
4
4
 
5
+ /**
6
+ * CancellationHeader is a component that allows the user to display the cancellation header.
7
+ *
8
+ * @example
9
+ * <CancellationHeader>
10
+ * <CancellationHeader.Accom
11
+ * hotelName="Hotel Name"
12
+ * pax="8 pax"
13
+ * dates={['2024-01-01', '2024-01-02']}
14
+ * />
15
+ * <CancellationHeader.Excursion
16
+ * name="Excursion Name"
17
+ * date="2024-01-01"
18
+ * />
19
+ * <CancellationHeader.Transfer
20
+ * carName="Car Name"
21
+ * transferData={transferData}
22
+ * />
23
+ * </CancellationHeader>
24
+ *
25
+ * @param props - The props for the CancellationHeader component.
26
+ * @returns The CancellationHeader component.
27
+ */
5
28
  export default function CancellationHeader(props: React.PropsWithChildren) {
6
29
  return <div className="cancellation-header" {...props} />;
7
30
  }
@@ -4,10 +4,32 @@ import { TransferData } from './HeaderExcursion/HeaderTransfer';
4
4
  import DetailsCancellationPolicy from './TabCancellationPolicy';
5
5
 
6
6
  export interface CancellationTransferProps {
7
+ /**
8
+ * The image of the cancellation transfer.
9
+ */
7
10
  image: string;
11
+ /**
12
+ * The car name of the cancellation transfer.
13
+ */
8
14
  carName: string;
15
+ /**
16
+ * The transfer data of the cancellation transfer.
17
+ */
9
18
  transferData: TransferData[];
10
19
  }
20
+ /**
21
+ * CancellationTransfer is a component that allows the user to display the cancellation transfer.
22
+ *
23
+ * @example
24
+ * <CancellationTransfer
25
+ * image="/images/transfer.png"
26
+ * carName="Car Name"
27
+ * transferData={transferData}
28
+ * />
29
+ *
30
+ * @param props - The props for the CancellationTransfer component.
31
+ * @returns The CancellationTransfer component.
32
+ */
11
33
  export default function CancellationTransfer(props: CancellationTransferProps) {
12
34
  const { image, carName, transferData } = props;
13
35
  return (
@@ -4,11 +4,33 @@ import { ServiceTitle } from '../../molecules/ServiceTitle/ServiceTitle';
4
4
  import TextWithIcon from '../../molecules/TextWithIcon/TextWithIcon';
5
5
 
6
6
  export interface HeaderAccomProps {
7
+ /**
8
+ * The hotel name of the header accommodation.
9
+ */
7
10
  hotelName: string;
11
+ /**
12
+ * The pax of the header accommodation.
13
+ */
8
14
  pax: number | string;
15
+ /**
16
+ * The dates of the header accommodation.
17
+ */
9
18
  dates: string[];
10
19
  }
11
20
 
21
+ /**
22
+ * HeaderAccom is a component that allows the user to display the header accommodation.
23
+ *
24
+ * @example
25
+ * <HeaderAccom
26
+ * hotelName="Hotel Name"
27
+ * pax="8 pax"
28
+ * dates={['2024-01-01', '2024-01-02']}
29
+ * />
30
+ *
31
+ * @param props - The props for the HeaderAccom component.
32
+ * @returns
33
+ */
12
34
  export default function HeaderAccom(props: HeaderAccomProps) {
13
35
  const { hotelName, pax, dates } = props;
14
36
 
@@ -2,10 +2,28 @@ import { DateDisplay } from '../../molecules/DateDisplay/DateDisplay';
2
2
  import { ServiceTitle } from '../../molecules/ServiceTitle/ServiceTitle';
3
3
 
4
4
  export interface HeaderExcursionProps {
5
+ /**
6
+ * The name of the header excursion.
7
+ */
5
8
  name: string;
9
+ /**
10
+ * The date of the header excursion.
11
+ */
6
12
  date: string;
7
13
  }
8
14
 
15
+ /**
16
+ * HeaderExcursion is a component that allows the user to display the header excursion.
17
+ *
18
+ * @example
19
+ * <HeaderExcursion
20
+ * name="Excursion Name"
21
+ * date="2024-01-01"
22
+ * />
23
+ *
24
+ * @param props - The props for the HeaderExcursion component.
25
+ * @returns The HeaderExcursion component.
26
+ */
9
27
  export default function HeaderExcursion(props: HeaderExcursionProps) {
10
28
  const { name, date } = props;
11
29
 
@@ -1,5 +1,8 @@
1
1
  .policy-accom {
2
2
  @apply space-y-6;
3
+ .chip__label {
4
+ @apply gap-x-4;
5
+ }
3
6
  }
4
7
 
5
8
  .policy-accom__period {
@@ -1,3 +1,4 @@
1
+ import Chip from '@/src/components/atoms/Chip/Chip';
1
2
  import { Fragment } from 'react';
2
3
  import { Text } from '../../../atoms/Typography/Typography';
3
4
  import { DateDisplay } from '../../../molecules/DateDisplay/DateDisplay';
@@ -28,10 +29,10 @@ export default function PolicyAccom(props: PolicyAccomProps) {
28
29
  </div>
29
30
  {policies.map((policy, index) => (
30
31
  <Fragment key={`policy-${index}`}>
31
- <Text size="xs" variant="medium" leading="4" className="policy-accom__period">
32
+ <Chip type="outline" color="brand" isBlackText>
32
33
  Policy period applies{' '}
33
34
  <DateDisplay dates={[policy.ValidFrom, policy.ValidTo]} textSize="xs" />
34
- </Text>
35
+ </Chip>
35
36
  <div className="space-y-2">
36
37
  <Text variant="bold" size="xs" leading="4">
37
38
  {policy.Value} % of total price
@@ -1,10 +1,28 @@
1
1
  import { Text } from '../../atoms/Typography/Typography';
2
2
 
3
3
  export interface PolicyExcursionProps {
4
+ /**
5
+ * The pick up point of the policy excursion.
6
+ */
4
7
  pickUpPoint: string;
8
+ /**
9
+ * The policies of the policy excursion.
10
+ */
5
11
  policies: string;
6
12
  }
7
13
 
14
+ /**
15
+ * PolicyExcursion is a component that allows the user to display the policy excursion.
16
+ *
17
+ * @example
18
+ * <PolicyExcursion
19
+ * pickUpPoint="Pick Up Point"
20
+ * policies="Policies"
21
+ * />
22
+ *
23
+ * @param props - The props for the PolicyExcursion component.
24
+ * @returns
25
+ */
8
26
  export default function PolicyExcursion(props: PolicyExcursionProps) {
9
27
  const { pickUpPoint, policies } = props;
10
28
 
@@ -33,6 +33,17 @@ const policies = [
33
33
  },
34
34
  ];
35
35
 
36
+ /**
37
+ * PolicyTransfer is a component that allows the user to display the policy transfer.
38
+ *
39
+ * @example
40
+ * <PolicyTransfer
41
+ * carName="Car Name"
42
+ * />
43
+ *
44
+ * @param props - The props for the PolicyTransfer component.
45
+ * @returns
46
+ */
36
47
  export default function PolicyTransfer(props: PolicyTransferProps) {
37
48
  const { carName } = props;
38
49
 
@@ -3,6 +3,35 @@ import CancellationExcursion from './CancellationExcursion';
3
3
  import CancellationTransfer from './CancellationTransfer';
4
4
  import TabCancellationPolicyLayout from './TabCancellationPolicyLayout/TabCancellationPolicyLayout';
5
5
 
6
+ /**
7
+ * TabCancellationPolicy is a component that allows the user to display the tab cancellation policy.
8
+ *
9
+ * @example
10
+ * <TabCancellationPolicy>
11
+ * <TabCancellationPolicy.Accom
12
+ * hotelName="Hotel Name"
13
+ * pax="8 pax"
14
+ * dates={['2024-01-01', '2024-01-02']}
15
+ * image="/images/accom.png"
16
+ * roomPolicies={roomPolicies}
17
+ * isOnRequest={false}
18
+ * />
19
+ * <TabCancellationPolicy.Excursion
20
+ * name="Excursion Name"
21
+ * date="2024-01-01"
22
+ * image="/images/excursion.png"
23
+ * pickUpPoint="Pick Up Point"
24
+ * policies="Policies"
25
+ * />
26
+ * <TabCancellationPolicy.Transfer
27
+ * carName="Car Name"
28
+ * transferData={transferData}
29
+ * />
30
+ * </TabCancellationPolicy>
31
+ *
32
+ * @param props - The props for the TabCancellationPolicy component.
33
+ * @returns The TabCancellationPolicy component.
34
+ */
6
35
  export default function TabCancellationPolicy(props: React.PropsWithChildren) {
7
36
  return <div className="tab-cancellation-policy" {...props} />;
8
37
  }
@@ -18,13 +18,17 @@
18
18
  .checkbox-label {
19
19
  display: flex;
20
20
  align-items: center;
21
- column-gap: var(--checkbox-spacing-inline-gap, var(--multiselect-spacing-option-icon-gap, 0.625rem));
21
+ column-gap: var(
22
+ --checkbox-spacing-inline-gap,
23
+ var(--multiselect-spacing-option-icon-gap, 0.625rem)
24
+ );
22
25
  cursor: pointer;
23
26
  user-select: none;
24
27
  width: 100%;
25
28
  padding: var(--checkbox-spacing-label-padding, 0.5rem 0.75rem);
26
29
  border-radius: var(--checkbox-border-radius, 0.375rem);
27
- transition: all var(--checkbox-transition-duration, 0.2s) var(--checkbox-transition-timing, ease-in-out);
30
+ transition: all var(--checkbox-transition-duration, 0.2s)
31
+ var(--checkbox-transition-timing, ease-in-out);
28
32
  }
29
33
 
30
34
  .checkbox-box {
@@ -40,7 +44,8 @@
40
44
  display: flex;
41
45
  align-items: center;
42
46
  justify-content: center;
43
- transition: all var(--checkbox-transition-duration, 0.2s) var(--checkbox-transition-timing, ease-in-out);
47
+ transition: all var(--checkbox-transition-duration, 0.2s)
48
+ var(--checkbox-transition-timing, ease-in-out);
44
49
  flex-shrink: 0;
45
50
  }
46
51
 
@@ -50,7 +55,8 @@
50
55
  font-size: var(--checkbox-typography-fontSize, 0.875rem);
51
56
  line-height: var(--checkbox-typography-lineHeight, 1.25rem);
52
57
  color: var(--color-gray-900);
53
- transition: color var(--checkbox-transition-duration, 0.2s) var(--checkbox-transition-timing, ease-in-out);
58
+ transition: color var(--checkbox-transition-duration, 0.2s)
59
+ var(--checkbox-transition-timing, ease-in-out);
54
60
  }
55
61
 
56
62
  .checkbox-leading {
@@ -77,7 +83,7 @@
77
83
 
78
84
  .checkbox--checked .checkbox-box {
79
85
  background-color: var(--color-transparent);
80
- border-color: var(--checkbox-border-radius, 0.125rem);
86
+ border-color: var(--color-atoll-green-800);
81
87
  }
82
88
 
83
89
  .checkbox--checked .checkbox-label {
@@ -1,4 +0,0 @@
1
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
2
- import * as React from 'react';
3
- declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- export { Checkbox };
@@ -1,31 +0,0 @@
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
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
25
- import { cn } from '@/src/lib/utils';
26
- import Icon from '../atoms/Icon/Icon';
27
- function Checkbox(_a) {
28
- var className = _a.className, props = __rest(_a, ["className"]);
29
- return (_jsx(CheckboxPrimitive.Root, __assign({ "data-slot": "checkbox", className: cn('w-5 h-5 border border-[var(--checkbox-color-checkbox-border-default-default)] data-[state=checked]:border-[var(--checkbox-color-checkbox-border-selected-default)] rounded-[var(--border-radius-rounded-sm)] data-[error=true]:border-[var(--checkbox-color-checkbox-border-default-error)] data-[error=true]:bg-[var(--checkbox-color-checkbox-background-error)] disabled:opacity-50 disabled:cursor-not-allowed', className) }, props, { children: _jsx(CheckboxPrimitive.Indicator, __assign({ "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none" }, { children: _jsx(Icon, { name: "check", size: "sm", className: "text-[var(--checkbox-color-checkbox-checked-default)]" }) })) })));
30
- }
31
- export { Checkbox };