mautourco-components 0.2.15 → 0.2.17

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 (126) hide show
  1. package/dist/components/atoms/Icon/icons/BusIcon.js +1 -1
  2. package/dist/components/atoms/Tab/Tab.css +6 -8
  3. package/dist/components/atoms/Typography/Typography.d.ts +1 -1
  4. package/dist/components/atoms/Typography/Typography.js +18 -4
  5. package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +4 -0
  6. package/dist/components/molecules/ActionDropdown/ActionDropdown.js +2 -2
  7. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.css +2097 -0
  8. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +11 -0
  9. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +20 -0
  10. package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +9 -2
  11. package/dist/components/molecules/DateDisplay/DateDisplay.js +5 -5
  12. package/dist/components/molecules/DetailsInfo/DetailsAction.d.ts +9 -0
  13. package/dist/components/molecules/DetailsInfo/DetailsAction.js +46 -0
  14. package/dist/components/molecules/DetailsInfo/DetailsAgency.css +2101 -0
  15. package/dist/components/molecules/DetailsInfo/DetailsAgency.d.ts +9 -0
  16. package/dist/components/molecules/DetailsInfo/DetailsAgency.js +19 -0
  17. package/dist/components/molecules/DetailsInfo/DetailsFile.d.ts +8 -0
  18. package/dist/components/molecules/DetailsInfo/DetailsFile.js +18 -0
  19. package/dist/components/molecules/DetailsInfo/DetailsInfo.d.ts +12 -0
  20. package/dist/components/molecules/DetailsInfo/DetailsInfo.js +22 -0
  21. package/dist/components/molecules/DetailsInfo/index.d.ts +4 -0
  22. package/dist/components/molecules/DetailsInfo/index.js +1 -0
  23. package/dist/components/molecules/ServiceTitle/ServiceTitle.css +2094 -0
  24. package/dist/components/molecules/ServiceTitle/ServiceTitle.d.ts +8 -0
  25. package/dist/components/molecules/ServiceTitle/ServiceTitle.js +18 -0
  26. package/dist/components/molecules/TableServiceItem/DetailsCol.d.ts +2 -2
  27. package/dist/components/molecules/TableServiceItem/DetailsCol.js +3 -2
  28. package/dist/components/molecules/TextWithIcon/TextWithIcon.js +2 -2
  29. package/dist/components/molecules/TimelineItem/ServiceAccommodation.d.ts +9 -0
  30. package/dist/components/molecules/TimelineItem/ServiceAccommodation.js +20 -0
  31. package/dist/components/molecules/TimelineItem/ServiceExcursion.d.ts +8 -0
  32. package/dist/components/molecules/TimelineItem/ServiceExcursion.js +20 -0
  33. package/dist/components/molecules/TimelineItem/ServiceTransfer.d.ts +11 -0
  34. package/dist/components/molecules/TimelineItem/ServiceTransfer.js +19 -0
  35. package/dist/components/molecules/TimelineItem/TimelineHeader.css +2166 -0
  36. package/dist/components/molecules/TimelineItem/TimelineHeader.d.ts +10 -0
  37. package/dist/components/molecules/TimelineItem/TimelineHeader.js +21 -0
  38. package/dist/components/molecules/TimelineItem/TimelineItem.css +2084 -0
  39. package/dist/components/molecules/TimelineItem/TimelineItem.d.ts +12 -0
  40. package/dist/components/molecules/TimelineItem/TimelineItem.js +23 -0
  41. package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.d.ts +12 -0
  42. package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.js +19 -0
  43. package/dist/components/organisms/TabCancellationPolicy/CancellationBody.d.ts +11 -0
  44. package/dist/components/organisms/TabCancellationPolicy/CancellationBody.js +21 -0
  45. package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.d.ts +8 -0
  46. package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.js +19 -0
  47. package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.d.ts +11 -0
  48. package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.js +21 -0
  49. package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.d.ts +7 -0
  50. package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.js +19 -0
  51. package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.d.ts +6 -0
  52. package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +27 -0
  53. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.css +2082 -0
  54. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.d.ts +12 -0
  55. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.js +26 -0
  56. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.d.ts +5 -0
  57. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.js +7 -0
  58. package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +2094 -0
  59. package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.d.ts +13 -0
  60. package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.js +21 -0
  61. package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.d.ts +5 -0
  62. package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.js +17 -0
  63. package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.d.ts +4 -0
  64. package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.js +44 -0
  65. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.d.ts +13 -0
  66. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.js +23 -0
  67. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.css +2134 -0
  68. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.d.ts +13 -0
  69. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.js +19 -0
  70. package/dist/components/organisms/TabCancellationPolicy/index.d.ts +6 -0
  71. package/dist/components/organisms/TabCancellationPolicy/index.js +3 -0
  72. package/dist/components/organisms/Table/columns/booking-columns.js +1 -1
  73. package/dist/components/organisms/Table/columns/detail-resume-columns.js +1 -1
  74. package/dist/components/organisms/Table/columns/quotation-columns.js +3 -3
  75. package/dist/components/organisms/Timeline/Timeline.d.ts +15 -0
  76. package/dist/components/organisms/Timeline/Timeline.js +20 -0
  77. package/dist/index.d.ts +11 -0
  78. package/dist/index.js +5 -0
  79. package/dist/types/table/action-dropdown-type.types.d.ts +1 -0
  80. package/dist/types/table/action-dropdown-type.types.js +1 -0
  81. package/package.json +1 -1
  82. package/src/components/atoms/Icon/icons/BusIcon.tsx +6 -2
  83. package/src/components/atoms/Tab/Tab.css +6 -8
  84. package/src/components/atoms/Typography/Typography.tsx +27 -7
  85. package/src/components/molecules/ActionDropdown/ActionDropdown.tsx +16 -5
  86. package/src/components/molecules/Breadcrumbs/Breadcrumbs.css +10 -0
  87. package/src/components/molecules/Breadcrumbs/Breadcrumbs.tsx +47 -0
  88. package/src/components/molecules/DateDisplay/DateDisplay.tsx +25 -9
  89. package/src/components/molecules/DetailsInfo/DetailsAction.tsx +55 -0
  90. package/src/components/molecules/DetailsInfo/DetailsAgency.css +21 -0
  91. package/src/components/molecules/DetailsInfo/DetailsAgency.tsx +53 -0
  92. package/src/components/molecules/DetailsInfo/DetailsFile.tsx +27 -0
  93. package/src/components/molecules/DetailsInfo/DetailsInfo.tsx +17 -0
  94. package/src/components/molecules/DetailsInfo/index.ts +4 -0
  95. package/src/components/molecules/ServiceTitle/ServiceTitle.css +13 -0
  96. package/src/components/molecules/ServiceTitle/ServiceTitle.tsx +19 -0
  97. package/src/components/molecules/TableServiceItem/DetailsCol.tsx +9 -5
  98. package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +19 -5
  99. package/src/components/molecules/TimelineItem/ServiceAccommodation.tsx +29 -0
  100. package/src/components/molecules/TimelineItem/ServiceExcursion.tsx +28 -0
  101. package/src/components/molecules/TimelineItem/ServiceTransfer.tsx +25 -0
  102. package/src/components/molecules/TimelineItem/TimelineHeader.css +44 -0
  103. package/src/components/molecules/TimelineItem/TimelineHeader.tsx +41 -0
  104. package/src/components/molecules/TimelineItem/TimelineItem.css +7 -0
  105. package/src/components/molecules/TimelineItem/TimelineItem.tsx +17 -0
  106. package/src/components/organisms/TabCancellationPolicy/CancellationAccom.tsx +41 -0
  107. package/src/components/organisms/TabCancellationPolicy/CancellationBody.tsx +12 -0
  108. package/src/components/organisms/TabCancellationPolicy/CancellationExcursion.tsx +31 -0
  109. package/src/components/organisms/TabCancellationPolicy/CancellationHeader.tsx +11 -0
  110. package/src/components/organisms/TabCancellationPolicy/CancellationTransfer.tsx +29 -0
  111. package/src/components/organisms/TabCancellationPolicy/HeaderAccom.tsx +31 -0
  112. package/src/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.css +3 -0
  113. package/src/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.tsx +48 -0
  114. package/src/components/organisms/TabCancellationPolicy/HeaderExcursion.tsx +18 -0
  115. package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +8 -0
  116. package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.tsx +47 -0
  117. package/src/components/organisms/TabCancellationPolicy/PolicyExcursion.tsx +26 -0
  118. package/src/components/organisms/TabCancellationPolicy/PolicyTransfer.tsx +62 -0
  119. package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicy.tsx +13 -0
  120. package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.css +39 -0
  121. package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.tsx +44 -0
  122. package/src/components/organisms/TabCancellationPolicy/index.ts +7 -0
  123. package/src/components/organisms/Table/columns/booking-columns.tsx +1 -1
  124. package/src/components/organisms/Table/columns/detail-resume-columns.tsx +1 -1
  125. package/src/components/organisms/Table/columns/quotation-columns.tsx +10 -5
  126. package/src/components/organisms/Timeline/Timeline.tsx +59 -0
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { IconName } from '../../../atoms/Icon/Icon';
3
+ import './TabCancellationPolicyLayout.css';
4
+ interface TabCancellationPolicyLayoutProps {
5
+ title: string;
6
+ icon: IconName;
7
+ isOnRequest: boolean;
8
+ children: React.ReactNode;
9
+ image: string;
10
+ header: React.ReactNode;
11
+ }
12
+ export default function TabCancellationPolicyLayout(props: TabCancellationPolicyLayoutProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -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 Chip from '../../../atoms/Chip/Chip';
14
+ import TextWithIcon from '../../../molecules/TextWithIcon/TextWithIcon';
15
+ import './TabCancellationPolicyLayout.css';
16
+ export default function TabCancellationPolicyLayout(props) {
17
+ var title = props.title, icon = props.icon, isOnRequest = props.isOnRequest, children = props.children, image = props.image, header = props.header;
18
+ return (_jsxs("div", __assign({ className: "details-cancellation-policy__layout" }, { children: [_jsxs(TextWithIcon, __assign({ icon: icon, color: isOnRequest ? 'yellow' : 'accent', textVariant: "bold" }, { children: [title, isOnRequest && _jsx(Chip, __assign({ color: "yellow" }, { children: "On request" }))] })), _jsxs("div", __assign({ className: "details-cancellation-policy__layout-flex" }, { children: [_jsx("figure", { children: _jsx("img", { src: image, alt: title, width: 400, height: 400 }) }), _jsxs("div", __assign({ className: "details-cancellation-policy__layout-content" }, { children: [_jsx("div", __assign({ className: "details-cancellation-policy__layout-content-header" }, { children: header })), _jsx("div", __assign({ className: "details-cancellation-policy__layout-content-body" }, { children: children }))] }))] }))] })));
19
+ }
@@ -0,0 +1,6 @@
1
+ export * from './CancellationBody';
2
+ export * from './CancellationHeader';
3
+ export * from './TabCancellationPolicy';
4
+ export type { CancellationAccomProps } from './CancellationAccom';
5
+ export type { CancellationExcursionProps } from './CancellationExcursion';
6
+ export type { CancellationTransferProps } from './CancellationTransfer';
@@ -0,0 +1,3 @@
1
+ export * from './CancellationBody';
2
+ export * from './CancellationHeader';
3
+ export * from './TabCancellationPolicy';
@@ -45,7 +45,7 @@ export var bookingColumns = function (_a) {
45
45
  width: 260,
46
46
  cell: function (value) {
47
47
  var dates = value;
48
- return _jsx(DateDisplay, { date: dates });
48
+ return _jsx(DateDisplay, { dates: dates });
49
49
  },
50
50
  },
51
51
  {
@@ -104,7 +104,7 @@ export var detailResumeColumns = function () {
104
104
  date = [otherService.service_date];
105
105
  break;
106
106
  }
107
- return _jsx(DateDisplay, { date: date });
107
+ return _jsx(DateDisplay, { dates: date });
108
108
  },
109
109
  },
