mautourco-components 0.2.16 → 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 (101) hide show
  1. package/dist/components/atoms/Tab/Tab.css +6 -8
  2. package/dist/components/atoms/Typography/Typography.d.ts +1 -1
  3. package/dist/components/atoms/Typography/Typography.js +18 -4
  4. package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +4 -0
  5. package/dist/components/molecules/ActionDropdown/ActionDropdown.js +2 -2
  6. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  7. package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +9 -2
  8. package/dist/components/molecules/DateDisplay/DateDisplay.js +5 -5
  9. package/dist/components/molecules/DetailsInfo/DetailsAction.d.ts +9 -0
  10. package/dist/components/molecules/DetailsInfo/DetailsAction.js +46 -0
  11. package/dist/components/molecules/DetailsInfo/DetailsAgency.css +2101 -0
  12. package/dist/components/molecules/DetailsInfo/DetailsAgency.d.ts +9 -0
  13. package/dist/components/molecules/DetailsInfo/DetailsAgency.js +19 -0
  14. package/dist/components/molecules/DetailsInfo/DetailsFile.d.ts +8 -0
  15. package/dist/components/molecules/DetailsInfo/DetailsFile.js +18 -0
  16. package/dist/components/molecules/DetailsInfo/DetailsInfo.d.ts +12 -0
  17. package/dist/components/molecules/DetailsInfo/DetailsInfo.js +22 -0
  18. package/dist/components/molecules/DetailsInfo/index.d.ts +4 -0
  19. package/dist/components/molecules/DetailsInfo/index.js +1 -0
  20. package/dist/components/molecules/ServiceTitle/ServiceTitle.css +2094 -0
  21. package/dist/components/molecules/ServiceTitle/ServiceTitle.d.ts +8 -0
  22. package/dist/components/molecules/ServiceTitle/ServiceTitle.js +18 -0
  23. package/dist/components/molecules/TimelineItem/ServiceAccommodation.js +1 -1
  24. package/dist/components/molecules/TimelineItem/ServiceExcursion.js +1 -1
  25. package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.d.ts +12 -0
  26. package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.js +19 -0
  27. package/dist/components/organisms/TabCancellationPolicy/CancellationBody.d.ts +11 -0
  28. package/dist/components/organisms/TabCancellationPolicy/CancellationBody.js +21 -0
  29. package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.d.ts +8 -0
  30. package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.js +19 -0
  31. package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.d.ts +11 -0
  32. package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.js +21 -0
  33. package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.d.ts +7 -0
  34. package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.js +19 -0
  35. package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.d.ts +6 -0
  36. package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +27 -0
  37. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.css +2082 -0
  38. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.d.ts +12 -0
  39. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.js +26 -0
  40. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.d.ts +5 -0
  41. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.js +7 -0
  42. package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +2094 -0
  43. package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.d.ts +13 -0
  44. package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.js +21 -0
  45. package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.d.ts +5 -0
  46. package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.js +17 -0
  47. package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.d.ts +4 -0
  48. package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.js +44 -0
  49. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.d.ts +13 -0
  50. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.js +23 -0
  51. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.css +2134 -0
  52. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.d.ts +13 -0
  53. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.js +19 -0
  54. package/dist/components/organisms/TabCancellationPolicy/index.d.ts +6 -0
  55. package/dist/components/organisms/TabCancellationPolicy/index.js +3 -0
  56. package/dist/components/organisms/Table/columns/booking-columns.js +1 -1
  57. package/dist/components/organisms/Table/columns/detail-resume-columns.js +1 -1
  58. package/dist/components/organisms/Table/columns/quotation-columns.js +3 -3
  59. package/dist/components/organisms/Timeline/Timeline.d.ts +1 -0
  60. package/dist/components/organisms/Timeline/Timeline.js +3 -2
  61. package/dist/index.d.ts +4 -0
  62. package/dist/index.js +3 -0
  63. package/dist/types/table/action-dropdown-type.types.d.ts +1 -0
  64. package/dist/types/table/action-dropdown-type.types.js +1 -0
  65. package/package.json +1 -1
  66. package/src/components/atoms/Tab/Tab.css +6 -8
  67. package/src/components/atoms/Typography/Typography.tsx +27 -7
  68. package/src/components/molecules/ActionDropdown/ActionDropdown.tsx +16 -5
  69. package/src/components/molecules/Breadcrumbs/Breadcrumbs.tsx +1 -1
  70. package/src/components/molecules/DateDisplay/DateDisplay.tsx +25 -9
  71. package/src/components/molecules/DetailsInfo/DetailsAction.tsx +55 -0
  72. package/src/components/molecules/DetailsInfo/DetailsAgency.css +21 -0
  73. package/src/components/molecules/DetailsInfo/DetailsAgency.tsx +53 -0
  74. package/src/components/molecules/DetailsInfo/DetailsFile.tsx +27 -0
  75. package/src/components/molecules/DetailsInfo/DetailsInfo.tsx +17 -0
  76. package/src/components/molecules/DetailsInfo/index.ts +4 -0
  77. package/src/components/molecules/ServiceTitle/ServiceTitle.css +13 -0
  78. package/src/components/molecules/ServiceTitle/ServiceTitle.tsx +19 -0
  79. package/src/components/molecules/TimelineItem/ServiceAccommodation.tsx +1 -1
  80. package/src/components/molecules/TimelineItem/ServiceExcursion.tsx +1 -1
  81. package/src/components/organisms/TabCancellationPolicy/CancellationAccom.tsx +41 -0
  82. package/src/components/organisms/TabCancellationPolicy/CancellationBody.tsx +12 -0
  83. package/src/components/organisms/TabCancellationPolicy/CancellationExcursion.tsx +31 -0
  84. package/src/components/organisms/TabCancellationPolicy/CancellationHeader.tsx +11 -0
  85. package/src/components/organisms/TabCancellationPolicy/CancellationTransfer.tsx +29 -0
  86. package/src/components/organisms/TabCancellationPolicy/HeaderAccom.tsx +31 -0
  87. package/src/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.css +3 -0
  88. package/src/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.tsx +48 -0
  89. package/src/components/organisms/TabCancellationPolicy/HeaderExcursion.tsx +18 -0
  90. package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +8 -0
  91. package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.tsx +47 -0
  92. package/src/components/organisms/TabCancellationPolicy/PolicyExcursion.tsx +26 -0
  93. package/src/components/organisms/TabCancellationPolicy/PolicyTransfer.tsx +62 -0
  94. package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicy.tsx +13 -0
  95. package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.css +39 -0
  96. package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.tsx +44 -0
  97. package/src/components/organisms/TabCancellationPolicy/index.ts +7 -0
  98. package/src/components/organisms/Table/columns/booking-columns.tsx +1 -1
  99. package/src/components/organisms/Table/columns/detail-resume-columns.tsx +1 -1
  100. package/src/components/organisms/Table/columns/quotation-columns.tsx +10 -5
  101. package/src/components/organisms/Timeline/Timeline.tsx +4 -2
