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.
- package/dist/components/atoms/Icon/icons/BusIcon.js +1 -1
- package/dist/components/atoms/Tab/Tab.css +6 -8
- package/dist/components/atoms/Typography/Typography.d.ts +1 -1
- package/dist/components/atoms/Typography/Typography.js +18 -4
- package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +4 -0
- package/dist/components/molecules/ActionDropdown/ActionDropdown.js +2 -2
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.css +2097 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +11 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +20 -0
- package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +9 -2
- package/dist/components/molecules/DateDisplay/DateDisplay.js +5 -5
- package/dist/components/molecules/DetailsInfo/DetailsAction.d.ts +9 -0
- package/dist/components/molecules/DetailsInfo/DetailsAction.js +46 -0
- package/dist/components/molecules/DetailsInfo/DetailsAgency.css +2101 -0
- package/dist/components/molecules/DetailsInfo/DetailsAgency.d.ts +9 -0
- package/dist/components/molecules/DetailsInfo/DetailsAgency.js +19 -0
- package/dist/components/molecules/DetailsInfo/DetailsFile.d.ts +8 -0
- package/dist/components/molecules/DetailsInfo/DetailsFile.js +18 -0
- package/dist/components/molecules/DetailsInfo/DetailsInfo.d.ts +12 -0
- package/dist/components/molecules/DetailsInfo/DetailsInfo.js +22 -0
- package/dist/components/molecules/DetailsInfo/index.d.ts +4 -0
- package/dist/components/molecules/DetailsInfo/index.js +1 -0
- package/dist/components/molecules/ServiceTitle/ServiceTitle.css +2094 -0
- package/dist/components/molecules/ServiceTitle/ServiceTitle.d.ts +8 -0
- package/dist/components/molecules/ServiceTitle/ServiceTitle.js +18 -0
- package/dist/components/molecules/TableServiceItem/DetailsCol.d.ts +2 -2
- package/dist/components/molecules/TableServiceItem/DetailsCol.js +3 -2
- package/dist/components/molecules/TextWithIcon/TextWithIcon.js +2 -2
- package/dist/components/molecules/TimelineItem/ServiceAccommodation.d.ts +9 -0
- package/dist/components/molecules/TimelineItem/ServiceAccommodation.js +20 -0
- package/dist/components/molecules/TimelineItem/ServiceExcursion.d.ts +8 -0
- package/dist/components/molecules/TimelineItem/ServiceExcursion.js +20 -0
- package/dist/components/molecules/TimelineItem/ServiceTransfer.d.ts +11 -0
- package/dist/components/molecules/TimelineItem/ServiceTransfer.js +19 -0
- package/dist/components/molecules/TimelineItem/TimelineHeader.css +2166 -0
- package/dist/components/molecules/TimelineItem/TimelineHeader.d.ts +10 -0
- package/dist/components/molecules/TimelineItem/TimelineHeader.js +21 -0
- package/dist/components/molecules/TimelineItem/TimelineItem.css +2084 -0
- package/dist/components/molecules/TimelineItem/TimelineItem.d.ts +12 -0
- package/dist/components/molecules/TimelineItem/TimelineItem.js +23 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.d.ts +12 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.js +19 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationBody.d.ts +11 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationBody.js +21 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.d.ts +8 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.js +19 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.d.ts +11 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.js +21 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.d.ts +7 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.js +19 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.d.ts +6 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +27 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.css +2082 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.d.ts +12 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.js +26 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.d.ts +5 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.js +7 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +2094 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.d.ts +13 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.js +21 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.d.ts +5 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.js +17 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.d.ts +4 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.js +44 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.d.ts +13 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.js +23 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.css +2134 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.d.ts +13 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.js +19 -0
- package/dist/components/organisms/TabCancellationPolicy/index.d.ts +6 -0
- package/dist/components/organisms/TabCancellationPolicy/index.js +3 -0
- package/dist/components/organisms/Table/columns/booking-columns.js +1 -1
- package/dist/components/organisms/Table/columns/detail-resume-columns.js +1 -1
- package/dist/components/organisms/Table/columns/quotation-columns.js +3 -3
- package/dist/components/organisms/Timeline/Timeline.d.ts +15 -0
- package/dist/components/organisms/Timeline/Timeline.js +20 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +5 -0
- package/dist/types/table/action-dropdown-type.types.d.ts +1 -0
- package/dist/types/table/action-dropdown-type.types.js +1 -0
- package/package.json +1 -1
- package/src/components/atoms/Icon/icons/BusIcon.tsx +6 -2
- package/src/components/atoms/Tab/Tab.css +6 -8
- package/src/components/atoms/Typography/Typography.tsx +27 -7
- package/src/components/molecules/ActionDropdown/ActionDropdown.tsx +16 -5
- package/src/components/molecules/Breadcrumbs/Breadcrumbs.css +10 -0
- package/src/components/molecules/Breadcrumbs/Breadcrumbs.tsx +47 -0
- package/src/components/molecules/DateDisplay/DateDisplay.tsx +25 -9
- package/src/components/molecules/DetailsInfo/DetailsAction.tsx +55 -0
- package/src/components/molecules/DetailsInfo/DetailsAgency.css +21 -0
- package/src/components/molecules/DetailsInfo/DetailsAgency.tsx +53 -0
- package/src/components/molecules/DetailsInfo/DetailsFile.tsx +27 -0
- package/src/components/molecules/DetailsInfo/DetailsInfo.tsx +17 -0
- package/src/components/molecules/DetailsInfo/index.ts +4 -0
- package/src/components/molecules/ServiceTitle/ServiceTitle.css +13 -0
- package/src/components/molecules/ServiceTitle/ServiceTitle.tsx +19 -0
- package/src/components/molecules/TableServiceItem/DetailsCol.tsx +9 -5
- package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +19 -5
- package/src/components/molecules/TimelineItem/ServiceAccommodation.tsx +29 -0
- package/src/components/molecules/TimelineItem/ServiceExcursion.tsx +28 -0
- package/src/components/molecules/TimelineItem/ServiceTransfer.tsx +25 -0
- package/src/components/molecules/TimelineItem/TimelineHeader.css +44 -0
- package/src/components/molecules/TimelineItem/TimelineHeader.tsx +41 -0
- package/src/components/molecules/TimelineItem/TimelineItem.css +7 -0
- package/src/components/molecules/TimelineItem/TimelineItem.tsx +17 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationAccom.tsx +41 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationBody.tsx +12 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationExcursion.tsx +31 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationHeader.tsx +11 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationTransfer.tsx +29 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderAccom.tsx +31 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.css +3 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.tsx +48 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderExcursion.tsx +18 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +8 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.tsx +47 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyExcursion.tsx +26 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyTransfer.tsx +62 -0
- package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicy.tsx +13 -0
- package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.css +39 -0
- package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.tsx +44 -0
- package/src/components/organisms/TabCancellationPolicy/index.ts +7 -0
- package/src/components/organisms/Table/columns/booking-columns.tsx +1 -1
- package/src/components/organisms/Table/columns/detail-resume-columns.tsx +1 -1
- package/src/components/organisms/Table/columns/quotation-columns.tsx +10 -5
- package/src/components/organisms/Timeline/Timeline.tsx +59 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Breadcrumbs.css';
|
|
3
|
+
export interface BreadcrumbsItem {
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface BreadcrumbsProps {
|
|
8
|
+
items: BreadcrumbsItem[];
|
|
9
|
+
onBack?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
|
|
@@ -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 Icon from '../../atoms/Icon/Icon';
|
|
15
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
16
|
+
import './Breadcrumbs.css';
|
|
17
|
+
export var Breadcrumbs = function (props) {
|
|
18
|
+
var items = props.items, onBack = props.onBack;
|
|
19
|
+
return (_jsxs("ol", __assign({ className: "breadcrumbs" }, { children: [_jsxs(Text, __assign({ variant: "medium", size: "sm", leading: "4", as: "li", className: "cursor-pointer", onClick: onBack }, { children: [_jsx(Icon, { name: "chevron-left", size: "sm" }), "Back"] })), items.map(function (item, index) { return (_jsx(Text, __assign({ as: "li", variant: "medium", size: "sm", onClick: item.onClick, color: index === items.length - 1 ? 'accent' : 'default', leading: "4", className: cn(index < items.length - 1 && 'cursor-pointer') }, { children: item.label }), "bc-".concat(index))); })] })));
|
|
20
|
+
};
|
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
}, [
|
|
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:
|
|
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
|
+
};
|