mautourco-components 0.2.13 → 0.2.14

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.
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface QuotationIconProps {
3
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
+ className?: string;
5
+ color?: string;
6
+ }
7
+ declare const QuotationIcon: React.FC<QuotationIconProps>;
8
+ export default QuotationIcon;
@@ -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;
@@ -46,6 +46,7 @@ import PlaneIcon from './PlaneIcon';
46
46
  import PlaneLandingOutlineIcon from './PlaneLandingOutlineIcon';
47
47
  import PlaneTakeoffOutlineIcon from './PlaneTakeoffOutlineIcon';
48
48
  import PlusIcon from './PlusIcon';
49
+ import QuotationIcon from './QuotationIcon';
49
50
  import Search from './Search';
50
51
  import Settings from './Settings';
51
52
  import ShipIcon from './ShipIcon';
@@ -104,6 +105,7 @@ export var ICONS = {
104
105
  linkedin: LinkedInIcon,
105
106
  plus: PlusIcon,
106
107
  minus: MinusIcon,
108
+ quotation: QuotationIcon,
107
109
  home: HomeIcon,
108
110
  plane: PlaneIcon,
109
111
  ship: ShipIcon,
@@ -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,2 @@
1
+ export { MultipleQuotationDocket, default } from './MultipleQuotationDocket';
2
+ export type { DocketDetailsData, DocketServiceType, MultipleQuotationDocketProps, } from './MultipleQuotationDocket';
@@ -0,0 +1 @@
1
+ export { MultipleQuotationDocket, default } from './MultipleQuotationDocket';
package/dist/index.d.ts CHANGED
@@ -33,6 +33,7 @@ export { CardContainer } from './components/organisms/CardContainer/CardContaine
33
33
  export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
34
34
  export { Dialog } from './components/organisms/Dialog/Dialog';
35
35
  export { Footer } from './components/organisms/Footer/Footer';
36
+ export { default as MultipleQuotationDocket } from './components/organisms/MultipleQuotationDocket';
36
37
  export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSelector';
37
38
  export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
38
39
  export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
@@ -60,6 +61,7 @@ export type { CardContainerProps, CardContainerSpacing, } from './components/org
60
61
  export type { DateTimePickerProps } from './components/organisms/DateTimePicker/DateTimePicker';
61
62
  export type { DialogProps, DialogSize } from './components/organisms/Dialog/Dialog';
62
63
  export type { FooterProps } from './components/organisms/Footer/Footer';
64
+ export type { DocketDetailsData, DocketServiceType, MultipleQuotationDocketProps, } from './components/organisms/MultipleQuotationDocket';
63
65
  export type { ClientType, PaxData, PaxSelectorProps, } from './components/organisms/PaxSelector/PaxSelector';
64
66
  export type { RoundTripData, RoundTripProps, RoundTripTransfer, } from './components/organisms/RoundTrip/RoundTrip';
65
67
  export type { SearchBarTransferData, SearchBarTransferProps, TransferMode, } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ export { CardContainer } from './components/organisms/CardContainer/CardContaine
36
36
  export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
37
37
  export { Dialog } from './components/organisms/Dialog/Dialog';
38
38
  export { Footer } from './components/organisms/Footer/Footer';
39
+ export { default as MultipleQuotationDocket } from './components/organisms/MultipleQuotationDocket';
39
40
  export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSelector';
40
41
  export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
41
42
  export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';