mautourco-components 0.2.13 → 0.2.15
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/PlusCircleIcon.d.ts +12 -0
- package/dist/components/atoms/Icon/icons/PlusCircleIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/QuotationIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/QuotationIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/registry.d.ts +2 -0
- package/dist/components/atoms/Icon/icons/registry.js +4 -0
- package/dist/components/atoms/Inputs/DropdownInput/DropdownInput.js +15 -3
- package/dist/components/organisms/MultipleQuotationDocket/MultipleQuotationDocket.d.ts +64 -0
- package/dist/components/organisms/MultipleQuotationDocket/MultipleQuotationDocket.js +45 -0
- package/dist/components/organisms/MultipleQuotationDocket/index.d.ts +2 -0
- package/dist/components/organisms/MultipleQuotationDocket/index.js +1 -0
- package/dist/components/organisms/QuoteHeader/QuoteHeader.css +2142 -0
- package/dist/components/organisms/QuoteHeader/QuoteHeader.d.ts +12 -0
- package/dist/components/organisms/QuoteHeader/QuoteHeader.js +41 -0
- package/dist/components/organisms/QuoteHeader/constant.d.ts +3 -0
- package/dist/components/organisms/QuoteHeader/constant.js +8 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/styles/components/dropdown.css +7 -6
- package/dist/styles/components/forms.css +18 -9
- package/dist/styles/components/organism/multiple-quotation-docket.css +2304 -0
- package/package.json +1 -1
- package/src/components/atoms/Icon/icons/PlusCircleIcon.tsx +60 -0
- package/src/components/atoms/Icon/icons/QuotationIcon.tsx +50 -0
- package/src/components/atoms/Icon/icons/registry.tsx +4 -0
- package/src/components/atoms/Inputs/DropdownInput/DropdownInput.tsx +29 -17
- package/src/components/organisms/CarBookingCard/index.ts +1 -0
- package/src/components/organisms/MultipleQuotationDocket/MultipleQuotationDocket.tsx +349 -0
- package/src/components/organisms/MultipleQuotationDocket/index.ts +6 -0
- package/src/components/organisms/QuoteHeader/QuoteHeader.css +37 -0
- package/src/components/organisms/QuoteHeader/QuoteHeader.tsx +93 -0
- package/src/components/organisms/QuoteHeader/constant.ts +8 -0
- package/src/styles/components/dropdown.css +7 -6
- package/src/styles/components/forms.css +18 -11
- package/src/styles/components/organism/multiple-quotation-docket.css +222 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PlusCircleIconProps {
|
|
3
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
className?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Couleur par défaut si aucune couleur n'est spécifiée
|
|
8
|
+
*/
|
|
9
|
+
defaultColor?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const PlusCircleIcon: React.FC<PlusCircleIconProps>;
|
|
12
|
+
export default PlusCircleIcon;
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
var PlusCircleIcon = function (_a) {
|
|
14
|
+
var _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, color = _a.color;
|
|
15
|
+
var getSizeClasses = function () {
|
|
16
|
+
switch (size) {
|
|
17
|
+
case 'xs':
|
|
18
|
+
return 'w-3 h-3';
|
|
19
|
+
case 'sm':
|
|
20
|
+
return 'w-4 h-4';
|
|
21
|
+
case 'md':
|
|
22
|
+
return 'w-5 h-5';
|
|
23
|
+
case 'lg':
|
|
24
|
+
return 'w-6 h-6';
|
|
25
|
+
case 'xl':
|
|
26
|
+
return 'w-8 h-8';
|
|
27
|
+
default:
|
|
28
|
+
return 'w-5 h-5';
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var sizeClasses = getSizeClasses();
|
|
32
|
+
var colorClass = color ? "text-".concat(color) : 'text-current';
|
|
33
|
+
var classes = "".concat(sizeClasses, " ").concat(colorClass, " ").concat(className);
|
|
34
|
+
return (_jsxs("svg", __assign({ className: classes, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("g", __assign({ "clip-path": "url(#clip0_7074_66340)" }, { children: _jsx("path", { d: "M13.915 8.00098C13.915 4.7334 11.2666 2.08416 7.99902 2.08398C4.73134 2.08398 2.08203 4.73329 2.08203 8.00098C2.08221 11.2685 4.73145 13.917 7.99902 13.917C11.2664 13.9168 13.9149 11.2684 13.915 8.00098ZM7.24902 10.667V8.75098H5.33203C4.91793 8.75098 4.58221 8.41504 4.58203 8.00098C4.58203 7.58676 4.91782 7.25098 5.33203 7.25098H7.24902V5.33398C7.24902 4.91977 7.58481 4.58398 7.99902 4.58398C8.41309 4.58416 8.74902 4.91988 8.74902 5.33398V7.25098H10.665L10.7422 7.25488C11.1203 7.29337 11.415 7.61271 11.415 8.00098C11.4149 8.38912 11.1202 8.70862 10.7422 8.74707L10.665 8.75098H8.74902V10.667C8.74902 11.0811 8.41309 11.4168 7.99902 11.417C7.58481 11.417 7.24902 11.0812 7.24902 10.667ZM15.415 8.00098C15.4149 12.0968 12.0949 15.4168 7.99902 15.417C3.90302 15.417 0.582208 12.0969 0.582031 8.00098C0.582031 3.90487 3.90291 0.583984 7.99902 0.583984C12.095 0.584161 15.415 3.90497 15.415 8.00098Z", fill: "white" }) })), _jsx("defs", { children: _jsx("clipPath", __assign({ id: "clip0_7074_66340" }, { children: _jsx("rect", { width: "16", height: "16", fill: "white" }) })) })] })));
|
|
35
|
+
};
|
|
36
|
+
export default PlusCircleIcon;
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
var QuotationIcon = function (_a) {
|
|
14
|
+
var _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, color = _a.color;
|
|
15
|
+
var getSizeClasses = function () {
|
|
16
|
+
switch (size) {
|
|
17
|
+
case 'xs':
|
|
18
|
+
return 'w-3 h-3';
|
|
19
|
+
case 'sm':
|
|
20
|
+
return 'w-4 h-4';
|
|
21
|
+
case 'md':
|
|
22
|
+
return 'w-5 h-5';
|
|
23
|
+
case 'lg':
|
|
24
|
+
return 'w-6 h-6';
|
|
25
|
+
case 'xl':
|
|
26
|
+
return 'w-8 h-8';
|
|
27
|
+
default:
|
|
28
|
+
return 'w-5 h-5';
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var sizeClasses = getSizeClasses();
|
|
32
|
+
var colorClass = color ? "text-".concat(color) : 'text-current';
|
|
33
|
+
var classes = "".concat(sizeClasses, " ").concat(colorClass, " ").concat(className);
|
|
34
|
+
return (_jsx("svg", __assign({ className: classes, viewBox: "0 0 22 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M10 16V17C10 17.3444 9.93703 17.6814 9.82422 18H19C19.2652 18 19.5195 17.8946 19.707 17.707C19.8946 17.5195 20 17.2652 20 17V16H10ZM14 9C14.5523 9 15 9.44771 15 10C15 10.5523 14.5523 11 14 11H9C8.44771 11 8 10.5523 8 10C8 9.44771 8.44771 9 9 9H14ZM14 5C14.5523 5 15 5.44772 15 6C15 6.55228 14.5523 7 14 7H9C8.44771 7 8 6.55228 8 6C8 5.44772 8.44771 5 9 5H14ZM4 3C4 2.73478 3.89457 2.4805 3.70703 2.29297C3.54289 2.12883 3.32763 2.02757 3.09863 2.00488L3 2C2.73478 2 2.4805 2.10543 2.29297 2.29297C2.10543 2.4805 2 2.73478 2 3V5H4V3ZM6 17L6.00488 17.0986C6.02757 17.3276 6.12883 17.5429 6.29297 17.707C6.48051 17.8946 6.73478 18 7 18C7.26522 18 7.51949 17.8946 7.70703 17.707C7.89457 17.5195 8 17.2652 8 17V16C8 15.4696 8.21087 14.961 8.58594 14.5859C8.96101 14.2109 9.46957 14 10 14H17V3C17 2.73478 16.8946 2.48051 16.707 2.29297C16.5195 2.10543 16.2652 2 16 2H5.82422C5.93703 2.31859 6 2.65558 6 3V17ZM19 14H20C20.5304 14 21.039 14.2109 21.4141 14.5859C21.7891 14.961 22 15.4696 22 16V17C22 17.7957 21.6837 18.5585 21.1211 19.1211C20.5585 19.6837 19.7957 20 19 20H7C6.20435 20 5.44151 19.6837 4.87891 19.1211C4.3163 18.5585 4 17.7957 4 17V7H2C1.46957 7 0.96101 6.78913 0.585938 6.41406C0.210865 6.03899 0 5.53043 0 5V3C0 2.20435 0.316297 1.44152 0.878906 0.878906C1.3711 0.386708 2.01649 0.0829076 2.70312 0.0146484L3 0H16C16.7957 0 17.5585 0.316297 18.1211 0.878906C18.6837 1.44151 19 2.20435 19 3V14Z", fill: "currentColor" }) })));
|
|
35
|
+
};
|
|
36
|
+
export default QuotationIcon;
|
|
@@ -48,6 +48,7 @@ export declare const ICONS: {
|
|
|
48
48
|
readonly linkedin: IconComponent;
|
|
49
49
|
readonly plus: IconComponent;
|
|
50
50
|
readonly minus: IconComponent;
|
|
51
|
+
readonly quotation: IconComponent;
|
|
51
52
|
readonly home: IconComponent;
|
|
52
53
|
readonly plane: IconComponent;
|
|
53
54
|
readonly ship: IconComponent;
|
|
@@ -62,5 +63,6 @@ export declare const ICONS: {
|
|
|
62
63
|
readonly bus: IconComponent;
|
|
63
64
|
readonly map: IconComponent;
|
|
64
65
|
readonly wallet: IconComponent;
|
|
66
|
+
readonly 'plus-circle': IconComponent;
|
|
65
67
|
};
|
|
66
68
|
export type IconName = keyof typeof ICONS;
|
|
@@ -45,7 +45,9 @@ import NightIcon from './NightIcon';
|
|
|
45
45
|
import PlaneIcon from './PlaneIcon';
|
|
46
46
|
import PlaneLandingOutlineIcon from './PlaneLandingOutlineIcon';
|
|
47
47
|
import PlaneTakeoffOutlineIcon from './PlaneTakeoffOutlineIcon';
|
|
48
|
+
import PlusCircleIcon from './PlusCircleIcon';
|
|
48
49
|
import PlusIcon from './PlusIcon';
|
|
50
|
+
import QuotationIcon from './QuotationIcon';
|
|
49
51
|
import Search from './Search';
|
|
50
52
|
import Settings from './Settings';
|
|
51
53
|
import ShipIcon from './ShipIcon';
|
|
@@ -104,6 +106,7 @@ export var ICONS = {
|
|
|
104
106
|
linkedin: LinkedInIcon,
|
|
105
107
|
plus: PlusIcon,
|
|
106
108
|
minus: MinusIcon,
|
|
109
|
+
quotation: QuotationIcon,
|
|
107
110
|
home: HomeIcon,
|
|
108
111
|
plane: PlaneIcon,
|
|
109
112
|
ship: ShipIcon,
|
|
@@ -118,4 +121,5 @@ export var ICONS = {
|
|
|
118
121
|
bus: BusIcon,
|
|
119
122
|
map: MapIcon,
|
|
120
123
|
wallet: WalletIcon,
|
|
124
|
+
'plus-circle': PlusCircleIcon,
|
|
121
125
|
};
|
|
@@ -10,12 +10,13 @@ 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 { useState } from 'react';
|
|
13
|
+
import { useEffect, useRef, useState } from 'react';
|
|
14
14
|
import Icon from '../../Icon/Icon';
|
|
15
15
|
import Spinner from '../../Spinner/Spinner';
|
|
16
16
|
var DropdownInput = function (_a) {
|
|
17
17
|
var _b = _a.placeholder, placeholder = _b === void 0 ? 'Select item name' : _b, value = _a.value, _c = _a.state, state = _c === void 0 ? 'default' : _c, onClick = _a.onClick, _d = _a.className, className = _d === void 0 ? '' : _d, _e = _a.options, options = _e === void 0 ? [] : _e, onSelect = _a.onSelect;
|
|
18
18
|
var _f = useState(false), isOpen = _f[0], setIsOpen = _f[1];
|
|
19
|
+
var dropdownRef = useRef(null);
|
|
19
20
|
var handleClick = function () {
|
|
20
21
|
if (state === 'disabled' || state === 'loading')
|
|
21
22
|
return;
|
|
@@ -47,7 +48,18 @@ var DropdownInput = function (_a) {
|
|
|
47
48
|
}
|
|
48
49
|
return (_jsx(Icon, { name: isOpen ? 'chevron-up' : 'chevron-down', size: "sm", className: "dropdown-input__icon dropdown-input__icon--chevron" }));
|
|
49
50
|
};
|
|
50
|
-
var displayText = state === 'loading' ? 'Loading...' :
|
|
51
|
-
|
|
51
|
+
var displayText = state === 'loading' ? 'Loading...' : value || placeholder;
|
|
52
|
+
useEffect(function () {
|
|
53
|
+
var handleClickOutside = function (event) {
|
|
54
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
55
|
+
setIsOpen(false);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
59
|
+
return function () {
|
|
60
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
61
|
+
};
|
|
62
|
+
}, []);
|
|
63
|
+
return (_jsxs("div", __assign({ ref: dropdownRef, className: "dropdown-container ".concat(className) }, { children: [_jsxs("div", __assign({ className: "dropdown-input ".concat(getStateClasses()), onClick: handleClick }, { children: [_jsx("span", __assign({ className: "dropdown-input__text" }, { children: displayText })), getIcon()] })), isOpen && options.length > 0 && (_jsx("div", __assign({ className: "dropdown-menu" }, { children: options.map(function (option, index) { return (_jsx("div", __assign({ className: "dropdown-option", onClick: function () { return handleOptionSelect(option); } }, { children: option }), index)); }) })))] })));
|
|
52
64
|
};
|
|
53
65
|
export default DropdownInput;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconName } from '../../atoms/Icon/Icon';
|
|
3
|
+
export type DocketServiceType = 'Accommodation' | 'Transfer' | 'Handling fee' | 'Excursion' | 'Other Services';
|
|
4
|
+
export interface DocketDetailsData {
|
|
5
|
+
/** Service type */
|
|
6
|
+
type: DocketServiceType;
|
|
7
|
+
/** Service name/title */
|
|
8
|
+
serviceName?: string;
|
|
9
|
+
/** Price for this service */
|
|
10
|
+
price: string;
|
|
11
|
+
/** Currency for the price */
|
|
12
|
+
currency: string;
|
|
13
|
+
/** Start date */
|
|
14
|
+
startDate?: string;
|
|
15
|
+
/** End date */
|
|
16
|
+
endDate?: string;
|
|
17
|
+
/** Number of nights */
|
|
18
|
+
nights?: number;
|
|
19
|
+
/** Client type */
|
|
20
|
+
clientType?: string;
|
|
21
|
+
/** Adults count */
|
|
22
|
+
adults?: number;
|
|
23
|
+
/** Children details */
|
|
24
|
+
children?: Array<{
|
|
25
|
+
age: number;
|
|
26
|
+
}>;
|
|
27
|
+
/** Room type */
|
|
28
|
+
roomType?: string;
|
|
29
|
+
/** Meal plan */
|
|
30
|
+
mealPlan?: string;
|
|
31
|
+
/** Additional details to display */
|
|
32
|
+
details?: Array<{
|
|
33
|
+
icon: IconName;
|
|
34
|
+
label: string;
|
|
35
|
+
value: string;
|
|
36
|
+
}>;
|
|
37
|
+
/** Error message to display (e.g., "Please select your second room") */
|
|
38
|
+
errorMessage?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface MultipleQuotationDocketProps {
|
|
41
|
+
/** Title of the quotation */
|
|
42
|
+
title?: string;
|
|
43
|
+
/** List of service details */
|
|
44
|
+
services: DocketDetailsData[];
|
|
45
|
+
/** Total prices in different currencies */
|
|
46
|
+
totalPrices: Array<{
|
|
47
|
+
currency: string;
|
|
48
|
+
amount: string;
|
|
49
|
+
}>;
|
|
50
|
+
/** Callback when "More options" is clicked */
|
|
51
|
+
onMoreOptionsClick?: () => void;
|
|
52
|
+
/** Callback when "Add new quote" is clicked */
|
|
53
|
+
onAddNewQuoteClick?: () => void;
|
|
54
|
+
/** Callback when "View" is clicked */
|
|
55
|
+
onViewClick?: () => void;
|
|
56
|
+
/** Callback when "Save" is clicked */
|
|
57
|
+
onSaveClick?: () => void;
|
|
58
|
+
/** Callback when "Book now" is clicked */
|
|
59
|
+
onBookNowClick?: () => void;
|
|
60
|
+
/** Additional CSS classes */
|
|
61
|
+
className?: string;
|
|
62
|
+
}
|
|
63
|
+
export declare const MultipleQuotationDocket: React.FC<MultipleQuotationDocketProps>;
|
|
64
|
+
export default MultipleQuotationDocket;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 Button from '../../atoms/Button/Button';
|
|
14
|
+
import Chip from '../../atoms/Chip/Chip';
|
|
15
|
+
import Icon from '../../atoms/Icon/Icon';
|
|
16
|
+
import { Heading, Text } from '../../atoms/Typography/Typography';
|
|
17
|
+
import TextWithIcon from '../../molecules/TextWithIcon/TextWithIcon';
|
|
18
|
+
import CardContainer from '../CardContainer/CardContainer';
|
|
19
|
+
var getServiceIcon = function (type) {
|
|
20
|
+
switch (type) {
|
|
21
|
+
case 'Accommodation':
|
|
22
|
+
return 'accom';
|
|
23
|
+
case 'Transfer':
|
|
24
|
+
return 'bus';
|
|
25
|
+
case 'Excursion':
|
|
26
|
+
return 'map-pin';
|
|
27
|
+
case 'Handling fee':
|
|
28
|
+
return 'wallet';
|
|
29
|
+
case 'Other Services':
|
|
30
|
+
return 'more';
|
|
31
|
+
default:
|
|
32
|
+
return 'more';
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var DocketDetails = function (_a) {
|
|
36
|
+
var data = _a.data;
|
|
37
|
+
var type = data.type, serviceName = data.serviceName, startDate = data.startDate, endDate = data.endDate, nights = data.nights, clientType = data.clientType, adults = data.adults, children = data.children, roomType = data.roomType, mealPlan = data.mealPlan, details = data.details, errorMessage = data.errorMessage;
|
|
38
|
+
var icon = getServiceIcon(type);
|
|
39
|
+
return (_jsxs("div", __assign({ className: "multiple-quotation-docket__details" }, { children: [errorMessage && (_jsx("div", __assign({ className: "multiple-quotation-docket__error" }, { children: _jsx(Text, __assign({ variant: "bold", size: "sm", color: "state-error" }, { children: errorMessage })) }))), serviceName && (_jsx("div", __assign({ className: "multiple-quotation-docket__service-name" }, { children: _jsx(Text, __assign({ variant: "bold", size: "base" }, { children: serviceName })) }))), (startDate || endDate || nights) && (_jsxs("div", __assign({ className: "multiple-quotation-docket__date-info" }, { children: [startDate && endDate && (_jsxs("div", __assign({ className: "multiple-quotation-docket__date-range" }, { children: [_jsx(TextWithIcon, __assign({ icon: "calendar-range-outline", color: "accent" }, { children: startDate })), _jsx(Icon, { name: "arrow-right-outline", size: "sm" }), _jsx(TextWithIcon, __assign({ icon: "calendar-range-outline", color: "accent" }, { children: endDate }))] }))), nights !== undefined && (_jsxs(TextWithIcon, __assign({ icon: "night", color: "subtle" }, { children: [nights, " nights"] })))] }))), (clientType || adults || children) && (_jsxs("div", __assign({ className: "multiple-quotation-docket__client-info" }, { children: [clientType && (_jsxs("div", __assign({ className: "multiple-quotation-docket__client-type" }, { children: [_jsx(Text, __assign({ variant: "bold", size: "sm", color: "subtle" }, { children: "Client type:" })), _jsx(Text, __assign({ variant: "medium", size: "sm", color: "subtle" }, { children: clientType }))] }))), _jsxs("div", __assign({ className: "multiple-quotation-docket__guests" }, { children: [adults !== undefined && (_jsxs(TextWithIcon, __assign({ icon: "user", color: "subtle" }, { children: [adults, " Adults"] }))), children && children.length > 0 && (_jsx("div", __assign({ className: "multiple-quotation-docket__children" }, { children: children.map(function (child, index) { return (_jsxs("div", __assign({ className: "multiple-quotation-docket__child" }, { children: [_jsx(TextWithIcon, __assign({ icon: "user", color: "subtle" }, { children: _jsxs("span", { children: [_jsx("span", { children: "1 Child " }), _jsxs("span", __assign({ className: "multiple-quotation-docket__child-age" }, { children: ["(", child.age, " y.o)"] }))] }) })), index < children.length - 1 && (_jsx("div", { className: "multiple-quotation-docket__divider" }))] }), index)); }) })))] }))] }))), (roomType || mealPlan) && (_jsxs("div", __assign({ className: "multiple-quotation-docket__room-info" }, { children: [roomType && (_jsx(TextWithIcon, __assign({ icon: "accom", color: "subtle" }, { children: roomType }))), mealPlan && (_jsxs("div", __assign({ className: "multiple-quotation-docket__meal-plan" }, { children: [_jsx(TextWithIcon, __assign({ icon: "utensils", color: "subtle" }, { children: "Meal-Plan" })), _jsx("div", { className: "multiple-quotation-docket__divider" }), _jsx(Text, __assign({ variant: "medium", size: "sm", color: "subtle" }, { children: mealPlan }))] })))] }))), details && details.length > 0 && (_jsx("div", __assign({ className: "multiple-quotation-docket__additional-details" }, { children: details.map(function (detail, index) { return (_jsxs(TextWithIcon, __assign({ icon: detail.icon, color: "subtle" }, { children: [detail.label, ": ", detail.value] }), index)); }) })))] })));
|
|
40
|
+
};
|
|
41
|
+
export var MultipleQuotationDocket = function (_a) {
|
|
42
|
+
var _b = _a.title, title = _b === void 0 ? 'Your quotation' : _b, services = _a.services, totalPrices = _a.totalPrices, onMoreOptionsClick = _a.onMoreOptionsClick, onAddNewQuoteClick = _a.onAddNewQuoteClick, onViewClick = _a.onViewClick, onSaveClick = _a.onSaveClick, onBookNowClick = _a.onBookNowClick, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
43
|
+
return (_jsxs(CardContainer, __assign({ spacing: "chill", className: "multiple-quotation-docket ".concat(className) }, { children: [_jsxs("div", __assign({ className: "multiple-quotation-docket__header" }, { children: [_jsxs("div", __assign({ className: "multiple-quotation-docket__title" }, { children: [_jsx(Icon, { name: "quotation", size: "lg" }), _jsx(Heading, __assign({ level: 4, variant: "bold", className: "multiple-quotation-docket__title-text" }, { children: title }))] })), onMoreOptionsClick && (_jsx(Chip, __assign({ type: "outline", color: "neutral", size: "sm", trailingIcon: "chevron-down", onClick: onMoreOptionsClick, className: "multiple-quotation-docket__more-options" }, { children: "More options" })))] })), _jsx("div", __assign({ className: "multiple-quotation-docket__services" }, { children: services.map(function (service, index) { return (_jsxs("div", __assign({ className: "multiple-quotation-docket__service" }, { children: [_jsxs("div", __assign({ className: "multiple-quotation-docket__service-header" }, { children: [_jsxs("div", __assign({ className: "multiple-quotation-docket__service-title" }, { children: [_jsx("div", { className: "multiple-quotation-docket__section-bar" }), _jsx(Icon, { name: getServiceIcon(service.type), size: "sm", color: "var(--color-icon-branded, #0f7173)" }), _jsx(Text, __assign({ variant: "bold", size: "sm", color: "accent" }, { children: service.type }))] })), _jsxs(Chip, __assign({ type: "filled", color: "accent", size: "sm" }, { children: [service.currency, " ", service.price] }))] })), _jsx(DocketDetails, { data: service })] }), index)); }) })), totalPrices.length > 0 && (_jsxs("div", __assign({ className: "multiple-quotation-docket__total" }, { children: [_jsx("div", { className: "multiple-quotation-docket__total-line" }), _jsxs("div", __assign({ className: "multiple-quotation-docket__total-content" }, { children: [_jsx(Text, __assign({ variant: "bold", size: "sm" }, { children: "Total :" })), _jsx("div", __assign({ className: "multiple-quotation-docket__total-prices" }, { children: totalPrices.map(function (total, index) { return (_jsxs(Text, __assign({ variant: "bold", size: "sm" }, { children: [total.currency, " ", total.amount] }), index)); }) }))] })), _jsx("div", { className: "multiple-quotation-docket__total-line" })] }))), _jsxs("div", __assign({ className: "multiple-quotation-docket__actions" }, { children: [onAddNewQuoteClick && (_jsx(Button, __assign({ variant: "outline-secondary", size: "sm", leadingIcon: "plus", onClick: onAddNewQuoteClick, className: "multiple-quotation-docket__action-button" }, { children: "Add new quote" }))), _jsxs("div", __assign({ className: "multiple-quotation-docket__action-group" }, { children: [onViewClick && (_jsx(Button, __assign({ variant: "outline-secondary", size: "sm", onClick: onViewClick, className: "multiple-quotation-docket__action-button multiple-quotation-docket__action-button--flex" }, { children: "View" }))), onSaveClick && (_jsx(Button, __assign({ variant: "outline-secondary", size: "sm", onClick: onSaveClick, className: "multiple-quotation-docket__action-button multiple-quotation-docket__action-button--flex" }, { children: "Save" }))), onBookNowClick && (_jsx(Button, __assign({ variant: "primary", size: "sm", onClick: onBookNowClick, className: "multiple-quotation-docket__action-button multiple-quotation-docket__action-button--book" }, { children: "Book now" })))] }))] }))] })));
|
|
44
|
+
};
|
|
45
|
+
export default MultipleQuotationDocket;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MultipleQuotationDocket, default } from './MultipleQuotationDocket';
|