mautourco-components 0.2.22 → 0.2.24
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/LineIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/LineIcon.js +21 -0
- package/dist/components/atoms/Icon/icons/PlusCircleIcon.js +1 -1
- package/dist/components/atoms/Icon/icons/registry.d.ts +1 -0
- package/dist/components/atoms/Icon/icons/registry.js +2 -0
- package/dist/components/molecules/AccomodationDocket/AccomodationDocket.d.ts +7 -0
- package/dist/components/molecules/AccomodationDocket/AccomodationDocket.js +69 -0
- package/dist/components/molecules/AccomodationDocket/index.d.ts +2 -0
- package/dist/components/molecules/AccomodationDocket/index.js +1 -0
- package/dist/components/molecules/AddItemButton/AddItemButton.css +2088 -0
- package/dist/components/molecules/AddItemButton/AddItemButton.d.ts +7 -0
- package/dist/components/molecules/AddItemButton/AddItemButton.js +19 -0
- package/dist/components/molecules/BookingResume/ResumeAccom/ResumeAccom.js +1 -1
- package/dist/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.js +1 -1
- package/dist/components/molecules/BookingResume/ResumeTransfer.js +1 -1
- package/dist/components/molecules/Calendar/DateTime.d.ts +5 -5
- package/dist/components/molecules/Calendar/DateTime.js +48 -37
- package/dist/components/molecules/DateDisplay/DateDisplay.css +2100 -0
- package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +13 -6
- package/dist/components/molecules/DateDisplay/DateDisplay.js +22 -8
- package/dist/components/molecules/DocketPrices/DocketPrices.d.ts +19 -0
- package/dist/components/molecules/DocketPrices/DocketPrices.js +31 -0
- package/dist/components/molecules/DocketPrices/index.d.ts +3 -0
- package/dist/components/molecules/DocketPrices/index.js +2 -0
- package/dist/components/molecules/ExcursionDocket/ExcursionDocket.d.ts +8 -0
- package/dist/components/molecules/ExcursionDocket/ExcursionDocket.js +30 -0
- package/dist/components/molecules/ExcursionDocket/index.d.ts +2 -0
- package/dist/components/molecules/ExcursionDocket/index.js +1 -0
- package/dist/components/molecules/LocationDropdown/LocationDropdown.js +8 -11
- package/dist/components/molecules/OtherServiceDocket/OtherServiceDocket.d.ts +8 -0
- package/dist/components/molecules/OtherServiceDocket/OtherServiceDocket.js +29 -0
- package/dist/components/molecules/OtherServiceDocket/index.d.ts +2 -0
- package/dist/components/molecules/OtherServiceDocket/index.js +1 -0
- package/dist/components/molecules/PriceDisplay/PriceDisplay.css +2101 -0
- package/dist/components/molecules/PriceDisplay/PriceDisplay.d.ts +26 -0
- package/dist/components/molecules/PriceDisplay/PriceDisplay.js +132 -0
- package/dist/components/molecules/PriceDisplay/index.d.ts +3 -0
- package/dist/components/molecules/PriceDisplay/index.js +2 -0
- package/dist/components/molecules/ServiceSelector/ServiceSelector.d.ts +3 -0
- package/dist/components/molecules/ServiceSelector/ServiceSelector.js +23 -12
- package/dist/components/molecules/TransferDocket/TransferDocket.d.ts +8 -0
- package/dist/components/molecules/TransferDocket/TransferDocket.js +59 -0
- package/dist/components/molecules/TransferDocket/index.d.ts +3 -0
- package/dist/components/molecules/TransferDocket/index.js +2 -0
- package/dist/components/organisms/BookingAddItem/AddItemNewService.d.ts +12 -0
- package/dist/components/organisms/BookingAddItem/AddItemNewService.js +48 -0
- package/dist/components/organisms/BookingAddItem/AddItemSelector.d.ts +9 -0
- package/dist/components/organisms/BookingAddItem/AddItemSelector.js +23 -0
- package/dist/components/organisms/BookingAddItem/BookingAddItem.d.ts +16 -0
- package/dist/components/organisms/BookingAddItem/BookingAddItem.js +66 -0
- package/dist/components/organisms/BookingAddItem/index.d.ts +3 -0
- package/dist/components/organisms/BookingAddItem/index.js +3 -0
- package/dist/components/organisms/DateTimePicker/DateTimePicker.js +11 -7
- package/dist/components/organisms/Docket/Docket.d.ts +126 -0
- package/dist/components/organisms/Docket/Docket.js +125 -0
- package/dist/components/organisms/PaxSelector/PaxSelector.d.ts +1 -0
- package/dist/components/organisms/PaxSelector/PaxSelector.js +50 -28
- package/dist/components/ui/popover.js +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +5 -0
- package/dist/styles/components/checkbox.css +5 -4
- package/dist/styles/components/molecule/accomodation-docket.css +2222 -0
- package/dist/styles/components/molecule/calendarInput.css +3 -4
- package/dist/styles/components/molecule/docket-prices.css +2095 -0
- package/dist/styles/components/molecule/excursion-docket.css +2135 -0
- package/dist/styles/components/molecule/other-service-docket.css +2114 -0
- package/dist/styles/components/molecule/service-selector.css +70 -21
- package/dist/styles/components/molecule/transfer-docket.css +2150 -0
- package/dist/styles/components/organism/docket.css +2448 -0
- package/dist/types/docket/docket.types.d.ts +11 -0
- package/dist/types/docket/docket.types.js +1 -0
- package/dist/types/docket/services.types.d.ts +125 -0
- package/dist/types/docket/services.types.js +1 -0
- package/package.json +1 -1
- package/src/components/atoms/Icon/icons/LineIcon.tsx +31 -0
- package/src/components/atoms/Icon/icons/PlusCircleIcon.tsx +2 -2
- package/src/components/atoms/Icon/icons/registry.tsx +2 -0
- package/src/components/molecules/AccomodationDocket/AccomodationDocket.tsx +224 -0
- package/src/components/molecules/AccomodationDocket/index.ts +3 -0
- package/src/components/molecules/AddItemButton/AddItemButton.css +5 -0
- package/src/components/molecules/AddItemButton/AddItemButton.tsx +18 -0
- package/src/components/molecules/BookingResume/ResumeAccom/ResumeAccom.tsx +1 -1
- package/src/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.tsx +1 -1
- package/src/components/molecules/BookingResume/ResumeTransfer.tsx +1 -1
- package/src/components/molecules/Calendar/DateTime.tsx +69 -53
- package/src/components/molecules/DateDisplay/DateDisplay.css +21 -0
- package/src/components/molecules/DateDisplay/DateDisplay.tsx +52 -24
- package/src/components/molecules/DocketPrices/DocketPrices.tsx +56 -0
- package/src/components/molecules/DocketPrices/index.ts +4 -0
- package/src/components/molecules/ExcursionDocket/ExcursionDocket.tsx +171 -0
- package/src/components/molecules/ExcursionDocket/index.ts +2 -0
- package/src/components/molecules/LocationDropdown/LocationDropdown.tsx +41 -38
- package/src/components/molecules/OtherServiceDocket/OtherServiceDocket.tsx +58 -0
- package/src/components/molecules/OtherServiceDocket/index.ts +2 -0
- package/src/components/molecules/PriceDisplay/PriceDisplay.css +24 -0
- package/src/components/molecules/PriceDisplay/PriceDisplay.tsx +179 -0
- package/src/components/molecules/PriceDisplay/index.ts +4 -0
- package/src/components/molecules/ServiceSelector/ServiceSelector.tsx +91 -83
- package/src/components/molecules/TransferDocket/TransferDocket.tsx +156 -0
- package/src/components/molecules/TransferDocket/index.ts +4 -0
- package/src/components/organisms/BookingAddItem/AddItemNewService.tsx +95 -0
- package/src/components/organisms/BookingAddItem/AddItemSelector.tsx +43 -0
- package/src/components/organisms/BookingAddItem/BookingAddItem.tsx +120 -0
- package/src/components/organisms/BookingAddItem/index.ts +3 -0
- package/src/components/organisms/CarBookingCard/index.ts +1 -0
- package/src/components/organisms/DateTimePicker/DateTimePicker.tsx +13 -7
- package/src/components/organisms/Docket/Docket.tsx +456 -0
- package/src/components/organisms/PaxSelector/PaxSelector.tsx +305 -193
- package/src/components/organisms/SearchBarTransfer/index.ts +2 -0
- package/src/components/ui/popover.tsx +2 -4
- package/src/styles/components/checkbox.css +5 -4
- package/src/styles/components/molecule/accomodation-docket.css +117 -0
- package/src/styles/components/molecule/calendarInput.css +12 -13
- package/src/styles/components/molecule/docket-prices.css +13 -0
- package/src/styles/components/molecule/excursion-docket.css +47 -0
- package/src/styles/components/molecule/other-service-docket.css +30 -0
- package/src/styles/components/molecule/service-selector.css +71 -23
- package/src/styles/components/molecule/transfer-docket.css +61 -0
- package/src/styles/components/organism/docket.css +360 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../../styles/components/organism/docket.css';
|
|
3
|
+
import { Docket as DocketType } from '../../../types/docket/docket.types';
|
|
4
|
+
export interface DocketHeaderProps {
|
|
5
|
+
/**
|
|
6
|
+
* Title text for the docket header
|
|
7
|
+
*/
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Handler for the "More options" button click
|
|
11
|
+
*/
|
|
12
|
+
onMoreOptionsClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Additional CSS classes
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface DocketFooterProps {
|
|
19
|
+
/**
|
|
20
|
+
* Mode of the docket: 'single' shows only Save and Book now, 'multiple' shows all buttons
|
|
21
|
+
*/
|
|
22
|
+
mode?: 'single' | 'multiple';
|
|
23
|
+
/**
|
|
24
|
+
* Handler for "Add new quote" button click
|
|
25
|
+
*/
|
|
26
|
+
onAddNewQuoteClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Handler for "View" button click
|
|
29
|
+
*/
|
|
30
|
+
onViewClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Handler for "Save" button click
|
|
33
|
+
*/
|
|
34
|
+
onSaveClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Handler for "Book now" button click
|
|
37
|
+
*/
|
|
38
|
+
onBookNowClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Additional CSS classes
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface DocketProps {
|
|
45
|
+
/**
|
|
46
|
+
* Array of nested Docket objects
|
|
47
|
+
*/
|
|
48
|
+
dockets?: DocketType[];
|
|
49
|
+
/**
|
|
50
|
+
* Title text for the docket header
|
|
51
|
+
*/
|
|
52
|
+
title?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Handler for the "More options" button click
|
|
55
|
+
*/
|
|
56
|
+
onMoreOptionsClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Handler for "Add new quote" button click
|
|
59
|
+
*/
|
|
60
|
+
onAddNewQuoteClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Handler for "View" button click
|
|
63
|
+
*/
|
|
64
|
+
onViewClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Handler for "Save" button click
|
|
67
|
+
*/
|
|
68
|
+
onSaveClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Handler for "Book now" button click
|
|
71
|
+
*/
|
|
72
|
+
onBookNowClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Mode of the docket: 'single' shows only Save and Book now in footer, 'multiple' shows all buttons
|
|
75
|
+
*/
|
|
76
|
+
mode?: 'single' | 'multiple';
|
|
77
|
+
/**
|
|
78
|
+
* Show the header section
|
|
79
|
+
*/
|
|
80
|
+
showHeader?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Show the footer section
|
|
83
|
+
*/
|
|
84
|
+
showFooter?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Additional CSS classes to apply to the docket container
|
|
87
|
+
*/
|
|
88
|
+
className?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Optional click handler
|
|
91
|
+
*/
|
|
92
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Optional data attributes for testing or tracking
|
|
95
|
+
*/
|
|
96
|
+
'data-testid'?: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Collapsed header component for mobile/tablet view
|
|
100
|
+
*/
|
|
101
|
+
export declare const DocketCollapsedHeader: React.FC<{
|
|
102
|
+
title?: string;
|
|
103
|
+
onClick?: () => void;
|
|
104
|
+
className?: string;
|
|
105
|
+
}>;
|
|
106
|
+
/**
|
|
107
|
+
* Empty state component for docket when no content is provided
|
|
108
|
+
*/
|
|
109
|
+
export declare const DocketEmptyState: React.FC<{
|
|
110
|
+
className?: string;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* DocketHeader component for the docket title and more options button
|
|
114
|
+
*/
|
|
115
|
+
export declare const DocketHeader: React.FC<DocketHeaderProps>;
|
|
116
|
+
/**
|
|
117
|
+
* DocketFooter component for action buttons
|
|
118
|
+
*/
|
|
119
|
+
export declare const DocketFooter: React.FC<DocketFooterProps>;
|
|
120
|
+
/**
|
|
121
|
+
* Docket is a container component for displaying quotation/docket information.
|
|
122
|
+
* It provides a structured layout for travel booking summaries with sections
|
|
123
|
+
* for accommodation, services, pricing, and actions.
|
|
124
|
+
*/
|
|
125
|
+
export declare const Docket: React.FC<DocketProps>;
|
|
126
|
+
export default Docket;
|
|
@@ -0,0 +1,125 @@
|
|
|
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, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect, useState } from 'react';
|
|
14
|
+
import '../../../styles/components/organism/docket.css';
|
|
15
|
+
import Button from '../../atoms/Button/Button';
|
|
16
|
+
import Chip from '../../atoms/Chip/Chip';
|
|
17
|
+
import Icon from '../../atoms/Icon/Icon';
|
|
18
|
+
import { AccomodationDocket } from '../../molecules/AccomodationDocket/AccomodationDocket';
|
|
19
|
+
import { DocketPrices } from '../../molecules/DocketPrices/DocketPrices';
|
|
20
|
+
import { ExcursionDocket } from '../../molecules/ExcursionDocket/ExcursionDocket';
|
|
21
|
+
import { OtherServiceDocket } from '../../molecules/OtherServiceDocket/OtherServiceDocket';
|
|
22
|
+
import { TransferDocket } from '../../molecules/TransferDocket/TransferDocket';
|
|
23
|
+
/**
|
|
24
|
+
* Collapsed header component for mobile/tablet view
|
|
25
|
+
*/
|
|
26
|
+
export var DocketCollapsedHeader = function (_a) {
|
|
27
|
+
var _b = _a.title, title = _b === void 0 ? 'Your quotation' : _b, onClick = _a.onClick, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
28
|
+
return (_jsxs("div", __assign({ className: "docket__collapsed-header ".concat(className), onClick: onClick, role: "button", tabIndex: 0, onKeyDown: function (e) {
|
|
29
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
32
|
+
}
|
|
33
|
+
} }, { children: [_jsxs("div", __assign({ className: "docket__collapsed-header-title" }, { children: [_jsx(Icon, { name: "quotation", size: "lg" }), _jsx("h2", __assign({ className: "docket__collapsed-header-title-text" }, { children: title }))] })), _jsx(Icon, { name: "eye", size: "lg" })] })));
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Empty state component for docket when no content is provided
|
|
37
|
+
*/
|
|
38
|
+
export var DocketEmptyState = function (_a) {
|
|
39
|
+
var _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
40
|
+
return (_jsx("div", __assign({ className: "docket__empty-state ".concat(className) }, { children: _jsxs("div", __assign({ className: "docket__empty-state-content" }, { children: [_jsx("div", __assign({ className: "docket__empty-state-illustration" }, { children: _jsx("img", { src: "/images/docket-empty-illustration.svg", alt: "Empty docket illustration", className: "docket__empty-state-image" }) })), _jsxs("p", __assign({ className: "docket__empty-state-text" }, { children: [_jsx("span", __assign({ className: "docket__empty-state-text-bold" }, { children: "Start by adding a service here\u2014" })), _jsx("span", __assign({ className: "docket__empty-state-text-regular" }, { children: "you'll be able to create and compare multiple quotations." }))] }))] })) })));
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* DocketHeader component for the docket title and more options button
|
|
44
|
+
*/
|
|
45
|
+
export var DocketHeader = function (_a) {
|
|
46
|
+
var _b = _a.title, title = _b === void 0 ? 'Your quotation' : _b, onMoreOptionsClick = _a.onMoreOptionsClick, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
47
|
+
return (_jsxs("div", __assign({ className: "docket__header ".concat(className) }, { children: [_jsxs("div", __assign({ className: "docket__header-title" }, { children: [_jsx(Icon, { name: "quotation", size: "lg" }), _jsx("h2", __assign({ className: "docket__header-title-text" }, { children: title }))] })), onMoreOptionsClick && (_jsx(Chip, __assign({ onClick: onMoreOptionsClick, trailingIcon: "chevron-down", className: "docket__header-more-options" }, { children: "More options" })))] })));
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* DocketFooter component for action buttons
|
|
51
|
+
*/
|
|
52
|
+
export var DocketFooter = function (_a) {
|
|
53
|
+
var _b = _a.mode, mode = _b === void 0 ? 'multiple' : _b, onAddNewQuoteClick = _a.onAddNewQuoteClick, onViewClick = _a.onViewClick, onSaveClick = _a.onSaveClick, onBookNowClick = _a.onBookNowClick, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
54
|
+
var isSingleMode = mode === 'single';
|
|
55
|
+
return (_jsxs("div", __assign({ className: "docket__footer ".concat(className) }, { children: [!isSingleMode && onAddNewQuoteClick && (_jsx(Button, __assign({ variant: "outline-secondary", size: "sm", leadingIcon: "plus", onClick: onAddNewQuoteClick, className: "docket__footer-button docket__footer-button--full" }, { children: "Add new quote" }))), _jsxs("div", __assign({ className: "docket__footer-actions" }, { children: [!isSingleMode && onViewClick && (_jsx(Button, __assign({ variant: "outline-secondary", size: "sm", onClick: onViewClick, className: "docket__footer-button" }, { children: "View" }))), onSaveClick && (_jsx(Button, __assign({ variant: "outline-secondary", size: "sm", onClick: onSaveClick, className: "docket__footer-button" }, { children: "Save" }))), onBookNowClick && (_jsx(Button, __assign({ variant: "secondary", size: "sm", onClick: onBookNowClick, className: "docket__footer-button docket__footer-button--primary" }, { children: "Book now" })))] }))] })));
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Docket is a container component for displaying quotation/docket information.
|
|
59
|
+
* It provides a structured layout for travel booking summaries with sections
|
|
60
|
+
* for accommodation, services, pricing, and actions.
|
|
61
|
+
*/
|
|
62
|
+
export var Docket = function (_a) {
|
|
63
|
+
var dockets = _a.dockets, _b = _a.title, title = _b === void 0 ? 'Your quotation' : _b, onMoreOptionsClick = _a.onMoreOptionsClick, onAddNewQuoteClick = _a.onAddNewQuoteClick, onViewClick = _a.onViewClick, onSaveClick = _a.onSaveClick, onBookNowClick = _a.onBookNowClick, _c = _a.mode, mode = _c === void 0 ? 'multiple' : _c, _d = _a.showHeader, showHeader = _d === void 0 ? true : _d, _e = _a.showFooter, showFooter = _e === void 0 ? true : _e, _f = _a.className, className = _f === void 0 ? '' : _f, onClick = _a.onClick, testId = _a["data-testid"];
|
|
64
|
+
var _g = useState(false), isOpen = _g[0], setIsOpen = _g[1];
|
|
65
|
+
var _h = useState(false), isMobile = _h[0], setIsMobile = _h[1];
|
|
66
|
+
useEffect(function () {
|
|
67
|
+
var checkMobile = function () {
|
|
68
|
+
setIsMobile(window.innerWidth < 1024); // Tablet and mobile breakpoint
|
|
69
|
+
};
|
|
70
|
+
checkMobile();
|
|
71
|
+
window.addEventListener('resize', checkMobile);
|
|
72
|
+
return function () { return window.removeEventListener('resize', checkMobile); };
|
|
73
|
+
}, []);
|
|
74
|
+
var handleToggle = function () {
|
|
75
|
+
setIsOpen(!isOpen);
|
|
76
|
+
};
|
|
77
|
+
var handleClose = function (e) {
|
|
78
|
+
e.stopPropagation();
|
|
79
|
+
setIsOpen(false);
|
|
80
|
+
};
|
|
81
|
+
var baseClass = 'docket';
|
|
82
|
+
var classes = [
|
|
83
|
+
baseClass,
|
|
84
|
+
isMobile && !isOpen ? 'docket--collapsed' : '',
|
|
85
|
+
isMobile && isOpen ? 'docket--open' : '',
|
|
86
|
+
className,
|
|
87
|
+
]
|
|
88
|
+
.filter(Boolean)
|
|
89
|
+
.join(' ');
|
|
90
|
+
var renderService = function (service, index) {
|
|
91
|
+
switch (service.type) {
|
|
92
|
+
case 'accommodation':
|
|
93
|
+
return (_jsx(AccomodationDocket, { data: service }, "service-".concat(index)));
|
|
94
|
+
case 'transfer':
|
|
95
|
+
return (_jsx(TransferDocket, { data: service }, "service-".concat(index)));
|
|
96
|
+
case 'excursion':
|
|
97
|
+
return (_jsx(ExcursionDocket, { data: service }, "service-".concat(index)));
|
|
98
|
+
case 'otherService':
|
|
99
|
+
return (_jsx(OtherServiceDocket, { data: service }, "service-".concat(index)));
|
|
100
|
+
default:
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
var renderContent = function () {
|
|
105
|
+
if (!dockets || dockets.length === 0) {
|
|
106
|
+
return _jsx(DocketEmptyState, {});
|
|
107
|
+
}
|
|
108
|
+
// Collect all services from all dockets
|
|
109
|
+
var allServices = dockets.flatMap(function (docket) { return docket.services || []; });
|
|
110
|
+
if (allServices.length === 0) {
|
|
111
|
+
return _jsx(DocketEmptyState, {});
|
|
112
|
+
}
|
|
113
|
+
var renderedServices = allServices
|
|
114
|
+
.map(function (service, index) { return renderService(service, index); })
|
|
115
|
+
.filter(Boolean);
|
|
116
|
+
if (renderedServices.length === 0) {
|
|
117
|
+
return _jsx(DocketEmptyState, {});
|
|
118
|
+
}
|
|
119
|
+
return _jsx("div", __assign({ className: "docket__services" }, { children: renderedServices }));
|
|
120
|
+
};
|
|
121
|
+
// Collect all prices from all dockets
|
|
122
|
+
var allPrices = dockets ? dockets.flatMap(function (docket) { return docket.prices || []; }) : [];
|
|
123
|
+
return (_jsxs(_Fragment, { children: [isMobile && !isOpen && (_jsx(DocketCollapsedHeader, { title: title, onClick: handleToggle })), isMobile && isOpen && (_jsxs("div", __assign({ className: "docket__mobile-wrapper" }, { children: [_jsx("div", __assign({ className: "docket__close-header" }, { children: _jsxs("div", __assign({ className: "docket__close-header-content" }, { children: [_jsx("h2", __assign({ className: "docket__close-header-text" }, { children: "Close" })), _jsx("button", __assign({ className: "docket__close-button", onClick: handleClose, "aria-label": "Close docket" }, { children: _jsx(Icon, { name: "close", size: "lg" }) }))] })) })), _jsxs("div", __assign({ className: classes, onClick: onClick, "data-testid": testId }, { children: [showHeader && (_jsx(DocketHeader, { title: title, onMoreOptionsClick: onMoreOptionsClick })), _jsx("div", __assign({ className: "docket__content" }, { children: renderContent() })), allPrices.length > 0 && (_jsx("div", __assign({ className: "docket__prices-section" }, { children: _jsx(DocketPrices, { prices: allPrices }) }))), showFooter && (_jsx(DocketFooter, { mode: mode, onAddNewQuoteClick: onAddNewQuoteClick, onViewClick: onViewClick, onSaveClick: onSaveClick, onBookNowClick: onBookNowClick }))] }))] }))), !isMobile && (_jsxs("div", __assign({ className: classes, onClick: onClick, "data-testid": testId }, { children: [showHeader && (_jsx(DocketHeader, { title: title, onMoreOptionsClick: onMoreOptionsClick })), _jsx("div", __assign({ className: "docket__content" }, { children: renderContent() })), allPrices.length > 0 && (_jsxs("div", __assign({ className: "docket__prices-section" }, { children: [_jsx(Icon, { name: "line", size: "lg" }), _jsx(DocketPrices, { prices: allPrices }), _jsx(Icon, { name: "line", size: "lg" })] }))), showFooter && (_jsx(DocketFooter, { mode: mode, onAddNewQuoteClick: onAddNewQuoteClick, onViewClick: onViewClick, onSaveClick: onSaveClick, onBookNowClick: onBookNowClick }))] })))] }));
|
|
124
|
+
};
|
|
125
|
+
export default Docket;
|
|
@@ -19,7 +19,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
19
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
20
|
};
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
22
|
-
import {
|
|
22
|
+
import { useEffect, useRef, useState } from 'react';
|
|
23
23
|
import Icon from '../../atoms/Icon/Icon';
|
|
24
24
|
import { Text } from '../../atoms/Typography/Typography';
|
|
25
25
|
var DEFAULT_PAX_DATA = {
|
|
@@ -123,7 +123,7 @@ var AgeSelector = function (_a) {
|
|
|
123
123
|
border: 'none',
|
|
124
124
|
outline: 'none',
|
|
125
125
|
width: '100%',
|
|
126
|
-
cursor: 'text'
|
|
126
|
+
cursor: 'text',
|
|
127
127
|
} }), _jsx("button", __assign({ type: "button", className: "pax-selector__age-dropdown-btn", onClick: function (e) {
|
|
128
128
|
e.preventDefault();
|
|
129
129
|
e.stopPropagation();
|
|
@@ -134,7 +134,7 @@ var AgeSelector = function (_a) {
|
|
|
134
134
|
cursor: 'pointer',
|
|
135
135
|
padding: 0,
|
|
136
136
|
display: 'flex',
|
|
137
|
-
alignItems: 'center'
|
|
137
|
+
alignItems: 'center',
|
|
138
138
|
} }, { children: _jsx(Icon, { name: "chevron-down", size: "sm", className: "dropdown-input__icon dropdown-input__icon--chevron" }) }))] })), isOpen && (_jsx("div", __assign({ className: "dropdown-menu", role: "listbox" }, { children: ageOptions.map(function (age) { return (_jsx("div", __assign({ className: "dropdown-option ".concat((value === null || value === void 0 ? void 0 : value.toString()) === age ? 'dropdown-option--selected' : ''), onClick: function () { return handleSelect(age); }, role: "option", "aria-selected": (value === null || value === void 0 ? void 0 : value.toString()) === age }, { children: age }), age)); }) })))] }))] })));
|
|
139
139
|
};
|
|
140
140
|
var StepperRow = function (_a) {
|
|
@@ -223,16 +223,25 @@ var RoomEditor = function (_a) {
|
|
|
223
223
|
var teenAgeChunks = chunkAges(room.teenAges || [], 'Teen');
|
|
224
224
|
var childAgeChunks = chunkAges(room.childAges || [], 'Child');
|
|
225
225
|
var infantAgeChunks = chunkAges(room.infantAges || [], 'Infant');
|
|
226
|
-
return (_jsxs("div", __assign({ className: "pax-selector__room-container" }, { children: [_jsxs("div", __assign({ className: "pax-selector__room-header" }, { children: [_jsxs("div", __assign({ className: "pax-selector__room-title" }, { children: [_jsxs(Text, __assign({ size: "lg", variant: "bold", color: "accent", className: "pax-selector__room-name" }, { children: ["Room ", roomNumber] })), _jsx(Icon, { name: "home", size: "md", className: "pax-selector__room-icon" })] })), showRemove && (_jsxs("button", __assign({ type: "button", className: "pax-selector__room-remove", onClick: onRemove, "aria-label": "Remove room ".concat(roomNumber) }, { children: [_jsx(Icon, { name: "close", size: "sm", className: "pax-selector__room-remove-icon" }), _jsx("span", __assign({ className: "pax-selector__room-remove-text" }, { children: "Remove" }))] })))] })), _jsxs("div", __assign({ className: "pax-selector__room-content" }, { children: [_jsxs("div", __assign({ className: "pax-selector__steppers" }, { children: [_jsx(StepperRow, { label: "Adult", value: room.adults, max: maxAdults, onChange: function (val) { return handleFieldChange('adults', val); } }), _jsx(StepperRow, { label: "Teen", value: room.teens, max: maxTeens, onChange: function (val) { return handleFieldChange('teens', val); } }), _jsx(StepperRow, { label: "Child", value: room.children, max: maxChildren, onChange: function (val) { return handleFieldChange('children', val); } }), _jsx(StepperRow, { label: "Infant", value: room.infants, max: maxInfants, onChange: function (val) { return handleFieldChange('infants', val); } })] })), (
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
226
|
+
return (_jsxs("div", __assign({ className: "pax-selector__room-container" }, { children: [_jsxs("div", __assign({ className: "pax-selector__room-header" }, { children: [_jsxs("div", __assign({ className: "pax-selector__room-title" }, { children: [_jsxs(Text, __assign({ size: "lg", variant: "bold", color: "accent", className: "pax-selector__room-name" }, { children: ["Room ", roomNumber] })), _jsx(Icon, { name: "home", size: "md", className: "pax-selector__room-icon" })] })), showRemove && (_jsxs("button", __assign({ type: "button", className: "pax-selector__room-remove", onClick: onRemove, "aria-label": "Remove room ".concat(roomNumber) }, { children: [_jsx(Icon, { name: "close", size: "sm", className: "pax-selector__room-remove-icon" }), _jsx("span", __assign({ className: "pax-selector__room-remove-text" }, { children: "Remove" }))] })))] })), _jsxs("div", __assign({ className: "pax-selector__room-content" }, { children: [_jsxs("div", __assign({ className: "pax-selector__steppers" }, { children: [_jsx(StepperRow, { label: "Adult", value: room.adults, max: maxAdults, onChange: function (val) { return handleFieldChange('adults', val); } }), _jsx(StepperRow, { label: "Teen", value: room.teens, max: maxTeens, onChange: function (val) { return handleFieldChange('teens', val); } }), _jsx(StepperRow, { label: "Child", value: room.children, max: maxChildren, onChange: function (val) { return handleFieldChange('children', val); } }), _jsx(StepperRow, { label: "Infant", value: room.infants, max: maxInfants, onChange: function (val) { return handleFieldChange('infants', val); } })] })), (room.teens > 0 || room.children > 0 || room.infants > 0) && (_jsxs("div", __assign({ className: "pax-selector__age-section" }, { children: [_jsx(Text, __assign({ size: "base", variant: "bold", color: "default", className: "pax-selector__age-section-title" }, { children: "Please specify the age :" })), _jsxs("div", __assign({ className: "pax-selector__age-groups" }, { children: [room.teens > 0 &&
|
|
227
|
+
teenAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
228
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
229
|
+
return (_jsx(AgeSelector, { label: "Teen", value: age, onChange: function (selectedAge) {
|
|
230
|
+
return handleAgeChange('teenAges', actualIndex, selectedAge);
|
|
231
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "teen-".concat(actualIndex)));
|
|
232
|
+
}) }), "teen-chunk-".concat(chunkIndex))); }), room.children > 0 &&
|
|
233
|
+
childAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
234
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
235
|
+
return (_jsx(AgeSelector, { label: "Child", value: age, onChange: function (selectedAge) {
|
|
236
|
+
return handleAgeChange('childAges', actualIndex, selectedAge);
|
|
237
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "child-".concat(actualIndex)));
|
|
238
|
+
}) }), "child-chunk-".concat(chunkIndex))); }), room.infants > 0 &&
|
|
239
|
+
infantAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
240
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
241
|
+
return (_jsx(AgeSelector, { label: "Infant", value: age, onChange: function (selectedAge) {
|
|
242
|
+
return handleAgeChange('infantAges', actualIndex, selectedAge);
|
|
243
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "infant-".concat(actualIndex)));
|
|
244
|
+
}) }), "infant-chunk-".concat(chunkIndex))); })] }))] }))), _jsx(ClientTypeSelector, { value: room.clientType, onChange: function (val) { return handleFieldChange('clientType', val); } })] }))] })));
|
|
236
245
|
};
|
|
237
246
|
var PaxSelector = function (_a) {
|
|
238
247
|
var _b = _a.label, label = _b === void 0 ? 'Number of pax' : _b, value = _a.value, onChange = _a.onChange, onAddRoom = _a.onAddRoom, onDone = _a.onDone, _c = _a.placeholder, placeholder = _c === void 0 ? 'Select pax' : _c, _d = _a.className, className = _d === void 0 ? '' : _d, _e = _a.maxAdults, maxAdults = _e === void 0 ? 10 : _e, _f = _a.maxTeens, maxTeens = _f === void 0 ? 10 : _f, _g = _a.maxChildren, maxChildren = _g === void 0 ? 10 : _g, _h = _a.maxInfants, maxInfants = _h === void 0 ? 10 : _h, _j = _a.showAddRoom, showAddRoom = _j === void 0 ? true : _j, _k = _a.multipleRooms, multipleRooms = _k === void 0 ? false : _k, defaultRooms = _a.defaultRooms, onRoomsChange = _a.onRoomsChange, onRemoveRoom = _a.onRemoveRoom, _l = _a.defaultPaxData, defaultPaxData = _l === void 0 ? DEFAULT_PAX_DATA_WITH_ADULTS : _l;
|
|
@@ -249,7 +258,11 @@ var PaxSelector = function (_a) {
|
|
|
249
258
|
}, [value, multipleRooms]);
|
|
250
259
|
// Initialize with default pax data and trigger onChange on mount
|
|
251
260
|
useEffect(function () {
|
|
252
|
-
if (!hasInitialized.current &&
|
|
261
|
+
if (!hasInitialized.current &&
|
|
262
|
+
!value &&
|
|
263
|
+
defaultPaxData &&
|
|
264
|
+
!multipleRooms &&
|
|
265
|
+
onChange) {
|
|
253
266
|
hasInitialized.current = true;
|
|
254
267
|
onChange(defaultPaxData);
|
|
255
268
|
}
|
|
@@ -354,9 +367,7 @@ var PaxSelector = function (_a) {
|
|
|
354
367
|
};
|
|
355
368
|
var getTotalPax = function () {
|
|
356
369
|
if (multipleRooms) {
|
|
357
|
-
return rooms.reduce(function (total, room) {
|
|
358
|
-
return total + room.adults + room.teens + room.children + room.infants;
|
|
359
|
-
}, 0);
|
|
370
|
+
return rooms.reduce(function (total, room) { return total + room.adults + room.teens + room.children + room.infants; }, 0);
|
|
360
371
|
}
|
|
361
372
|
var adults = internalData.adults, teens = internalData.teens, children = internalData.children, infants = internalData.infants;
|
|
362
373
|
return adults + teens + children + infants;
|
|
@@ -371,7 +382,9 @@ var PaxSelector = function (_a) {
|
|
|
371
382
|
var hasPax = getTotalPax() > 0;
|
|
372
383
|
return (_jsxs("div", __assign({ className: "pax-selector ".concat(className), ref: containerRef }, { children: [_jsxs("button", __assign({ type: "button", className: "pax-selector__trigger", onClick: function () { return setIsOpen(!isOpen); }, "aria-expanded": isOpen, "aria-haspopup": "true" }, { children: [_jsx(Text, __assign({ size: "sm", variant: "regular", className: "pax-selector__label" }, { children: label })), _jsxs("div", __assign({ className: "pax-selector__input ".concat(isOpen ? 'pax-selector__input--active' : '') }, { children: [_jsxs("div", __assign({ className: "pax-selector__input-content" }, { children: [_jsx(Icon, { name: "user-icon", size: "sm", className: "pax-selector__input-icon" }), _jsx("span", __assign({ className: "pax-selector__input-text ".concat(!hasPax ? 'pax-selector__input-placeholder' : '') }, { children: getDisplayText() }))] })), _jsx(Icon, { name: "chevron-down", size: "sm", className: "pax-selector__chevron ".concat(isOpen ? 'pax-selector__chevron--open' : '') })] }))] })), isOpen && (_jsxs("div", __assign({ className: "pax-selector__dropdown" }, { children: [multipleRooms ? (_jsxs(_Fragment, { children: [showAddRoom && (_jsxs("button", __assign({ type: "button", className: "pax-selector__add-room", onClick: handleAddRoom }, { children: [_jsx(Icon, { name: "home", size: "sm", className: "pax-selector__add-room-icon" }), "Add a room", _jsx(Icon, { name: "plus", size: "sm", className: "pax-selector__add-room-icon" })] }))), _jsx("div", __assign({ className: "pax-selector__rooms" }, { children: rooms.map(function (room, index) { return (_jsx(RoomEditor, { room: room, roomNumber: index + 1, showRemove: rooms.length > 1, maxAdults: maxAdults, maxTeens: maxTeens, maxChildren: maxChildren, maxInfants: maxInfants, onChange: function (updatedRoom) { return handleRoomChange(room.roomId, updatedRoom); }, onRemove: function () { return handleRemoveRoom(room.roomId); } }, room.roomId)); }) }))] })) : (
|
|
373
384
|
/* Single Room Mode */
|
|
374
|
-
_jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: "pax-selector__steppers" }, { children: [_jsx(StepperRow, { label: "Adult", value: internalData.adults, max: maxAdults, onChange: function (val) { return handleDataChange('adults', val); } }), _jsx(StepperRow, { label: "Teen", value: internalData.teens, max: maxTeens, onChange: function (val) { return handleDataChange('teens', val); } }), _jsx(StepperRow, { label: "Child", value: internalData.children, max: maxChildren, onChange: function (val) { return handleDataChange('children', val); } }), _jsx(StepperRow, { label: "Infant", value: internalData.infants, max: maxInfants, onChange: function (val) { return handleDataChange('infants', val); } })] })), (
|
|
385
|
+
_jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: "pax-selector__steppers" }, { children: [_jsx(StepperRow, { label: "Adult", value: internalData.adults, max: maxAdults, onChange: function (val) { return handleDataChange('adults', val); } }), _jsx(StepperRow, { label: "Teen", value: internalData.teens, max: maxTeens, onChange: function (val) { return handleDataChange('teens', val); } }), _jsx(StepperRow, { label: "Child", value: internalData.children, max: maxChildren, onChange: function (val) { return handleDataChange('children', val); } }), _jsx(StepperRow, { label: "Infant", value: internalData.infants, max: maxInfants, onChange: function (val) { return handleDataChange('infants', val); } })] })), (internalData.teens > 0 ||
|
|
386
|
+
internalData.children > 0 ||
|
|
387
|
+
internalData.infants > 0) && (_jsxs("div", __assign({ className: "pax-selector__age-section" }, { children: [_jsx(Text, __assign({ size: "base", variant: "bold", color: "default", className: "pax-selector__age-section-title" }, { children: "Please specify the age :" })), _jsx("div", __assign({ className: "pax-selector__age-groups" }, { children: (function () {
|
|
375
388
|
var chunkAges = function (ages, category) {
|
|
376
389
|
var chunks = [];
|
|
377
390
|
for (var i = 0; i < ages.length; i += 2) {
|
|
@@ -387,16 +400,25 @@ var PaxSelector = function (_a) {
|
|
|
387
400
|
ages[index] = age;
|
|
388
401
|
handleDataChange(category, ages);
|
|
389
402
|
};
|
|
390
|
-
return (_jsxs(_Fragment, { children: [internalData.teens > 0 &&
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
403
|
+
return (_jsxs(_Fragment, { children: [internalData.teens > 0 &&
|
|
404
|
+
teenAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
405
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
406
|
+
return (_jsx(AgeSelector, { label: "Teen", value: age, onChange: function (selectedAge) {
|
|
407
|
+
return handleAgeChange('teenAges', actualIndex, selectedAge);
|
|
408
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "teen-".concat(actualIndex)));
|
|
409
|
+
}) }), "teen-chunk-".concat(chunkIndex))); }), internalData.children > 0 &&
|
|
410
|
+
childAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
411
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
412
|
+
return (_jsx(AgeSelector, { label: "Child", value: age, onChange: function (selectedAge) {
|
|
413
|
+
return handleAgeChange('childAges', actualIndex, selectedAge);
|
|
414
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "child-".concat(actualIndex)));
|
|
415
|
+
}) }), "child-chunk-".concat(chunkIndex))); }), internalData.infants > 0 &&
|
|
416
|
+
infantAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
417
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
418
|
+
return (_jsx(AgeSelector, { label: "Infant", value: age, onChange: function (selectedAge) {
|
|
419
|
+
return handleAgeChange('infantAges', actualIndex, selectedAge);
|
|
420
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "infant-".concat(actualIndex)));
|
|
421
|
+
}) }), "infant-chunk-".concat(chunkIndex))); })] }));
|
|
400
422
|
})() }))] }))), _jsx(ClientTypeSelector, { value: internalData.clientType, onChange: function (val) { return handleDataChange('clientType', val); } })] })), _jsxs("div", __assign({ className: "pax-selector__actions" }, { children: [_jsx("button", __assign({ type: "button", className: "pax-selector__clear-btn", onClick: handleClear }, { children: "Clear Pax" })), _jsx("button", __assign({ type: "button", className: "pax-selector__done-btn", onClick: handleDone }, { children: "Done" }))] }))] })))] })));
|
|
401
423
|
};
|
|
402
424
|
export default PaxSelector;
|
|
@@ -33,7 +33,7 @@ function PopoverTrigger(_a) {
|
|
|
33
33
|
}
|
|
34
34
|
function PopoverContent(_a) {
|
|
35
35
|
var className = _a.className, _b = _a.align, align = _b === void 0 ? 'center' : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 4 : _c, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
36
|
-
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, __assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2
|
|
36
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, __assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden border-[var(--color-elevation-state-hover-subtle)] z-[99999]', className) }, props)) }));
|
|
37
37
|
}
|
|
38
38
|
function PopoverAnchor(_a) {
|
|
39
39
|
var props = __rest(_a, []);
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,11 @@ export { default as Slider } from './components/atoms/Slider/Slider';
|
|
|
14
14
|
export { default as Spinner } from './components/atoms/Spinner/Spinner';
|
|
15
15
|
export { Heading, Text } from './components/atoms/Typography/Typography';
|
|
16
16
|
export { DateDisplay } from './components/molecules/DateDisplay/DateDisplay';
|
|
17
|
+
export { DocketPrices } from './components/molecules/DocketPrices/DocketPrices';
|
|
18
|
+
export { PriceDisplay } from './components/molecules/PriceDisplay/PriceDisplay';
|
|
19
|
+
export { TransferDocket } from './components/molecules/TransferDocket/TransferDocket';
|
|
17
20
|
export { ActionDropdown, type ActionDropdownItem, } from './components/molecules/ActionDropdown/ActionDropdown';
|
|
21
|
+
export { AddItemButton } from './components/molecules/AddItemButton/AddItemButton';
|
|
18
22
|
export * from './components/molecules/BookingResume';
|
|
19
23
|
export { Breadcrumbs } from './components/molecules/Breadcrumbs/Breadcrumbs';
|
|
20
24
|
export { default as CalendarInput } from './components/molecules/Calendar/CalendarInput';
|
|
@@ -39,6 +43,7 @@ export * from './components/molecules/BookingPax';
|
|
|
39
43
|
export { DetailsClientInfo } from './components/molecules/DetailsInfo/DetailsClient/DetailsClient';
|
|
40
44
|
export { default as TableServiceItem } from './components/molecules/TableServiceItem';
|
|
41
45
|
export * from './components/organisms/Booking';
|
|
46
|
+
export * from './components/organisms/BookingAddItem';
|
|
42
47
|
export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
|
|
43
48
|
export { CardContainer } from './components/organisms/CardContainer/CardContainer';
|
|
44
49
|
export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
@@ -85,9 +90,13 @@ export type { TopNavigationProps } from './components/organisms/TopNavigation/To
|
|
|
85
90
|
export type { TransferLineData, TransferLineProps, TransferType, } from './components/organisms/TransferLine/TransferLine';
|
|
86
91
|
export type { CheckboxProps } from './components/atoms/Checkbox/Checkbox';
|
|
87
92
|
export type { InputProps } from './components/atoms/Inputs/Input/Input';
|
|
93
|
+
export type { AddItemButtonProps } from './components/molecules/AddItemButton/AddItemButton';
|
|
88
94
|
export type { BreadcrumbsItem, BreadcrumbsProps, } from './components/molecules/Breadcrumbs/Breadcrumbs';
|
|
89
95
|
export type { FromToProps } from './components/molecules/FromTo/FromTo';
|
|
90
96
|
export type { SectionTitleProps } from './components/molecules/SectionTitle/SectionTitle';
|
|
97
|
+
export type { DocketPricesProps } from './components/molecules/DocketPrices/DocketPrices';
|
|
98
|
+
export type { PriceDisplayProps } from './components/molecules/PriceDisplay/PriceDisplay';
|
|
99
|
+
export type { TransferDocketProps } from './components/molecules/TransferDocket/TransferDocket';
|
|
91
100
|
export type { DetailsColProps, ItemColProps, RowAccommodationProps, RowExcursionProps, RowTransferProps, } from './components/molecules/TableServiceItem';
|
|
92
101
|
export type { ServiceAccommodationProps } from './components/molecules/TimelineItem/ServiceAccommodation';
|
|
93
102
|
export type { ServiceExcursionProps } from './components/molecules/TimelineItem/ServiceExcursion';
|
package/dist/index.js
CHANGED
|
@@ -15,8 +15,12 @@ export { default as Slider } from './components/atoms/Slider/Slider';
|
|
|
15
15
|
export { default as Spinner } from './components/atoms/Spinner/Spinner';
|
|
16
16
|
export { Heading, Text } from './components/atoms/Typography/Typography';
|
|
17
17
|
export { DateDisplay } from './components/molecules/DateDisplay/DateDisplay';
|
|
18
|
+
export { DocketPrices } from './components/molecules/DocketPrices/DocketPrices';
|
|
19
|
+
export { PriceDisplay } from './components/molecules/PriceDisplay/PriceDisplay';
|
|
20
|
+
export { TransferDocket } from './components/molecules/TransferDocket/TransferDocket';
|
|
18
21
|
// Molecules - Composed components
|
|
19
22
|
export { ActionDropdown, } from './components/molecules/ActionDropdown/ActionDropdown';
|
|
23
|
+
export { AddItemButton } from './components/molecules/AddItemButton/AddItemButton';
|
|
20
24
|
export * from './components/molecules/BookingResume';
|
|
21
25
|
export { Breadcrumbs } from './components/molecules/Breadcrumbs/Breadcrumbs';
|
|
22
26
|
export { default as CalendarInput } from './components/molecules/Calendar/CalendarInput';
|
|
@@ -42,6 +46,7 @@ export * from './components/molecules/BookingPax';
|
|
|
42
46
|
export { DetailsClientInfo } from './components/molecules/DetailsInfo/DetailsClient/DetailsClient';
|
|
43
47
|
export { default as TableServiceItem } from './components/molecules/TableServiceItem';
|
|
44
48
|
export * from './components/organisms/Booking';
|
|
49
|
+
export * from './components/organisms/BookingAddItem';
|
|
45
50
|
export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
|
|
46
51
|
export { CardContainer } from './components/organisms/CardContainer/CardContainer';
|
|
47
52
|
export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
@@ -2079,7 +2079,8 @@
|
|
|
2079
2079
|
.checkbox-container {
|
|
2080
2080
|
display: inline-flex;
|
|
2081
2081
|
align-items: center;
|
|
2082
|
-
width:
|
|
2082
|
+
width: auto;
|
|
2083
|
+
min-height: 33px;
|
|
2083
2084
|
}
|
|
2084
2085
|
|
|
2085
2086
|
.checkbox-input {
|
|
@@ -2103,7 +2104,7 @@
|
|
|
2103
2104
|
-webkit-user-select: none;
|
|
2104
2105
|
user-select: none;
|
|
2105
2106
|
width: 100%;
|
|
2106
|
-
padding: var(--checkbox-spacing-label-padding, 0.5rem 0.75rem);
|
|
2107
|
+
/* padding: var(--checkbox-spacing-label-padding, 0.5rem 0.75rem); */
|
|
2107
2108
|
border-radius: var(--checkbox-border-radius, 0.375rem);
|
|
2108
2109
|
transition: all var(--checkbox-transition-duration, 0.2s)
|
|
2109
2110
|
var(--checkbox-transition-timing, ease-in-out);
|
|
@@ -2117,8 +2118,8 @@
|
|
|
2117
2118
|
border-radius: var(--checkbox-size-box-border-radius, 0.125rem);
|
|
2118
2119
|
background-color: var(--color-white);
|
|
2119
2120
|
opacity: var(--opacity-opacity-100);
|
|
2120
|
-
top: var(--checkbox-position-top, 0.125rem);
|
|
2121
|
-
left: var(--checkbox-position-left, 0.125rem);
|
|
2121
|
+
/* top: var(--checkbox-position-top, 0.125rem);
|
|
2122
|
+
left: var(--checkbox-position-left, 0.125rem); */
|
|
2122
2123
|
display: flex;
|
|
2123
2124
|
align-items: center;
|
|
2124
2125
|
justify-content: center;
|