@@ -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: '',
@@ -10,5 +10,6 @@ export interface TimelineProps {
10
10
  arrival: string;
11
11
  departure: string;
12
12
  services: TimelineServices[];
13
+ className?: string;
13
14
  }
14
15
  export declare const Timeline: React.FC<TimelineProps>;
@@ -10,10 +10,11 @@ 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 { cn } from '@/src/lib/utils';
13
14
  import { Text } from '../../atoms/Typography/Typography';
14
15
  import TextWithIcon from '../../molecules/TextWithIcon/TextWithIcon';
15
16
  import TimelineItem from '../../molecules/TimelineItem/TimelineItem';
16
17
  export var Timeline = function (props) {
17
- var arrival = props.arrival, departure = props.departure, services = props.services;
18
- return (_jsxs("div", __assign({ className: "space-y-10" }, { 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 }))] }))] })));
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 }))] }))] })));
19
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';
@@ -39,6 +41,7 @@ export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSe
39
41
  export { QuoteHeader } from './components/organisms/QuoteHeader/QuoteHeader';
40
42
  export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
41
43
  export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
44
+ export * from './components/organisms/TabCancellationPolicy';
42
45
  export * from './components/organisms/Table';
43
46
  export { Timeline } from './components/organisms/Timeline/Timeline';
44
47
  export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
@@ -70,6 +73,7 @@ export type { RoundTripData, RoundTripProps, RoundTripTransfer, } from './compon
70
73
  export type { SearchBarTransferData, SearchBarTransferProps, TransferMode, } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
71
74
  export type { TopNavigationProps } from './components/organisms/TopNavigation/TopNavigation';
72
75
  export type { TransferLineData, TransferLineProps, TransferType, } from './components/organisms/TransferLine/TransferLine';
76
+ export type { BreadcrumbsItem, BreadcrumbsProps, } from './components/molecules/Breadcrumbs/Breadcrumbs';
73
77
  export type { FromToProps } from './components/molecules/FromTo/FromTo';
74
78
  export type { SectionTitleProps } from './components/molecules/SectionTitle/SectionTitle';
75
79
  export type { DetailsColProps, ItemColProps, RowAccommodationProps, RowExcursionProps, RowTransferProps, } from './components/molecules/TableServiceItem';
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';
@@ -42,6 +44,7 @@ export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSe
42
44
  export { QuoteHeader } from './components/organisms/QuoteHeader/QuoteHeader';
43
45
  export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
44
46
  export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
47
+ export * from './components/organisms/TabCancellationPolicy';
45
48
  export * from './components/organisms/Table';
46
49
  export { Timeline } from './components/organisms/Timeline/Timeline';
47
50
  export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