110
110
  {
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
13
  import Button from '@/src/components/atoms/Button/Button';
14
14
  import Chip from '@/src/components/atoms/Chip/Chip';
15
15
  import { Text } from '@/src/components/atoms/Typography/Typography';
@@ -56,7 +56,7 @@ export var quotationColumns = function (_a) {
56
56
  width: 260,
57
57
  cell: function (value) {
58
58
  var dates = value;
59
- return _jsx(DateDisplay, { date: dates });
59
+ return _jsx(DateDisplay, { dates: dates });
60
60
  },
61
61
  },
62
62
  {
@@ -72,7 +72,7 @@ export var quotationColumns = function (_a) {
72
72
  header: 'Created by',
73
73
  key: 'created_by',
74
74
  width: 160,
75
- cell: function (value) { return (_jsx(Text, __assign({ variant: "medium", size: "sm" }, { children: value }))); },
75
+ cell: function (value, raw) { return (_jsxs(_Fragment, { children: [_jsxs(Text, __assign({ variant: "medium", size: "sm", leading: "4" }, { children: [raw.file_name, ","] })), _jsx(Text, __assign({ variant: "bold", size: "sm", leading: "4" }, { children: value }))] })); },
76
76
  },
77
77
  {
78
78
  header: '',
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { ServiceAccommodationProps } from '../../molecules/TimelineItem/ServiceAccommodation';
3
+ import { ServiceExcursionProps } from '../../molecules/TimelineItem/ServiceExcursion';
4
+ import { ServiceTransferProps } from '../../molecules/TimelineItem/ServiceTransfer';
5
+ export interface TimelineServices {
6
+ type: 'transfer' | 'accommodation' | 'excursion';
7
+ data: ServiceTransferProps | ServiceAccommodationProps | ServiceExcursionProps;
8
+ }
9
+ export interface TimelineProps {
10
+ arrival: string;
11
+ departure: string;
12
+ services: TimelineServices[];
13
+ className?: string;
14
+ }
15
+ export declare const Timeline: React.FC<TimelineProps>;
@@ -0,0 +1,20 @@
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 { cn } from '@/src/lib/utils';
14
+ import { Text } from '../../atoms/Typography/Typography';
15
+ import TextWithIcon from '../../molecules/TextWithIcon/TextWithIcon';
16
+ import TimelineItem from '../../molecules/TimelineItem/TimelineItem';
17
+ export var Timeline = function (props) {
18
+ var arrival = props.arrival, departure = props.departure, services = props.services, className = props.className;
19
+ return (_jsxs("div", __assign({ className: cn('space-y-10', className) }, { children: [_jsxs(TextWithIcon, __assign({ icon: "arrival", color: "accent", iconSize: "lg" }, { children: ["Arrival :", ' ', _jsx(Text, __assign({ variant: "regular", size: "lg", leading: "5", color: "default", as: "span" }, { children: arrival }))] })), _jsx("div", __assign({ className: "overflow-x-auto" }, { children: _jsx("div", __assign({ className: "flex gap-x-3 pb-8 2xl:pb-0" }, { children: services.map(function (service, index) { return (_jsxs(TimelineItem, { children: [service.type === 'transfer' && (_jsx(TimelineItem.Transfer, __assign({}, service.data))), service.type === 'accommodation' && (_jsx(TimelineItem.Accommodation, __assign({}, service.data))), service.type === 'excursion' && (_jsx(TimelineItem.Excursion, __assign({}, service.data)))] }, "tm-".concat(index))); }) })) })), _jsxs(TextWithIcon, __assign({ icon: "departure", color: "accent", iconSize: "lg" }, { children: ["Departure :", ' ', _jsx(Text, __assign({ variant: "regular", size: "lg", leading: "5", color: "default", as: "span" }, { children: departure }))] }))] })));
20
+ };
package/dist/index.d.ts CHANGED
@@ -14,8 +14,10 @@ export { default as Spinner } from './components/atoms/Spinner/Spinner';
14
14
  export { Heading, Text } from './components/atoms/Typography/Typography';
15
15
  export { ActionDropdown, type ActionDropdownItem, } from './components/molecules/ActionDropdown/ActionDropdown';
16
16
  export { DateDisplay } from './components/molecules/DateDisplay/DateDisplay';
17
+ export { Breadcrumbs } from './components/molecules/Breadcrumbs/Breadcrumbs';
17
18
  export { default as CalendarInput } from './components/molecules/Calendar/CalendarInput';
18
19
  export { default as TimePicker } from './components/molecules/Calendar/TimePicker';
20
+ export * from './components/molecules/DetailsInfo';
19
21
  export { default as FeatureRow } from './components/molecules/FeatureRow/FeatureRow';
20
22
  export { default as FromTo } from './components/molecules/FromTo/FromTo';
21
23
  export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
@@ -26,6 +28,7 @@ export { default as SectionTitle } from './components/molecules/SectionTitle/Sec
26
28
  export { default as ServiceSelector } from './components/molecules/ServiceSelector/ServiceSelector';
27
29
  export { default as Stepper } from './components/molecules/Stepper/Stepper';
28
30
  export { default as TextWithIcon } from './components/molecules/TextWithIcon/TextWithIcon';
31
+ export { default as TimelineItem } from './components/molecules/TimelineItem/TimelineItem';
29
32
  export { Illustration } from './components/atoms/Illustration/Illustration';
30
33
  export { default as TableServiceItem } from './components/molecules/TableServiceItem';
31
34
  export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
@@ -38,7 +41,9 @@ export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSe
38
41
  export { QuoteHeader } from './components/organisms/QuoteHeader/QuoteHeader';
39
42
  export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
40
43
  export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
44
+ export * from './components/organisms/TabCancellationPolicy';
41
45
  export * from './components/organisms/Table';
46
+ export { Timeline } from './components/organisms/Timeline/Timeline';
42
47
  export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
43
48
  export { default as TransferLine } from './components/organisms/TransferLine/TransferLine';
44
49
  export { default as ButtonSpinner } from './components/atoms/Spinner/variants/ButtonSpinner';
@@ -68,8 +73,14 @@ export type { RoundTripData, RoundTripProps, RoundTripTransfer, } from './compon
68
73
  export type { SearchBarTransferData, SearchBarTransferProps, TransferMode, } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
69
74
  export type { TopNavigationProps } from './components/organisms/TopNavigation/TopNavigation';
70
75
  export type { TransferLineData, TransferLineProps, TransferType, } from './components/organisms/TransferLine/TransferLine';
76
+ export type { BreadcrumbsItem, BreadcrumbsProps, } from './components/molecules/Breadcrumbs/Breadcrumbs';
71
77
  export type { FromToProps } from './components/molecules/FromTo/FromTo';
72
78
  export type { SectionTitleProps } from './components/molecules/SectionTitle/SectionTitle';
73
79
  export type { DetailsColProps, ItemColProps, RowAccommodationProps, RowExcursionProps, RowTransferProps, } from './components/molecules/TableServiceItem';
80
+ export type { ServiceAccommodationProps } from './components/molecules/TimelineItem/ServiceAccommodation';
81
+ export type { ServiceExcursionProps } from './components/molecules/TimelineItem/ServiceExcursion';
82
+ export type { ServiceTransferProps } from './components/molecules/TimelineItem/ServiceTransfer';
83
+ export type { TimelineHeaderProps } from './components/molecules/TimelineItem/TimelineHeader';
74
84
  export type { QuoteHeaderProps } from './components/organisms/QuoteHeader/QuoteHeader';
85
+ export type { TimelineProps, TimelineServices, } from './components/organisms/Timeline/Timeline';
75
86
  export * from './types/table';
package/dist/index.js CHANGED
@@ -16,8 +16,10 @@ export { Heading, Text } from './components/atoms/Typography/Typography';
16
16
  export { ActionDropdown, } from './components/molecules/ActionDropdown/ActionDropdown';
17
17
  export { DateDisplay } from './components/molecules/DateDisplay/DateDisplay';
18
18
  // Molecules - Composed components
19
+ export { Breadcrumbs } from './components/molecules/Breadcrumbs/Breadcrumbs';
19
20
  export { default as CalendarInput } from './components/molecules/Calendar/CalendarInput';
20
21
  export { default as TimePicker } from './components/molecules/Calendar/TimePicker';
22
+ export * from './components/molecules/DetailsInfo';
21
23
  export { default as FeatureRow } from './components/molecules/FeatureRow/FeatureRow';
22
24
  export { default as FromTo } from './components/molecules/FromTo/FromTo';
23
25
  export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
@@ -28,6 +30,7 @@ export { default as SectionTitle } from './components/molecules/SectionTitle/Sec
28
30
  export { default as ServiceSelector } from './components/molecules/ServiceSelector/ServiceSelector';
29
31
  export { default as Stepper } from './components/molecules/Stepper/Stepper';
30
32
  export { default as TextWithIcon } from './components/molecules/TextWithIcon/TextWithIcon';
33
+ export { default as TimelineItem } from './components/molecules/TimelineItem/TimelineItem';
31
34
  // Organisms - Complex components
32
35
  export { Illustration } from './components/atoms/Illustration/Illustration';
33
36
  export { default as TableServiceItem } from './components/molecules/TableServiceItem';
@@ -41,7 +44,9 @@ export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSe
41
44
  export { QuoteHeader } from './components/organisms/QuoteHeader/QuoteHeader';
42
45
  export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
43
46
  export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
47
+ export * from './components/organisms/TabCancellationPolicy';
44
48
  export * from './components/organisms/Table';
49
+ export { Timeline } from './components/organisms/Timeline/Timeline';
45
50
  export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
46
51
  export { default as TransferLine } from './components/organisms/TransferLine/TransferLine';
47
52
  // Spinner Variants
@@ -1,5 +1,6 @@
1
1
  export declare enum ActionDropdownType {
2
2
  ADD_ITEM = "add_item",
3
3
  SEND_VIA_MAIL = "send_via_mail",
4
+ CANCEL_SERVICES = "cancel_services",
4
5
  DELETE_QUOTE = "delete_quote"
5
6
  }
@@ -2,5 +2,6 @@ export var ActionDropdownType;
2
2
  (function (ActionDropdownType) {
3
3
  ActionDropdownType["ADD_ITEM"] = "add_item";
4
4
  ActionDropdownType["SEND_VIA_MAIL"] = "send_via_mail";
5
+ ActionDropdownType["CANCEL_SERVICES"] = "cancel_services";
5
6
  ActionDropdownType["DELETE_QUOTE"] = "delete_quote";
6
7
  })(ActionDropdownType || (ActionDropdownType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mautourco-components",
3
- "version": "0.2.15",
3
+ "version": "0.2.17",
4
4
  "private": false,
5
5
  "description": "Bibliothèque de composants Motorco pour le redesign",
6
6
  "main": "dist/index.js",
@@ -33,11 +33,15 @@ const BusIcon: React.FC<BusIconProps> = ({ size = 'md', className = '', color })
33
33
  const classes = `${sizeClasses} ${colorClass} ${className}`;
34
34
 
35
35
  return (
36
- <svg className={classes} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
36
+ <svg
37
+ className={classes}
38
+ viewBox="0 0 16 16"
39
+ fill="none"
40
+ xmlns="http://www.w3.org/2000/svg">
37
41
  <g clip-path="url(#clip0_7033_40084)">
38
42
  <path
39
43
  d="M12.5821 8.08301H3.41512V11.333C3.41512 11.6552 3.67694 11.917 3.99911 11.917H11.9991C12.3211 11.9168 12.5821 11.6551 12.5821 11.333V8.08301ZM5.33895 9.25L5.41512 9.25391C5.79348 9.29216 6.08895 9.61156 6.08895 10C6.08895 10.3884 5.79348 10.7078 5.41512 10.7461L5.33895 10.75H5.33211C4.9179 10.75 4.58211 10.4142 4.58211 10C4.58211 9.58579 4.9179 9.25 5.33211 9.25H5.33895ZM10.672 9.25C11.0862 9.25 11.422 9.58579 11.422 10C11.422 10.4142 11.0862 10.75 10.672 10.75H10.6651C10.2511 10.7498 9.91512 10.4141 9.91512 10C9.91512 9.5859 10.2511 9.25018 10.6651 9.25H10.672ZM3.99911 2.75C3.67705 2.75 3.4153 3.01099 3.41512 3.33301V6.58301H12.5821V3.33301C12.5819 3.0111 12.321 2.75018 11.9991 2.75H3.99911ZM9.33211 3.25C9.74633 3.25 10.0821 3.58579 10.0821 4C10.0821 4.41421 9.74633 4.75 9.33211 4.75H6.66512C6.25106 4.74982 5.91512 4.41411 5.91512 4C5.91512 3.58589 6.25106 3.25018 6.66512 3.25H9.33211ZM14.0821 11.333C14.0821 12.2187 13.5284 12.973 12.7491 13.2744V14C12.7491 14.4141 12.4132 14.7498 11.9991 14.75C11.5849 14.75 11.2491 14.4142 11.2491 14V13.417H4.74911V14C4.74911 14.4141 4.41317 14.7498 3.99911 14.75C3.58489 14.75 3.24911 14.4142 3.24911 14V13.2754C2.46934 12.9742 1.91512 12.219 1.91512 11.333V5.21387L1.66708 5.33789C1.29669 5.52273 0.846371 5.37226 0.661216 5.00195C0.476074 4.63149 0.626713 4.18131 0.997153 3.99609L1.91512 3.53613V3.33301C1.9153 2.18256 2.84862 1.25 3.99911 1.25H11.9991C13.1494 1.25018 14.0819 2.18267 14.0821 3.33301V3.53613L15.0011 3.99609C15.3714 4.18142 15.5212 4.63156 15.336 5.00195C15.1508 5.37235 14.7006 5.52293 14.3302 5.33789L14.0821 5.21289V11.333Z"
40
- fill="#303642"
44
+ fill="currentColor"
41
45
  />
42
46
  </g>
43
47
  <defs>
@@ -16,7 +16,8 @@
16
16
  border: none;
17
17
  border-radius: calc(var(--tab-border-radius-default, 0) / 16);
18
18
  border-bottom-style: solid;
19
- border-bottom-width: calc(var(--tab-border-width-default, 4rem) / 16);
19
+ /* border-bottom-width: calc(var(--tab-border-width-default, 4rem) / 16); */
20
+ border-bottom-width: 4px;
20
21
  border-bottom-color: var(--tab-color-normal-default-border, #e5e5e5);
21
22
  background-color: var(--tab-color-normal-default-background, #ffffff);
22
23
  color: var(--color-text-state-default, #737373);
@@ -32,8 +33,7 @@
32
33
 
33
34
  .tab:focus-visible {
34
35
  outline: none;
35
- box-shadow: 0 0 0 calc(2rem / 16)
36
- var(--tab-color-normal-focused-border, #e5e5e5);
36
+ box-shadow: 0 0 0 calc(2rem / 16) var(--tab-color-normal-focused-border, #e5e5e5);
37
37
  background-color: var(--tab-color-normal-focused-background, #ffffff);
38
38
  }
39
39
 
@@ -67,8 +67,7 @@
67
67
  }
68
68
 
69
69
  .tab--active:focus-visible {
70
- box-shadow: 0 0 0 calc(2rem / 16)
71
- var(--tab-color-active-focused-border, #042c2f);
70
+ box-shadow: 0 0 0 calc(2rem / 16) var(--tab-color-active-focused-border, #042c2f);
72
71
  background-color: var(--tab-color-active-focused-background, #ffffff);
73
72
  }
74
73
 
@@ -141,7 +140,6 @@
141
140
  --tab-width: var(--tab-outline-sm-focus-width, 121rem);
142
141
  --tab-height: var(--tab-outline-sm-focus-height, 59rem);
143
142
  border-radius: calc(var(--border-radius-rounded-sm, 4rem) / 16);
144
- border-top: calc(var(--border-border, 1rem) / 16)
145
- solid var(--color-atoll-green-800, #0f7173);
143
+ border-top: calc(var(--border-border, 1rem) / 16) solid
144
+ var(--color-atoll-green-800, #0f7173);
146
145
  }
147
-
@@ -37,7 +37,7 @@ interface HeadingProps extends BaseProps {
37
37
  as?: keyof React.JSX.IntrinsicElements;
38
38
  }
39
39
 
40
- interface TextProps extends BaseProps {
40
+ export interface TextProps extends BaseProps {
41
41
  size?: BodySizeInput;
42
42
  as?: keyof React.JSX.IntrinsicElements;
43
43
  }
@@ -92,11 +92,18 @@ const mapLeadingToToken = (
92
92
  return `leading-${leading}` as 'leading-4' | 'leading-5' | 'leading-6' | 'leading-7';
93
93
  };
94
94
 
95
- const getBodyClass = (size: BodyTokenSize, leading?: Leading): { className: string; lineHeightHandled: boolean } => {
95
+ const getBodyClass = (
96
+ size: BodyTokenSize,
97
+ leading?: Leading
98
+ ): { className: string; lineHeightHandled: boolean } => {
96
99
  const availableLeadings = tokenBodyLeadings[size];
97
- const desiredLeading = leading ? mapLeadingToToken(leading) : mapLeadingToToken(defaultBodyLeading[size]);
100
+ const desiredLeading = leading
101
+ ? mapLeadingToToken(leading)
102
+ : mapLeadingToToken(defaultBodyLeading[size]);
98
103
 
99
- const resolvedLeading = availableLeadings.includes(desiredLeading) ? desiredLeading : availableLeadings[0];
104
+ const resolvedLeading = availableLeadings.includes(desiredLeading)
105
+ ? desiredLeading
106
+ : availableLeadings[0];
100
107
 
101
108
  return {
102
109
  className: `body-${size}-${resolvedLeading}`,
@@ -130,7 +137,12 @@ export const Heading: React.FC<HeadingProps> = ({
130
137
  const baseClass = headingTokenClass[level] ?? headingTokenClass[2];
131
138
  const variantClass = buildVariantClass(baseClass, variant);
132
139
 
133
- const classes = [baseClass, variantClass, leading ? leadingFallback[leading] : '', className]
140
+ const classes = [
141
+ baseClass,
142
+ variantClass,
143
+ leading ? leadingFallback[leading] : '',
144
+ className,
145
+ ]
134
146
  .filter(Boolean)
135
147
  .join(' ');
136
148
 
@@ -155,10 +167,18 @@ export const Text: React.FC<TextProps> = ({
155
167
  }) => {
156
168
  const Tag = as || 'p';
157
169
  const normalizedSize = bodySizeAlias[size];
158
- const { className: baseClass, lineHeightHandled } = getBodyClass(normalizedSize, leading);
170
+ const { className: baseClass, lineHeightHandled } = getBodyClass(
171
+ normalizedSize,
172
+ leading
173
+ );
159
174
  const variantClass = buildVariantClass(baseClass, variant);
160
175
 
161
- const classes = [baseClass, variantClass, leading && !lineHeightHandled ? leadingFallback[leading] : '', className]
176
+ const classes = [
177
+ baseClass,
178
+ variantClass,
179
+ leading && !lineHeightHandled ? leadingFallback[leading] : '',
180
+ className,
181
+ ]
162
182
  .filter(Boolean)
163
183
  .join(' ');
164
184
 
@@ -7,6 +7,9 @@ import './ActionDropdown.css';
7
7
  export interface ActionDropdownItem {
8
8
  /** Label for the action dropdown item */
9
9
  label: string;
10
+ /** Disable the action dropdown item */
11
+ disabled?: boolean;
12
+
10
13
  /** Callback function to be called when the action dropdown item is clicked */
11
14
  onClick?: () => void;
12
15
  }
@@ -14,6 +17,8 @@ export interface ActionDropdownItem {
14
17
  export interface ActionDropdownProps {
15
18
  /** Data for the action dropdown */
16
19
  data: ActionDropdownItem[];
20
+ /** Trigger element */
21
+ children?: React.ReactNode;
17
22
  }
18
23
 
19
24
  /**
@@ -24,17 +29,23 @@ export interface ActionDropdownProps {
24
29
  * @param ActionDropdownProps
25
30
  * @returns
26
31
  */
27
- export const ActionDropdown: React.FC<ActionDropdownProps> = ({ data }) => {
32
+ export const ActionDropdown: React.FC<ActionDropdownProps> = ({ data, children }) => {
28
33
  const [open, setOpen] = useState(false);
29
34
 
30
35
  return (
31
36
  <Popover open={open} onOpenChange={setOpen}>
32
37
  <PopoverTrigger>
33
- <button className="action-dropdown-trigger">
34
- <Icon name="more-vertical" />
35
- </button>
38
+ {children ?? (
39
+ <button className="action-dropdown-trigger">
40
+ <Icon name="more-vertical" />
41
+ </button>
42
+ )}
36
43
  </PopoverTrigger>
37
- <PopoverContent className="action-dropdown" align="end">
44
+ <PopoverContent
45
+ className="action-dropdown"
46
+ align="end"
47
+ side="bottom"
48
+ avoidCollisions={false}>
38
49
  {data.map((item, index) => (
39
50
  <button
40
51
  key={`ad-${index}`}
@@ -0,0 +1,10 @@
1
+ .breadcrumbs {
2
+ @apply flex items-center gap-x-2;
3
+ li {
4
+ @apply flex items-center gap-x-2;
5
+ }
6
+ li:not(:first-child) {
7
+ @apply pl-2;
8
+ border-left: solid 1px var(--divider-color-default);
9
+ }
10
+ }
@@ -0,0 +1,47 @@
1
+ import { cn } from '@/src/lib/utils';
2
+ import React from 'react';
3
+ import Icon from '../../atoms/Icon/Icon';
4
+ import { Text } from '../../atoms/Typography/Typography';
5
+ import './Breadcrumbs.css';
6
+
7
+ export interface BreadcrumbsItem {
8
+ label: string;
9
+ onClick: () => void;
10
+ }
11
+
12
+ export interface BreadcrumbsProps {
13
+ items: BreadcrumbsItem[];
14
+ onBack?: () => void;
15
+ }
16
+
17
+ export const Breadcrumbs: React.FC<BreadcrumbsProps> = (props) => {
18
+ const { items, onBack } = props;
19
+
20
+ return (
21
+ <ol className="breadcrumbs">
22
+ <Text
23
+ variant="medium"
24
+ size="sm"
25
+ leading="4"
26
+ as="li"
27
+ className="cursor-pointer"
28
+ onClick={onBack}>
29
+ <Icon name="chevron-left" size="sm" />
30
+ Back
31
+ </Text>
32
+ {items.map((item, index) => (
33
+ <Text
34
+ key={`bc-${index}`}
35
+ as="li"
36
+ variant="medium"
37
+ size="sm"
38
+ onClick={item.onClick}
39
+ color={index === items.length - 1 ? 'accent' : 'default'}
40
+ leading="4"
41
+ className={cn(index < items.length - 1 && 'cursor-pointer')}>
42
+ {item.label}
43
+ </Text>
44
+ ))}
45
+ </ol>
46
+ );
47
+ };
@@ -1,24 +1,38 @@
1
1
  import { format, isValid } from 'date-fns';
2
2
  import React, { Fragment, useMemo } from 'react';
3
3
  import Icon from '../../atoms/Icon/Icon';
4
- import { Text } from '../../atoms/Typography/Typography';
4
+ import { Text, TextProps } from '../../atoms/Typography/Typography';
5
5
 
6
6
  export interface DateDisplayProps {
7
7
  /** Dates to display */
8
- date: string[] | Date[];
8
+ dates: string[] | Date[];
9
+
10
+ /** Size of the arrow icon */
11
+ arrowSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
12
+
13
+ /** Size of the calendar icon */
14
+ calendarSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
15
+
16
+ /** Size of the text */
17
+ textSize?: TextProps['size'];
9
18
  }
10
19
 
11
20
  /**
12
21
  * A component for displaying a list of dates in a readable format.
13
22
  *
14
23
  * @example
15
- * <DateDisplay date={['2025-01-01', '2025-01-02']} />
24
+ * <DateDisplay dates={['2025-01-01', '2025-01-02']} />
16
25
  * @param DateDisplayProps
17
26
  * @returns
18
27
  */
19
- export const DateDisplay: React.FC<DateDisplayProps> = ({ date }) => {
28
+ export const DateDisplay: React.FC<DateDisplayProps> = ({
29
+ dates,
30
+ arrowSize = 'sm',
31
+ calendarSize = 'sm',
32
+ textSize = 'sm',
33
+ }) => {
20
34
  const formattedDate = useMemo(() => {
21
- return date.map((d) => {
35
+ return dates.map((d) => {
22
36
  const dateObj = new Date(d);
23
37
  // Check if the date is valid then format it to dd/MM/yyyy format
24
38
  if (isValid(dateObj)) {
@@ -27,19 +41,21 @@ export const DateDisplay: React.FC<DateDisplayProps> = ({ date }) => {
27
41
  // If the date is not valid, return the original date
28
42
  return d;
29
43
  }) as string[];
30
- }, [date]);
44
+ }, [dates]);
31
45
 
32
46
  return (
33
47
  <div className="flex items-center gap-x-3">
34
48
  {formattedDate.map((date, index) => (
35
49
  <Fragment key={`dd-${index}`}>
36
50
  <span className="flex items-center gap-x-2">
37
- <Icon name="calendar2" size="sm" />
38
- <Text variant="medium" size="sm">
51
+ <Icon name="calendar2" size={calendarSize} />
52
+ <Text variant="medium" size={textSize}>
39
53
  {date}
40
54
  </Text>
41
55
  </span>
42
- {formattedDate.length > 1 && index === 0 && <Icon name="arrow-right-outline" size="sm" />}
56
+ {formattedDate.length > 1 && index === 0 && (
57
+ <Icon name="arrow-right-outline" size={arrowSize} />
58
+ )}
43
59
  </Fragment>
44
60
  ))}
45
61
  </div>
@@ -0,0 +1,55 @@
1
+ import { ActionDropdownType } from '@/src/types/table';
2
+ import React from 'react';
3
+ import Button from '../../atoms/Button/Button';
4
+ import { ActionDropdown, ActionDropdownItem } from '../ActionDropdown/ActionDropdown';
5
+
6
+ export interface DetailsActionProps {
7
+ /** Data for the action dropdown */
8
+ data?: ActionDropdownItem[];
9
+ onAction?: (action: ActionDropdownType) => void;
10
+ }
11
+
12
+ export const DetailsAction: React.FC<DetailsActionProps> = (props) => {
13
+ const { data = [], onAction } = props;
14
+ return (
15
+ <ActionDropdown
16
+ data={
17
+ data.length > 0
18
+ ? data
19
+ : [
20
+ {
21
+ label: 'Add item',
22
+ onClick: () => {
23
+ onAction?.(ActionDropdownType.ADD_ITEM);
24
+ },
25
+ },
26
+ {
27
+ label: 'Cancel services',
28
+ onClick: () => {
29
+ onAction?.(ActionDropdownType.CANCEL_SERVICES);
30
+ },
31
+ },
32
+ {
33
+ label: 'Send via mail',
34
+ onClick: () => {
35
+ onAction?.(ActionDropdownType.SEND_VIA_MAIL);
36
+ },
37
+ },
38
+ {
39
+ label: 'Delete quote',
40
+ onClick: () => {
41
+ onAction?.(ActionDropdownType.DELETE_QUOTE);
42
+ },
43
+ },
44
+ ]
45
+ }>
46
+ <Button
47
+ variant="outline-secondary"
48
+ trailingIcon="chevron-down"
49
+ size="sm"
50
+ className="w-[144px] !justify-between !px-[14px]">
51
+ More options
52
+ </Button>
53
+ </ActionDropdown>
54
+ );
55
+ };
@@ -0,0 +1,21 @@
1
+ .details-agency {
2
+ @apply grid gap-y-4;
3
+
4
+ width: 290px;
5
+ background-color: var(--card-color-background-default);
6
+ border-radius: var(--card-border-radius-default);
7
+ padding: var(--card-spacing-chill-padding-y) var(--card-spacing-chill-padding-x);
8
+ border: solid 1px var(--card-color-border-default);
9
+ }
10
+
11
+ .details-agency__content {
12
+ @apply grid gap-y-2;
13
+ }
14
+
15
+ .details-agency__content-item {
16
+ @apply flex items-center;
17
+ }
18
+
19
+ .details-agency__content-item-name {
20
+ flex: 0 0 150px;
21
+ }