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
@@ -2093,7 +2093,8 @@
2093
2093
  border: none;
2094
2094
  border-radius: calc(var(--tab-border-radius-default, 0) / 16);
2095
2095
  border-bottom-style: solid;
2096
- border-bottom-width: calc(var(--tab-border-width-default, 4rem) / 16);
2096
+ /* border-bottom-width: calc(var(--tab-border-width-default, 4rem) / 16); */
2097
+ border-bottom-width: 4px;
2097
2098
  border-bottom-color: var(--tab-color-normal-default-border, #e5e5e5);
2098
2099
  background-color: var(--tab-color-normal-default-background, #ffffff);
2099
2100
  color: var(--color-text-state-default, #737373);
@@ -2109,8 +2110,7 @@
2109
2110
 
2110
2111
  .tab:focus-visible {
2111
2112
  outline: none;
2112
- box-shadow: 0 0 0 calc(2rem / 16)
2113
- var(--tab-color-normal-focused-border, #e5e5e5);
2113
+ box-shadow: 0 0 0 calc(2rem / 16) var(--tab-color-normal-focused-border, #e5e5e5);
2114
2114
  background-color: var(--tab-color-normal-focused-background, #ffffff);
2115
2115
  }
2116
2116
 
@@ -2144,8 +2144,7 @@
2144
2144
  }
2145
2145
 
2146
2146
  .tab--active:focus-visible {
2147
- box-shadow: 0 0 0 calc(2rem / 16)
2148
- var(--tab-color-active-focused-border, #042c2f);
2147
+ box-shadow: 0 0 0 calc(2rem / 16) var(--tab-color-active-focused-border, #042c2f);
2149
2148
  background-color: var(--tab-color-active-focused-background, #ffffff);
2150
2149
  }
2151
2150
 
@@ -2218,7 +2217,6 @@
2218
2217
  --tab-width: var(--tab-outline-sm-focus-width, 121rem);
2219
2218
  --tab-height: var(--tab-outline-sm-focus-height, 59rem);
2220
2219
  border-radius: calc(var(--border-radius-rounded-sm, 4rem) / 16);
2221
- border-top: calc(var(--border-border, 1rem) / 16)
2222
- solid var(--color-atoll-green-800, #0f7173);
2220
+ border-top: calc(var(--border-border, 1rem) / 16) solid
2221
+ var(--color-atoll-green-800, #0f7173);
2223
2222
  }
2224
-
@@ -19,7 +19,7 @@ interface HeadingProps extends BaseProps {
19
19
  level?: HeadingLevel;
20
20
  as?: keyof React.JSX.IntrinsicElements;
21
21
  }
22
- interface TextProps extends BaseProps {
22
+ export interface TextProps extends BaseProps {
23
23
  size?: BodySizeInput;
24
24
  as?: keyof React.JSX.IntrinsicElements;
25
25
  }
@@ -52,8 +52,12 @@ var mapLeadingToToken = function (leading) {
52
52
  };
53
53
  var getBodyClass = function (size, leading) {
54
54
  var availableLeadings = tokenBodyLeadings[size];
55
- var desiredLeading = leading ? mapLeadingToToken(leading) : mapLeadingToToken(defaultBodyLeading[size]);
56
- var resolvedLeading = availableLeadings.includes(desiredLeading) ? desiredLeading : availableLeadings[0];
55
+ var desiredLeading = leading
56
+ ? mapLeadingToToken(leading)
57
+ : mapLeadingToToken(defaultBodyLeading[size]);
58
+ var resolvedLeading = availableLeadings.includes(desiredLeading)
59
+ ? desiredLeading
60
+ : availableLeadings[0];
57
61
  return {
58
62
  className: "body-".concat(size, "-").concat(resolvedLeading),
59
63
  lineHeightHandled: desiredLeading === resolvedLeading,
@@ -77,7 +81,12 @@ export var Heading = function (_a) {
77
81
  var Tag = as || "h".concat(level);
78
82
  var baseClass = (_b = headingTokenClass[level]) !== null && _b !== void 0 ? _b : headingTokenClass[2];
79
83
  var variantClass = buildVariantClass(baseClass, variant);
80
- var classes = [baseClass, variantClass, leading ? leadingFallback[leading] : '', className]
84
+ var classes = [
85
+ baseClass,
86
+ variantClass,
87
+ leading ? leadingFallback[leading] : '',
88
+ className,
89
+ ]
81
90
  .filter(Boolean)
82
91
  .join(' ');
83
92
  var colorStyle = getColorStyle(color);
@@ -89,7 +98,12 @@ export var Text = function (_a) {
89
98
  var normalizedSize = bodySizeAlias[size];
90
99
  var _e = getBodyClass(normalizedSize, leading), baseClass = _e.className, lineHeightHandled = _e.lineHeightHandled;
91
100
  var variantClass = buildVariantClass(baseClass, variant);
92
- var classes = [baseClass, variantClass, leading && !lineHeightHandled ? leadingFallback[leading] : '', className]
101
+ var classes = [
102
+ baseClass,
103
+ variantClass,
104
+ leading && !lineHeightHandled ? leadingFallback[leading] : '',
105
+ className,
106
+ ]
93
107
  .filter(Boolean)
94
108
  .join(' ');
95
109
  var colorStyle = getColorStyle(color);
@@ -3,12 +3,16 @@ import './ActionDropdown.css';
3
3
  export interface ActionDropdownItem {
4
4
  /** Label for the action dropdown item */
5
5
  label: string;
6
+ /** Disable the action dropdown item */
7
+ disabled?: boolean;
6
8
  /** Callback function to be called when the action dropdown item is clicked */
7
9
  onClick?: () => void;
8
10
  }
9
11
  export interface ActionDropdownProps {
10
12
  /** Data for the action dropdown */
11
13
  data: ActionDropdownItem[];
14
+ /** Trigger element */
15
+ children?: React.ReactNode;
12
16
  }
13
17
  /**
14
18
  * A dropdown component that displays a list of actions triggered by a more icon button. Uses a Popover for the dropdown menu.
@@ -24,9 +24,9 @@ import './ActionDropdown.css';
24
24
  * @returns
25
25
  */
26
26
  export var ActionDropdown = function (_a) {
27
- var data = _a.data;
27
+ var data = _a.data, children = _a.children;
28
28
  var _b = useState(false), open = _b[0], setOpen = _b[1];
29
- return (_jsxs(Popover, __assign({ open: open, onOpenChange: setOpen }, { children: [_jsx(PopoverTrigger, { children: _jsx("button", __assign({ className: "action-dropdown-trigger" }, { children: _jsx(Icon, { name: "more-vertical" }) })) }), _jsx(PopoverContent, __assign({ className: "action-dropdown", align: "end" }, { children: data.map(function (item, index) { return (_jsx("button", __assign({ onClick: function () {
29
+ return (_jsxs(Popover, __assign({ open: open, onOpenChange: setOpen }, { children: [_jsx(PopoverTrigger, { children: children !== null && children !== void 0 ? children : (_jsx("button", __assign({ className: "action-dropdown-trigger" }, { children: _jsx(Icon, { name: "more-vertical" }) }))) }), _jsx(PopoverContent, __assign({ className: "action-dropdown", align: "end", side: "bottom", avoidCollisions: false }, { children: data.map(function (item, index) { return (_jsx("button", __assign({ onClick: function () {
30
30
  var _a;
31
31
  setOpen(false);
32
32
  (_a = item.onClick) === null || _a === void 0 ? void 0 : _a.call(item);
@@ -6,6 +6,6 @@ export interface BreadcrumbsItem {
6
6
  }
7
7
  export interface BreadcrumbsProps {
8
8
  items: BreadcrumbsItem[];
9
- onBack: () => void;
9
+ onBack?: () => void;
10
10
  }
11
11
  export declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
@@ -1,13 +1,20 @@
1
1
  import React from 'react';
2
+ import { TextProps } from '../../atoms/Typography/Typography';
2
3
  export interface DateDisplayProps {
3
4
  /** Dates to display */
4
- date: string[] | Date[];
5
+ dates: string[] | Date[];
6
+ /** Size of the arrow icon */
7
+ arrowSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
8
+ /** Size of the calendar icon */
9
+ calendarSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
10
+ /** Size of the text */
11
+ textSize?: TextProps['size'];
5
12
  }
6
13
  /**
7
14
  * A component for displaying a list of dates in a readable format.
8
15
  *
9
16
  * @example
10
- * <DateDisplay date={['2025-01-01', '2025-01-02']} />
17
+ * <DateDisplay dates={['2025-01-01', '2025-01-02']} />
11
18
  * @param DateDisplayProps
12
19
  * @returns
13
20
  */
@@ -18,14 +18,14 @@ import { Text } from '../../atoms/Typography/Typography';
18
18
  * A component for displaying a list of dates in a readable format.
19
19
  *
20
20
  * @example
21
- * <DateDisplay date={['2025-01-01', '2025-01-02']} />
21
+ * <DateDisplay dates={['2025-01-01', '2025-01-02']} />
22
22
  * @param DateDisplayProps
23
23
  * @returns
24
24
  */
25
25
  export var DateDisplay = function (_a) {
26
- var date = _a.date;
26
+ var dates = _a.dates, _b = _a.arrowSize, arrowSize = _b === void 0 ? 'sm' : _b, _c = _a.calendarSize, calendarSize = _c === void 0 ? 'sm' : _c, _d = _a.textSize, textSize = _d === void 0 ? 'sm' : _d;
27
27
  var formattedDate = useMemo(function () {
28
- return date.map(function (d) {
28
+ return dates.map(function (d) {
29
29
  var dateObj = new Date(d);
30
30
  // Check if the date is valid then format it to dd/MM/yyyy format
31
31
  if (isValid(dateObj)) {
@@ -34,6 +34,6 @@ export var DateDisplay = function (_a) {
34
34
  // If the date is not valid, return the original date
35
35
  return d;
36
36
  });
37
- }, [date]);
38
- return (_jsx("div", __assign({ className: "flex items-center gap-x-3" }, { children: formattedDate.map(function (date, index) { return (_jsxs(Fragment, { children: [_jsxs("span", __assign({ className: "flex items-center gap-x-2" }, { children: [_jsx(Icon, { name: "calendar2", size: "sm" }), _jsx(Text, __assign({ variant: "medium", size: "sm" }, { children: date }))] })), formattedDate.length > 1 && index === 0 && _jsx(Icon, { name: "arrow-right-outline", size: "sm" })] }, "dd-".concat(index))); }) })));
37
+ }, [dates]);
38
+ return (_jsx("div", __assign({ className: "flex items-center gap-x-3" }, { children: formattedDate.map(function (date, index) { return (_jsxs(Fragment, { children: [_jsxs("span", __assign({ className: "flex items-center gap-x-2" }, { children: [_jsx(Icon, { name: "calendar2", size: calendarSize }), _jsx(Text, __assign({ variant: "medium", size: textSize }, { children: date }))] })), formattedDate.length > 1 && index === 0 && (_jsx(Icon, { name: "arrow-right-outline", size: arrowSize }))] }, "dd-".concat(index))); }) })));
39
39
  };
@@ -0,0 +1,9 @@
1
+ import { ActionDropdownType } from '@/src/types/table';
2
+ import React from 'react';
3
+ import { ActionDropdownItem } from '../ActionDropdown/ActionDropdown';
4
+ export interface DetailsActionProps {
5
+ /** Data for the action dropdown */
6
+ data?: ActionDropdownItem[];
7
+ onAction?: (action: ActionDropdownType) => void;
8
+ }
9
+ export declare const DetailsAction: React.FC<DetailsActionProps>;
@@ -0,0 +1,46 @@
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 } from "react/jsx-runtime";
13
+ import { ActionDropdownType } from '@/src/types/table';
14
+ import Button from '../../atoms/Button/Button';
15
+ import { ActionDropdown } from '../ActionDropdown/ActionDropdown';
16
+ export var DetailsAction = function (props) {
17
+ var _a = props.data, data = _a === void 0 ? [] : _a, onAction = props.onAction;
18
+ return (_jsx(ActionDropdown, __assign({ data: data.length > 0
19
+ ? data
20
+ : [
21
+ {
22
+ label: 'Add item',
23
+ onClick: function () {
24
+ onAction === null || onAction === void 0 ? void 0 : onAction(ActionDropdownType.ADD_ITEM);
25
+ },
26
+ },
27
+ {
28
+ label: 'Cancel services',
29
+ onClick: function () {
30
+ onAction === null || onAction === void 0 ? void 0 : onAction(ActionDropdownType.CANCEL_SERVICES);
31
+ },
32
+ },
33
+ {
34
+ label: 'Send via mail',
35
+ onClick: function () {
36
+ onAction === null || onAction === void 0 ? void 0 : onAction(ActionDropdownType.SEND_VIA_MAIL);
37
+ },
38
+ },
39
+ {
40
+ label: 'Delete quote',
41
+ onClick: function () {
42
+ onAction === null || onAction === void 0 ? void 0 : onAction(ActionDropdownType.DELETE_QUOTE);
43
+ },
44
+ },
45
+ ] }, { children: _jsx(Button, __assign({ variant: "outline-secondary", trailingIcon: "chevron-down", size: "sm", className: "w-[144px] !justify-between !px-[14px]" }, { children: "More options" })) })));
46
+ };