@@ -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.16",
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",
@@ -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}`}
@@ -11,7 +11,7 @@ export interface BreadcrumbsItem {
11
11
 
12
12
  export interface BreadcrumbsProps {
13
13
  items: BreadcrumbsItem[];
14
- onBack: () => void;
14
+ onBack?: () => void;
15
15
  }
16
16
 
17
17
  export const Breadcrumbs: React.FC<BreadcrumbsProps> = (props) => {
@@ -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
+ }
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import Chip from '../../atoms/Chip/Chip';
3
+ import { Text } from '../../atoms/Typography/Typography';
4
+ import './DetailsAgency.css';
5
+
6
+ export interface DetailsAgencyProps {
7
+ name: string;
8
+ clientType: string;
9
+ isOnRequest: boolean;
10
+ children?: React.ReactNode;
11
+ }
12
+
13
+ export const DetailsAgency: React.FC<DetailsAgencyProps> = (props) => {
14
+ const { name, clientType, isOnRequest, children } = props;
15
+ return (
16
+ <div className="flex flex-col gap-y-6 items-end">
17
+ <img src="/images/mautourco-logo.png" alt="Mautourco Logo" width={220} />
18
+ <div className="details-agency">
19
+ <Text variant="bold" color="accent">
20
+ Documents details:
21
+ </Text>
22
+ <div className="details-agency__content">
23
+ <div className="details-agency__content-item">
24
+ <Text
25
+ variant="bold"
26
+ size="sm"
27
+ leading="4"
28
+ className="details-agency__content-item-name">
29
+ Agency
30
+ </Text>
31
+ <Text size="sm" leading="4">
32
+ {name}
33
+ </Text>
34
+ </div>{' '}
35
+ <div className="details-agency__content-item">
36
+ <Text
37
+ variant="bold"
38
+ size="sm"
39
+ leading="4"
40
+ className="details-agency__content-item-name">
41
+ Client type
42
+ </Text>
43
+ <Text size="sm" leading="4">
44
+ {clientType}
45
+ </Text>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ {isOnRequest && <Chip color="yellow">Waiting for confirmation</Chip>}
50
+ {children}
51
+ </div>
52
+ );
53
+ };
@@ -0,0 +1,27 @@
1
+ import { cn } from '@/src/lib/utils';
2
+ import React from 'react';
3
+ import { Text } from '../../atoms/Typography/Typography';
4
+
5
+ export interface DetailsFileProps {
6
+ number: string;
7
+ name: string;
8
+ label?: string;
9
+ isBig?: boolean;
10
+ }
11
+
12
+ export const DetailsFile: React.FC<DetailsFileProps> = (props) => {
13
+ const { number, name, label = 'File number:', isBig = false } = props;
14
+ return (
15
+ <div className="grid gap-y-2">
16
+ <Text
17
+ variant={isBig ? 'bold' : 'regular'}
18
+ className={cn(isBig && 'text-2xl')}
19
+ color={isBig ? 'brand' : 'default'}>
20
+ {label} {number}
21
+ </Text>
22
+ <Text variant="medium" color="accent">
23
+ {name}
24
+ </Text>
25
+ </div>
26
+ );
27
+ };
@@ -0,0 +1,17 @@
1
+ import { cn } from '@/src/lib/utils';
2
+ import { DetailsAction } from './DetailsAction';
3
+ import { DetailsAgency } from './DetailsAgency';
4
+ import { DetailsFile } from './DetailsFile';
5
+
6
+ export interface DetailsInfoProps {
7
+ children: React.ReactNode;
8
+ className?: string;
9
+ }
10
+
11
+ export default function DetailsInfo(props: DetailsInfoProps) {
12
+ return <div className={cn('details-info', props.className)} {...props} />;
13
+ }
14
+
15
+ DetailsInfo.File = DetailsFile;
16
+ DetailsInfo.Agency = DetailsAgency;
17
+ DetailsInfo.Action = DetailsAction;
@@ -0,0 +1,4 @@
1
+ export type { DetailsActionProps } from './DetailsAction';
2
+ export type { DetailsAgencyProps } from './DetailsAgency';
3
+ export type { DetailsFileProps } from './DetailsFile';
4
+ export * from './DetailsInfo';
@@ -0,0 +1,13 @@
1
+ .service-title {
2
+ @apply relative;
3
+ padding-left: 10px;
4
+ &::before {
5
+ content: '';
6
+ @apply absolute;
7
+ width: 2px;
8
+ left: 0;
9
+ top: 4px;
10
+ bottom: 4px;
11
+ background-color: var(--color-elevation-brand-subtle);
12
+ }
13
+ }
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { Text, TextProps } from '../../atoms/Typography/Typography';
3
+ import './ServiceTitle.css';
4
+
5
+ export interface ServiceTitleProps {
6
+ title: string;
7
+ textSize?: TextProps['size'];
8
+ }
9
+
10
+ export const ServiceTitle: React.FC<ServiceTitleProps> = (props) => {
11
+ const { title, textSize = 'md' } = props;
12
+ return (
13
+ <div className="service-title">
14
+ <Text variant="bold" size={textSize} color="accent">
15
+ {title}
16
+ </Text>
17
+ </div>
18
+ );
19
+ };