mautourco-components 0.2.4 → 0.2.7
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/README.md +190 -190
- package/dist/components/atoms/Avatar/Avatar.d.ts +14 -14
- package/dist/components/atoms/Avatar/Avatar.js +31 -31
- package/dist/components/atoms/Button/Button.css +320 -320
- package/dist/components/atoms/Button/Button.d.ts +27 -27
- package/dist/components/atoms/Button/Button.js +35 -35
- package/dist/components/atoms/Checkbox/Checkbox.d.ts +13 -13
- package/dist/components/atoms/Checkbox/Checkbox.js +39 -39
- package/dist/components/atoms/Icon/Icon.d.ts +10 -10
- package/dist/components/atoms/Icon/Icon.js +123 -123
- package/dist/components/atoms/Icon/icons/ArrivalIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/ArrivalIcon.js +31 -31
- package/dist/components/atoms/Icon/icons/BuildingIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/BuildingIcon.js +36 -36
- package/dist/components/atoms/Icon/icons/CalendarIcon.d.ts +12 -12
- package/dist/components/atoms/Icon/icons/CalendarIcon.js +41 -41
- package/dist/components/atoms/Icon/icons/CalendarOutlineIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/CalendarOutlineIcon.js +36 -36
- package/dist/components/atoms/Icon/icons/CarIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/CarIcon.js +30 -30
- package/dist/components/atoms/Icon/icons/Check.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/Check.js +30 -30
- package/dist/components/atoms/Icon/icons/CheckCircleIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/CheckCircleIcon.js +30 -30
- package/dist/components/atoms/Icon/icons/Chevron.d.ts +9 -9
- package/dist/components/atoms/Icon/icons/Chevron.js +54 -54
- package/dist/components/atoms/Icon/icons/ChevronDownIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/ChevronDownIcon.js +30 -30
- package/dist/components/atoms/Icon/icons/Close.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/Close.js +30 -30
- package/dist/components/atoms/Icon/icons/DeleteIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/DeleteIcon.js +30 -30
- package/dist/components/atoms/Icon/icons/DepartureIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/DepartureIcon.js +30 -30
- package/dist/components/atoms/Icon/icons/EyeIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/EyeIcon.js +30 -30
- package/dist/components/atoms/Icon/icons/FacebookIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/FacebookIcon.js +36 -36
- package/dist/components/atoms/Icon/icons/HomeIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/HomeIcon.js +25 -25
- package/dist/components/atoms/Icon/icons/InfoIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/InfoIcon.js +30 -30
- package/dist/components/atoms/Icon/icons/LinkedInIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/LinkedInIcon.js +36 -36
- package/dist/components/atoms/Icon/icons/MapPinIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/MapPinIcon.js +30 -30
- package/dist/components/atoms/Icon/icons/MautoucoLogo.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/MautoucoLogo.js +37 -37
- package/dist/components/atoms/Icon/icons/MenuIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/MenuIcon.js +37 -37
- package/dist/components/atoms/Icon/icons/MinusIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/MinusIcon.js +25 -25
- package/dist/components/atoms/Icon/icons/MoreIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/MoreIcon.js +30 -30
- package/dist/components/atoms/Icon/icons/PlaneIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/PlaneIcon.js +36 -36
- package/dist/components/atoms/Icon/icons/PlusIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/PlusIcon.js +25 -25
- package/dist/components/atoms/Icon/icons/Search.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/Search.js +30 -30
- package/dist/components/atoms/Icon/icons/Settings.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/Settings.js +30 -30
- package/dist/components/atoms/Icon/icons/ShipIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/ShipIcon.js +36 -36
- package/dist/components/atoms/Icon/icons/StrollerIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/StrollerIcon.js +30 -30
- package/dist/components/atoms/Icon/icons/TwitterIcon.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/TwitterIcon.js +36 -36
- package/dist/components/atoms/Icon/icons/User.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/User.js +30 -30
- package/dist/components/atoms/Icon/icons/UserIcon.d.ts +12 -12
- package/dist/components/atoms/Icon/icons/UserIcon.js +41 -41
- package/dist/components/atoms/Icon/icons/Youtube.d.ts +8 -8
- package/dist/components/atoms/Icon/icons/Youtube.js +36 -36
- package/dist/components/atoms/Illustration/Illustration.d.ts +14 -14
- package/dist/components/atoms/Illustration/Illustration.js +33 -33
- package/dist/components/atoms/Illustration/illustrations.d.ts +51 -51
- package/dist/components/atoms/Illustration/illustrations.js +97 -97
- package/dist/components/atoms/Inputs/DropdownInput/DropdownInput.d.ts +12 -12
- package/dist/components/atoms/Inputs/DropdownInput/DropdownInput.js +53 -53
- package/dist/components/atoms/Inputs/Input/Input.d.ts +15 -15
- package/dist/components/atoms/Inputs/Input/Input.js +27 -27
- package/dist/components/atoms/Inputs/Textarea/Textarea.d.ts +14 -14
- package/dist/components/atoms/Inputs/Textarea/Textarea.js +15 -15
- package/dist/components/atoms/Link/Link.d.ts +44 -44
- package/dist/components/atoms/Link/Link.js +76 -76
- package/dist/components/atoms/RatingStar/RatingStar.d.ts +40 -40
- package/dist/components/atoms/RatingStar/RatingStar.js +54 -54
- package/dist/components/atoms/SegmentedButton/SegmentedButton.d.ts +27 -27
- package/dist/components/atoms/SegmentedButton/SegmentedButton.js +49 -49
- package/dist/components/atoms/SelectedValue/SelectedValue.d.ts +11 -11
- package/dist/components/atoms/SelectedValue/SelectedValue.js +29 -29
- package/dist/components/atoms/Slider/Slider.d.ts +52 -52
- package/dist/components/atoms/Slider/Slider.js +30 -30
- package/dist/components/atoms/Spinner/Spinner.d.ts +9 -9
- package/dist/components/atoms/Spinner/Spinner.js +38 -38
- package/dist/components/atoms/Spinner/variants/ButtonSpinner.d.ts +8 -8
- package/dist/components/atoms/Spinner/variants/ButtonSpinner.js +19 -19
- package/dist/components/atoms/Spinner/variants/LoadingSpinner.d.ts +7 -7
- package/dist/components/atoms/Spinner/variants/LoadingSpinner.js +7 -7
- package/dist/components/atoms/Tab/Tab.css +266 -266
- package/dist/components/atoms/Tab/Tab.d.ts +22 -22
- package/dist/components/atoms/Tab/Tab.js +54 -54
- package/dist/components/atoms/Typography/Typography.d.ts +24 -24
- package/dist/components/atoms/Typography/Typography.js +100 -100
- package/dist/components/molecules/Calendar/CalendarInput.d.ts +34 -34
- package/dist/components/molecules/Calendar/CalendarInput.js +49 -49
- package/dist/components/molecules/Calendar/DateTime.d.ts +25 -25
- package/dist/components/molecules/Calendar/DateTime.js +106 -106
- package/dist/components/molecules/Calendar/TimePicker.d.ts +16 -16
- package/dist/components/molecules/Calendar/TimePicker.js +91 -91
- package/dist/components/molecules/LocationDropdown/LocationDropdown.d.ts +34 -34
- package/dist/components/molecules/LocationDropdown/LocationDropdown.js +120 -120
- package/dist/components/molecules/LocationDropdown/index.d.ts +2 -2
- package/dist/components/molecules/LocationDropdown/index.js +1 -1
- package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.d.ts +29 -29
- package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.js +106 -106
- package/dist/components/molecules/RatingTab/RatingTab.d.ts +39 -39
- package/dist/components/molecules/RatingTab/RatingTab.js +41 -41
- package/dist/components/molecules/TabGroup/TabGroup.d.ts +17 -17
- package/dist/components/molecules/TabGroup/TabGroup.js +30 -30
- package/dist/components/molecules/UserCard/UserCard.d.ts +20 -20
- package/dist/components/molecules/UserCard/UserCard.js +57 -57
- package/dist/components/organisms/CardContainer/CardContainer.d.ts +37 -37
- package/dist/components/organisms/CardContainer/CardContainer.js +27 -27
- package/dist/components/organisms/DateTimePicker/DateTimePicker.d.ts +15 -15
- package/dist/components/organisms/DateTimePicker/DateTimePicker.js +66 -66
- package/dist/components/organisms/Dialog/Dialog.d.ts +103 -103
- package/dist/components/organisms/Dialog/Dialog.js +162 -162
- package/dist/components/organisms/Footer/Footer.d.ts +38 -38
- package/dist/components/organisms/Footer/Footer.js +74 -74
- package/dist/components/organisms/PaxSelector/PaxSelector.d.ts +63 -63
- package/dist/components/organisms/PaxSelector/PaxSelector.js +402 -402
- package/dist/components/organisms/RoundTrip/RoundTrip.d.ts +54 -54
- package/dist/components/organisms/RoundTrip/RoundTrip.js +179 -179
- package/dist/components/organisms/RoundTrip/index.d.ts +2 -2
- package/dist/components/organisms/RoundTrip/index.js +1 -1
- package/dist/components/organisms/SearchBarTransfer/SearchBarTransfer.d.ts +35 -35
- package/dist/components/organisms/SearchBarTransfer/SearchBarTransfer.js +192 -192
- package/dist/components/organisms/SearchBarTransfer/index.d.ts +2 -2
- package/dist/components/organisms/SearchBarTransfer/index.js +1 -1
- package/dist/components/organisms/TopNavigation/DesktopNav.d.ts +33 -33
- package/dist/components/organisms/TopNavigation/DesktopNav.js +32 -26
- package/dist/components/organisms/TopNavigation/MobileNav.d.ts +32 -32
- package/dist/components/organisms/TopNavigation/MobileNav.js +45 -45
- package/dist/components/organisms/TopNavigation/TopNavigation.d.ts +33 -33
- package/dist/components/organisms/TopNavigation/TopNavigation.js +20 -20
- package/dist/components/organisms/TransferLine/TransferLine.d.ts +53 -53
- package/dist/components/organisms/TransferLine/TransferLine.js +179 -179
- package/dist/components/ui/button.d.ts +10 -10
- package/dist/components/ui/button.js +56 -56
- package/dist/components/ui/calendar.d.ts +8 -8
- package/dist/components/ui/calendar.js +87 -87
- package/dist/components/ui/popover.d.ts +7 -7
- package/dist/components/ui/popover.js +42 -42
- package/dist/hooks/useMobile.d.ts +5 -5
- package/dist/hooks/useMobile.js +26 -26
- package/dist/index.d.ts +49 -49
- package/dist/index.js +46 -46
- package/dist/lib/utils.d.ts +7 -7
- package/dist/lib/utils.js +13 -13
- package/dist/styles/components/avatar.css +122 -122
- package/dist/styles/components/calendar.css +140 -140
- package/dist/styles/components/checkbox.css +206 -206
- package/dist/styles/components/dropdown.css +269 -269
- package/dist/styles/components/forms.css +209 -209
- package/dist/styles/components/illustration.css +123 -123
- package/dist/styles/components/molecule/calendarInput.css +133 -133
- package/dist/styles/components/molecule/dateTime.css +126 -126
- package/dist/styles/components/molecule/location-dropdown.css +132 -132
- package/dist/styles/components/molecule/timePicker.css +122 -122
- package/dist/styles/components/multiselect-dropdown.css +286 -286
- package/dist/styles/components/organism/card-container.css +148 -148
- package/dist/styles/components/organism/dialog.css +168 -168
- package/dist/styles/components/organism/footer.css +119 -119
- package/dist/styles/components/organism/pax-selector.css +617 -617
- package/dist/styles/components/organism/round-trip.css +139 -139
- package/dist/styles/components/organism/search-bar-transfer.css +158 -161
- package/dist/styles/components/organism/topnavigation.css +143 -143
- package/dist/styles/components/organism/transfer-line.css +138 -138
- package/dist/styles/components/rating-star.css +145 -145
- package/dist/styles/components/rating-tab.css +179 -179
- package/dist/styles/components/scrollbar.css +155 -155
- package/dist/styles/components/segmented-button.css +214 -214
- package/dist/styles/components/selected-value.css +175 -175
- package/dist/styles/components/slider.css +182 -182
- package/dist/styles/components/typography.css +245 -245
- package/dist/styles/tokens/tokens.css +119 -119
- package/dist/styles/tokens/tokens.d.ts +3108 -3108
- package/dist/styles/tokens/tokens.js +2652 -2652
- package/package.json +103 -103
- package/src/components/atoms/Avatar/Avatar.tsx +60 -60
- package/src/components/atoms/Button/Button.css +200 -200
- package/src/components/atoms/Button/Button.tsx +82 -82
- package/src/components/atoms/Checkbox/Checkbox.tsx +83 -83
- package/src/components/atoms/Icon/Icon.tsx +163 -163
- package/src/components/atoms/Icon/icons/ArrivalIcon.tsx +52 -52
- package/src/components/atoms/Icon/icons/BuildingIcon.tsx +50 -50
- package/src/components/atoms/Icon/icons/CalendarIcon.tsx +63 -63
- package/src/components/atoms/Icon/icons/CalendarOutlineIcon.tsx +50 -50
- package/src/components/atoms/Icon/icons/CarIcon.tsx +44 -44
- package/src/components/atoms/Icon/icons/Check.tsx +36 -36
- package/src/components/atoms/Icon/icons/CheckCircleIcon.tsx +48 -48
- package/src/components/atoms/Icon/icons/Chevron.tsx +73 -73
- package/src/components/atoms/Icon/icons/ChevronDownIcon.tsx +46 -46
- package/src/components/atoms/Icon/icons/Close.tsx +39 -39
- package/src/components/atoms/Icon/icons/DeleteIcon.tsx +44 -44
- package/src/components/atoms/Icon/icons/DepartureIcon.tsx +50 -50
- package/src/components/atoms/Icon/icons/EyeIcon.tsx +44 -44
- package/src/components/atoms/Icon/icons/FacebookIcon.tsx +50 -50
- package/src/components/atoms/Icon/icons/HomeIcon.tsx +52 -52
- package/src/components/atoms/Icon/icons/InfoIcon.tsx +44 -44
- package/src/components/atoms/Icon/icons/LinkedInIcon.tsx +50 -50
- package/src/components/atoms/Icon/icons/MapPinIcon.tsx +44 -44
- package/src/components/atoms/Icon/icons/MautoucoLogo.tsx +93 -93
- package/src/components/atoms/Icon/icons/MenuIcon.tsx +49 -49
- package/src/components/atoms/Icon/icons/MinusIcon.tsx +45 -45
- package/src/components/atoms/Icon/icons/MoreIcon.tsx +44 -44
- package/src/components/atoms/Icon/icons/PlaneIcon.tsx +50 -50
- package/src/components/atoms/Icon/icons/PlusIcon.tsx +45 -45
- package/src/components/atoms/Icon/icons/Search.tsx +37 -37
- package/src/components/atoms/Icon/icons/Settings.tsx +38 -38
- package/src/components/atoms/Icon/icons/ShipIcon.tsx +50 -50
- package/src/components/atoms/Icon/icons/StrollerIcon.tsx +44 -44
- package/src/components/atoms/Icon/icons/TwitterIcon.tsx +50 -50
- package/src/components/atoms/Icon/icons/User.tsx +37 -37
- package/src/components/atoms/Icon/icons/UserIcon.tsx +63 -63
- package/src/components/atoms/Icon/icons/Youtube.tsx +50 -50
- package/src/components/atoms/Illustration/Illustration.tsx +28 -28
- package/src/components/atoms/Illustration/illustrations.ts +116 -116
- package/src/components/atoms/Inputs/DropdownInput/DropdownInput.tsx +96 -96
- package/src/components/atoms/Inputs/Textarea/Textarea.tsx +51 -51
- package/src/components/atoms/Link/Link.tsx +168 -168
- package/src/components/atoms/RatingStar/RatingStar.tsx +114 -114
- package/src/components/atoms/SegmentedButton/SegmentedButton.tsx +94 -94
- package/src/components/atoms/SelectedValue/SelectedValue.tsx +59 -59
- package/src/components/atoms/Slider/Slider.tsx +95 -95
- package/src/components/atoms/Spinner/Spinner.tsx +56 -56
- package/src/components/atoms/Spinner/variants/ButtonSpinner.tsx +37 -37
- package/src/components/atoms/Spinner/variants/LoadingSpinner.tsx +22 -22
- package/src/components/atoms/Tab/Tab.css +147 -147
- package/src/components/atoms/Tab/Tab.tsx +96 -96
- package/src/components/atoms/Typography/Typography.tsx +153 -153
- package/src/components/molecules/Calendar/CalendarInput.tsx +135 -135
- package/src/components/molecules/Calendar/DateTime.tsx +172 -172
- package/src/components/molecules/Calendar/TimePicker.tsx +174 -174
- package/src/components/molecules/LocationDropdown/LocationDropdown.tsx +234 -234
- package/src/components/molecules/LocationDropdown/index.ts +2 -2
- package/src/components/molecules/RatingTab/RatingTab.tsx +96 -96
- package/src/components/molecules/TabGroup/TabGroup.tsx +60 -60
- package/src/components/molecules/UserCard/UserCard.stories.tsx +36 -36
- package/src/components/molecules/UserCard/UserCard.tsx +173 -173
- package/src/components/organisms/CardContainer/CardContainer.tsx +66 -66
- package/src/components/organisms/DateTimePicker/DateTimePicker.tsx +110 -110
- package/src/components/organisms/Dialog/Dialog.tsx +352 -352
- package/src/components/organisms/Footer/Footer.tsx +290 -290
- package/src/components/organisms/PaxSelector/PaxSelector.tsx +979 -979
- package/src/components/organisms/RoundTrip/RoundTrip.tsx +335 -335
- package/src/components/organisms/RoundTrip/index.ts +2 -2
- package/src/components/organisms/SearchBarTransfer/SearchBarTransfer.tsx +388 -388
- package/src/components/organisms/SearchBarTransfer/index.ts +2 -2
- package/src/components/organisms/TopNavigation/DesktopNav.tsx +133 -122
- package/src/components/organisms/TopNavigation/MobileNav.tsx +212 -212
- package/src/components/organisms/TopNavigation/TopNavigation.tsx +45 -45
- package/src/components/organisms/TransferLine/TransferLine.tsx +369 -369
- package/src/components/ui/button.tsx +60 -60
- package/src/components/ui/calendar.tsx +246 -246
- package/src/components/ui/popover.tsx +46 -46
- package/src/styles/components/avatar.css +58 -58
- package/src/styles/components/calendar.css +85 -85
- package/src/styles/components/checkbox.css +130 -130
- package/src/styles/components/dropdown.css +214 -214
- package/src/styles/components/forms.css +147 -147
- package/src/styles/components/illustration.css +7 -7
- package/src/styles/components/molecule/calendarInput.css +156 -156
- package/src/styles/components/molecule/dateTime.css +14 -14
- package/src/styles/components/molecule/location-dropdown.css +204 -204
- package/src/styles/components/molecule/timePicker.css +78 -78
- package/src/styles/components/multiselect-dropdown.css +230 -230
- package/src/styles/components/organism/card-container.css +49 -49
- package/src/styles/components/organism/dialog.css +241 -241
- package/src/styles/components/organism/footer.css +113 -113
- package/src/styles/components/organism/pax-selector.css +702 -702
- package/src/styles/components/organism/round-trip.css +55 -55
- package/src/styles/components/organism/search-bar-transfer.css +128 -127
- package/src/styles/components/organism/topnavigation.css +161 -161
- package/src/styles/components/organism/transfer-line.css +86 -86
- package/src/styles/components/rating-star.css +39 -39
- package/src/styles/components/rating-tab.css +83 -83
- package/src/styles/components/scrollbar.css +63 -63
- package/src/styles/components/segmented-button.css +134 -134
- package/src/styles/components/selected-value.css +80 -80
- package/src/styles/components/slider.css +86 -86
- package/src/styles/components/typography.css +251 -251
- package/src/styles/fonts.css +50 -0
- package/src/styles/tokens/tokens.css +119 -119
- package/src/styles/tokens/tokens.js +12 -6
|
@@ -1,179 +1,179 @@
|
|
|
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
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
-
if (ar || !(i in from)) {
|
|
15
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
-
ar[i] = from[i];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
-
};
|
|
21
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
-
import React, { useState } from "react";
|
|
23
|
-
import Icon from "../../atoms/Icon/Icon";
|
|
24
|
-
import { Text } from "../../atoms/Typography/Typography";
|
|
25
|
-
import PaxSelector from "../PaxSelector/PaxSelector";
|
|
26
|
-
import DateTimePicker from "../DateTimePicker/DateTimePicker";
|
|
27
|
-
import LocationDropdown from "../../molecules/LocationDropdown/LocationDropdown";
|
|
28
|
-
import "../../../styles/components/organism/transfer-line.css";
|
|
29
|
-
var TransferLine = function (_a) {
|
|
30
|
-
var id = _a.id, type = _a.type, paxData = _a.paxData, transferDate = _a.transferDate, pickupPoint = _a.pickupPoint, dropoffPoint = _a.dropoffPoint, _b = _a.locations, locations = _b === void 0 ? { options: [], groups: [] } : _b, onPaxChange = _a.onPaxChange, onDateChange = _a.onDateChange, onPickupChange = _a.onPickupChange, onDropoffChange = _a.onDropoffChange, onDataChange = _a.onDataChange, onDelete = _a.onDelete, _c = _a.showDelete, showDelete = _c === void 0 ? true : _c, _d = _a.showTitle, showTitle = _d === void 0 ? false : _d, _e = _a.className, className = _e === void 0 ? "" : _e;
|
|
31
|
-
var _f = useState(paxData), internalPaxData = _f[0], setInternalPaxData = _f[1];
|
|
32
|
-
var _g = useState(transferDate), internalTransferDate = _g[0], setInternalTransferDate = _g[1];
|
|
33
|
-
var _h = useState(null), internalPickupPoint = _h[0], setInternalPickupPoint = _h[1];
|
|
34
|
-
var _j = useState(null), internalDropoffPoint = _j[0], setInternalDropoffPoint = _j[1];
|
|
35
|
-
// Helper function to get all locations (from options and groups)
|
|
36
|
-
var getAllLocations = function (options, groups) {
|
|
37
|
-
var groupOptions = groups.flatMap(function (group) { return group.options; });
|
|
38
|
-
return __spreadArray(__spreadArray([], options, true), groupOptions, true);
|
|
39
|
-
};
|
|
40
|
-
// Filter locations based on transfer type and position (pickup/dropoff)
|
|
41
|
-
var filterLocations = function (position) {
|
|
42
|
-
var allOptions = locations.options || [];
|
|
43
|
-
var allGroups = locations.groups || [];
|
|
44
|
-
var filterTypes = [];
|
|
45
|
-
if (type === 'arrival') {
|
|
46
|
-
filterTypes = position === 'pickup' ? ['airport', 'port'] : ['accommodation'];
|
|
47
|
-
}
|
|
48
|
-
else if (type === 'departure') {
|
|
49
|
-
filterTypes = position === 'pickup' ? ['accommodation'] : ['airport', 'port'];
|
|
50
|
-
}
|
|
51
|
-
else if (type === 'inter-hotel') {
|
|
52
|
-
filterTypes = ['accommodation'];
|
|
53
|
-
}
|
|
54
|
-
var filteredOptions = allOptions.filter(function (opt) { return filterTypes.includes(opt.type); });
|
|
55
|
-
var filteredGroups = allGroups
|
|
56
|
-
.map(function (group) { return (__assign(__assign({}, group), { options: group.options.filter(function (opt) { return filterTypes.includes(opt.type); }) })); })
|
|
57
|
-
.filter(function (group) { return group.options.length > 0; });
|
|
58
|
-
return { options: filteredOptions, groups: filteredGroups };
|
|
59
|
-
};
|
|
60
|
-
// Get default location (first airport for arrival/departure)
|
|
61
|
-
var getDefaultLocation = function (position) {
|
|
62
|
-
var _a = filterLocations(position), options = _a.options, groups = _a.groups;
|
|
63
|
-
var allLocations = getAllLocations(options, groups);
|
|
64
|
-
// For arrival pickup or departure dropoff, default to first airport
|
|
65
|
-
if ((type === 'arrival' && position === 'pickup') || (type === 'departure' && position === 'dropoff')) {
|
|
66
|
-
return allLocations.find(function (loc) { return loc.type === 'airport'; }) || allLocations[0] || null;
|
|
67
|
-
}
|
|
68
|
-
return null;
|
|
69
|
-
};
|
|
70
|
-
// Initialize location data from IDs or set defaults
|
|
71
|
-
React.useEffect(function () {
|
|
72
|
-
var _a = filterLocations('pickup'), options = _a.options, groups = _a.groups;
|
|
73
|
-
var allPickupLocations = getAllLocations(options, groups);
|
|
74
|
-
if (pickupPoint) {
|
|
75
|
-
var location_1 = allPickupLocations.find(function (loc) { return loc.id === pickupPoint; });
|
|
76
|
-
if (location_1) {
|
|
77
|
-
setInternalPickupPoint({
|
|
78
|
-
id: location_1.id,
|
|
79
|
-
locationName: location_1.label,
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
// Set default location if applicable
|
|
85
|
-
var defaultLocation = getDefaultLocation('pickup');
|
|
86
|
-
if (defaultLocation) {
|
|
87
|
-
var defaultData = {
|
|
88
|
-
id: defaultLocation.id,
|
|
89
|
-
locationName: defaultLocation.label,
|
|
90
|
-
};
|
|
91
|
-
setInternalPickupPoint(defaultData);
|
|
92
|
-
onPickupChange === null || onPickupChange === void 0 ? void 0 : onPickupChange(defaultData);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
96
|
-
}, [pickupPoint, type, locations]);
|
|
97
|
-
React.useEffect(function () {
|
|
98
|
-
var _a = filterLocations('dropoff'), options = _a.options, groups = _a.groups;
|
|
99
|
-
var allDropoffLocations = getAllLocations(options, groups);
|
|
100
|
-
if (dropoffPoint) {
|
|
101
|
-
var location_2 = allDropoffLocations.find(function (loc) { return loc.id === dropoffPoint; });
|
|
102
|
-
if (location_2) {
|
|
103
|
-
setInternalDropoffPoint({
|
|
104
|
-
id: location_2.id,
|
|
105
|
-
locationName: location_2.label,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
// Set default location if applicable
|
|
111
|
-
var defaultLocation = getDefaultLocation('dropoff');
|
|
112
|
-
if (defaultLocation) {
|
|
113
|
-
var defaultData = {
|
|
114
|
-
id: defaultLocation.id,
|
|
115
|
-
locationName: defaultLocation.label,
|
|
116
|
-
};
|
|
117
|
-
setInternalDropoffPoint(defaultData);
|
|
118
|
-
onDropoffChange === null || onDropoffChange === void 0 ? void 0 : onDropoffChange(defaultData);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122
|
-
}, [dropoffPoint, type, locations]);
|
|
123
|
-
// Update complete data whenever any field changes
|
|
124
|
-
React.useEffect(function () {
|
|
125
|
-
var completeData = {
|
|
126
|
-
id: id,
|
|
127
|
-
type: type,
|
|
128
|
-
paxData: internalPaxData,
|
|
129
|
-
transferDate: internalTransferDate,
|
|
130
|
-
pickupPoint: internalPickupPoint || undefined,
|
|
131
|
-
dropoffPoint: internalDropoffPoint || undefined,
|
|
132
|
-
};
|
|
133
|
-
onDataChange === null || onDataChange === void 0 ? void 0 : onDataChange(completeData);
|
|
134
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
135
|
-
}, [id, type, internalPaxData, internalTransferDate, internalPickupPoint, internalDropoffPoint]);
|
|
136
|
-
var getTypeIcon = function () {
|
|
137
|
-
switch (type) {
|
|
138
|
-
case "arrival":
|
|
139
|
-
return "arrival";
|
|
140
|
-
case "departure":
|
|
141
|
-
return "departure";
|
|
142
|
-
case "inter-hotel":
|
|
143
|
-
return "building";
|
|
144
|
-
default:
|
|
145
|
-
return "arrival";
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
var getTypeLabel = function () {
|
|
149
|
-
switch (type) {
|
|
150
|
-
case "arrival":
|
|
151
|
-
return "Arrival";
|
|
152
|
-
case "departure":
|
|
153
|
-
return "Departure";
|
|
154
|
-
case "inter-hotel":
|
|
155
|
-
return "Inter-Hotel";
|
|
156
|
-
default:
|
|
157
|
-
return "Transfer";
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
var handlePaxChange = function (newPaxData) {
|
|
161
|
-
setInternalPaxData(newPaxData);
|
|
162
|
-
onPaxChange === null || onPaxChange === void 0 ? void 0 : onPaxChange(newPaxData);
|
|
163
|
-
};
|
|
164
|
-
var handleDateChange = function (newDate) {
|
|
165
|
-
var dateValue = Array.isArray(newDate) ? newDate[0] : newDate;
|
|
166
|
-
setInternalTransferDate(dateValue);
|
|
167
|
-
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(dateValue);
|
|
168
|
-
};
|
|
169
|
-
var handlePickupChange = function (location) {
|
|
170
|
-
setInternalPickupPoint(location);
|
|
171
|
-
onPickupChange === null || onPickupChange === void 0 ? void 0 : onPickupChange(location);
|
|
172
|
-
};
|
|
173
|
-
var handleDropoffChange = function (location) {
|
|
174
|
-
setInternalDropoffPoint(location);
|
|
175
|
-
onDropoffChange === null || onDropoffChange === void 0 ? void 0 : onDropoffChange(location);
|
|
176
|
-
};
|
|
177
|
-
return (_jsxs("div", __assign({ className: "transfer-line transfer-line--".concat(type, " ").concat(className), "data-transfer-id": id }, { children: [showTitle && (_jsxs("div", __assign({ className: "transfer-line__header" }, { children: [_jsx(Icon, { name: getTypeIcon(), size: "sm", className: "transfer-line__header-icon" }), _jsx(Text, __assign({ size: "sm", variant: "medium", className: "transfer-line__header-label" }, { children: getTypeLabel() }))] }))), _jsxs("div", __assign({ className: "transfer-line__content-container" }, { children: [_jsxs("div", __assign({ className: "transfer-line__content" }, { children: [_jsx("div", __assign({ className: "transfer-line__field transfer-line__field--pax" }, { children: _jsx(PaxSelector, { label: "Number of pax", value: internalPaxData, onChange: handlePaxChange, placeholder: "2 pax" }) })), _jsxs("div", __assign({ className: "transfer-line__field transfer-line__field--date" }, { children: [_jsx(Text, __assign({ size: "sm", variant: "regular", className: "transfer-line__field-label" }, { children: "Transfer date" })), _jsx(DateTimePicker, { placeholder: "DD/MM/YYYY", mode: "calendar", iconPosition: "left", numberOfMonths: 1, iconBGFull: false, showChevron: true, onValueChange: handleDateChange, selectionMode: "single" })] })), _jsx("div", __assign({ className: "transfer-line__field transfer-line__field--pickup" }, { children: _jsx(LocationDropdown, { label: "Pick-up point", options: filterLocations('pickup').options, groups: filterLocations('pickup').groups, selectedValue: (internalPickupPoint === null || internalPickupPoint === void 0 ? void 0 : internalPickupPoint.id) || null, onSelectionChange: handlePickupChange, placeholder: "Select a pick-up point", direction: "pickup", type: type === 'inter-hotel' ? 'accommodation' : type === 'arrival' ? 'airport-port' : 'accommodation', showGroupTitles: false }) })), _jsx("div", __assign({ className: "transfer-line__field transfer-line__field--dropoff" }, { children: _jsx(LocationDropdown, { label: "Drop-off point", options: filterLocations('dropoff').options, groups: filterLocations('dropoff').groups, selectedValue: (internalDropoffPoint === null || internalDropoffPoint === void 0 ? void 0 : internalDropoffPoint.id) || null, onSelectionChange: handleDropoffChange, placeholder: "Select a drop-off point", direction: "dropoff", type: type === 'inter-hotel' ? 'accommodation' : type === 'departure' ? 'airport-port' : 'accommodation', showGroupTitles: false }) }))] })), showDelete && (_jsx("div", __assign({ className: "transfer-line__delete" }, { children: _jsx("button", __assign({ type: "button", className: "transfer-line__delete-btn", onClick: onDelete, "aria-label": "Delete transfer line" }, { children: _jsx(Icon, { name: "delete", size: "sm", className: "transfer-line__delete-icon" }) })) })))] }))] })));
|
|
178
|
-
};
|
|
179
|
-
export default TransferLine;
|
|
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
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import React, { useState } from "react";
|
|
23
|
+
import Icon from "../../atoms/Icon/Icon";
|
|
24
|
+
import { Text } from "../../atoms/Typography/Typography";
|
|
25
|
+
import PaxSelector from "../PaxSelector/PaxSelector";
|
|
26
|
+
import DateTimePicker from "../DateTimePicker/DateTimePicker";
|
|
27
|
+
import LocationDropdown from "../../molecules/LocationDropdown/LocationDropdown";
|
|
28
|
+
import "../../../styles/components/organism/transfer-line.css";
|
|
29
|
+
var TransferLine = function (_a) {
|
|
30
|
+
var id = _a.id, type = _a.type, paxData = _a.paxData, transferDate = _a.transferDate, pickupPoint = _a.pickupPoint, dropoffPoint = _a.dropoffPoint, _b = _a.locations, locations = _b === void 0 ? { options: [], groups: [] } : _b, onPaxChange = _a.onPaxChange, onDateChange = _a.onDateChange, onPickupChange = _a.onPickupChange, onDropoffChange = _a.onDropoffChange, onDataChange = _a.onDataChange, onDelete = _a.onDelete, _c = _a.showDelete, showDelete = _c === void 0 ? true : _c, _d = _a.showTitle, showTitle = _d === void 0 ? false : _d, _e = _a.className, className = _e === void 0 ? "" : _e;
|
|
31
|
+
var _f = useState(paxData), internalPaxData = _f[0], setInternalPaxData = _f[1];
|
|
32
|
+
var _g = useState(transferDate), internalTransferDate = _g[0], setInternalTransferDate = _g[1];
|
|
33
|
+
var _h = useState(null), internalPickupPoint = _h[0], setInternalPickupPoint = _h[1];
|
|
34
|
+
var _j = useState(null), internalDropoffPoint = _j[0], setInternalDropoffPoint = _j[1];
|
|
35
|
+
// Helper function to get all locations (from options and groups)
|
|
36
|
+
var getAllLocations = function (options, groups) {
|
|
37
|
+
var groupOptions = groups.flatMap(function (group) { return group.options; });
|
|
38
|
+
return __spreadArray(__spreadArray([], options, true), groupOptions, true);
|
|
39
|
+
};
|
|
40
|
+
// Filter locations based on transfer type and position (pickup/dropoff)
|
|
41
|
+
var filterLocations = function (position) {
|
|
42
|
+
var allOptions = locations.options || [];
|
|
43
|
+
var allGroups = locations.groups || [];
|
|
44
|
+
var filterTypes = [];
|
|
45
|
+
if (type === 'arrival') {
|
|
46
|
+
filterTypes = position === 'pickup' ? ['airport', 'port'] : ['accommodation'];
|
|
47
|
+
}
|
|
48
|
+
else if (type === 'departure') {
|
|
49
|
+
filterTypes = position === 'pickup' ? ['accommodation'] : ['airport', 'port'];
|
|
50
|
+
}
|
|
51
|
+
else if (type === 'inter-hotel') {
|
|
52
|
+
filterTypes = ['accommodation'];
|
|
53
|
+
}
|
|
54
|
+
var filteredOptions = allOptions.filter(function (opt) { return filterTypes.includes(opt.type); });
|
|
55
|
+
var filteredGroups = allGroups
|
|
56
|
+
.map(function (group) { return (__assign(__assign({}, group), { options: group.options.filter(function (opt) { return filterTypes.includes(opt.type); }) })); })
|
|
57
|
+
.filter(function (group) { return group.options.length > 0; });
|
|
58
|
+
return { options: filteredOptions, groups: filteredGroups };
|
|
59
|
+
};
|
|
60
|
+
// Get default location (first airport for arrival/departure)
|
|
61
|
+
var getDefaultLocation = function (position) {
|
|
62
|
+
var _a = filterLocations(position), options = _a.options, groups = _a.groups;
|
|
63
|
+
var allLocations = getAllLocations(options, groups);
|
|
64
|
+
// For arrival pickup or departure dropoff, default to first airport
|
|
65
|
+
if ((type === 'arrival' && position === 'pickup') || (type === 'departure' && position === 'dropoff')) {
|
|
66
|
+
return allLocations.find(function (loc) { return loc.type === 'airport'; }) || allLocations[0] || null;
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
};
|
|
70
|
+
// Initialize location data from IDs or set defaults
|
|
71
|
+
React.useEffect(function () {
|
|
72
|
+
var _a = filterLocations('pickup'), options = _a.options, groups = _a.groups;
|
|
73
|
+
var allPickupLocations = getAllLocations(options, groups);
|
|
74
|
+
if (pickupPoint) {
|
|
75
|
+
var location_1 = allPickupLocations.find(function (loc) { return loc.id === pickupPoint; });
|
|
76
|
+
if (location_1) {
|
|
77
|
+
setInternalPickupPoint({
|
|
78
|
+
id: location_1.id,
|
|
79
|
+
locationName: location_1.label,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
// Set default location if applicable
|
|
85
|
+
var defaultLocation = getDefaultLocation('pickup');
|
|
86
|
+
if (defaultLocation) {
|
|
87
|
+
var defaultData = {
|
|
88
|
+
id: defaultLocation.id,
|
|
89
|
+
locationName: defaultLocation.label,
|
|
90
|
+
};
|
|
91
|
+
setInternalPickupPoint(defaultData);
|
|
92
|
+
onPickupChange === null || onPickupChange === void 0 ? void 0 : onPickupChange(defaultData);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
96
|
+
}, [pickupPoint, type, locations]);
|
|
97
|
+
React.useEffect(function () {
|
|
98
|
+
var _a = filterLocations('dropoff'), options = _a.options, groups = _a.groups;
|
|
99
|
+
var allDropoffLocations = getAllLocations(options, groups);
|
|
100
|
+
if (dropoffPoint) {
|
|
101
|
+
var location_2 = allDropoffLocations.find(function (loc) { return loc.id === dropoffPoint; });
|
|
102
|
+
if (location_2) {
|
|
103
|
+
setInternalDropoffPoint({
|
|
104
|
+
id: location_2.id,
|
|
105
|
+
locationName: location_2.label,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
// Set default location if applicable
|
|
111
|
+
var defaultLocation = getDefaultLocation('dropoff');
|
|
112
|
+
if (defaultLocation) {
|
|
113
|
+
var defaultData = {
|
|
114
|
+
id: defaultLocation.id,
|
|
115
|
+
locationName: defaultLocation.label,
|
|
116
|
+
};
|
|
117
|
+
setInternalDropoffPoint(defaultData);
|
|
118
|
+
onDropoffChange === null || onDropoffChange === void 0 ? void 0 : onDropoffChange(defaultData);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122
|
+
}, [dropoffPoint, type, locations]);
|
|
123
|
+
// Update complete data whenever any field changes
|
|
124
|
+
React.useEffect(function () {
|
|
125
|
+
var completeData = {
|
|
126
|
+
id: id,
|
|
127
|
+
type: type,
|
|
128
|
+
paxData: internalPaxData,
|
|
129
|
+
transferDate: internalTransferDate,
|
|
130
|
+
pickupPoint: internalPickupPoint || undefined,
|
|
131
|
+
dropoffPoint: internalDropoffPoint || undefined,
|
|
132
|
+
};
|
|
133
|
+
onDataChange === null || onDataChange === void 0 ? void 0 : onDataChange(completeData);
|
|
134
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
135
|
+
}, [id, type, internalPaxData, internalTransferDate, internalPickupPoint, internalDropoffPoint]);
|
|
136
|
+
var getTypeIcon = function () {
|
|
137
|
+
switch (type) {
|
|
138
|
+
case "arrival":
|
|
139
|
+
return "arrival";
|
|
140
|
+
case "departure":
|
|
141
|
+
return "departure";
|
|
142
|
+
case "inter-hotel":
|
|
143
|
+
return "building";
|
|
144
|
+
default:
|
|
145
|
+
return "arrival";
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
var getTypeLabel = function () {
|
|
149
|
+
switch (type) {
|
|
150
|
+
case "arrival":
|
|
151
|
+
return "Arrival";
|
|
152
|
+
case "departure":
|
|
153
|
+
return "Departure";
|
|
154
|
+
case "inter-hotel":
|
|
155
|
+
return "Inter-Hotel";
|
|
156
|
+
default:
|
|
157
|
+
return "Transfer";
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
var handlePaxChange = function (newPaxData) {
|
|
161
|
+
setInternalPaxData(newPaxData);
|
|
162
|
+
onPaxChange === null || onPaxChange === void 0 ? void 0 : onPaxChange(newPaxData);
|
|
163
|
+
};
|
|
164
|
+
var handleDateChange = function (newDate) {
|
|
165
|
+
var dateValue = Array.isArray(newDate) ? newDate[0] : newDate;
|
|
166
|
+
setInternalTransferDate(dateValue);
|
|
167
|
+
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(dateValue);
|
|
168
|
+
};
|
|
169
|
+
var handlePickupChange = function (location) {
|
|
170
|
+
setInternalPickupPoint(location);
|
|
171
|
+
onPickupChange === null || onPickupChange === void 0 ? void 0 : onPickupChange(location);
|
|
172
|
+
};
|
|
173
|
+
var handleDropoffChange = function (location) {
|
|
174
|
+
setInternalDropoffPoint(location);
|
|
175
|
+
onDropoffChange === null || onDropoffChange === void 0 ? void 0 : onDropoffChange(location);
|
|
176
|
+
};
|
|
177
|
+
return (_jsxs("div", __assign({ className: "transfer-line transfer-line--".concat(type, " ").concat(className), "data-transfer-id": id }, { children: [showTitle && (_jsxs("div", __assign({ className: "transfer-line__header" }, { children: [_jsx(Icon, { name: getTypeIcon(), size: "sm", className: "transfer-line__header-icon" }), _jsx(Text, __assign({ size: "sm", variant: "medium", className: "transfer-line__header-label" }, { children: getTypeLabel() }))] }))), _jsxs("div", __assign({ className: "transfer-line__content-container" }, { children: [_jsxs("div", __assign({ className: "transfer-line__content" }, { children: [_jsx("div", __assign({ className: "transfer-line__field transfer-line__field--pax" }, { children: _jsx(PaxSelector, { label: "Number of pax", value: internalPaxData, onChange: handlePaxChange, placeholder: "2 pax" }) })), _jsxs("div", __assign({ className: "transfer-line__field transfer-line__field--date" }, { children: [_jsx(Text, __assign({ size: "sm", variant: "regular", className: "transfer-line__field-label" }, { children: "Transfer date" })), _jsx(DateTimePicker, { placeholder: "DD/MM/YYYY", mode: "calendar", iconPosition: "left", numberOfMonths: 1, iconBGFull: false, showChevron: true, onValueChange: handleDateChange, selectionMode: "single" })] })), _jsx("div", __assign({ className: "transfer-line__field transfer-line__field--pickup" }, { children: _jsx(LocationDropdown, { label: "Pick-up point", options: filterLocations('pickup').options, groups: filterLocations('pickup').groups, selectedValue: (internalPickupPoint === null || internalPickupPoint === void 0 ? void 0 : internalPickupPoint.id) || null, onSelectionChange: handlePickupChange, placeholder: "Select a pick-up point", direction: "pickup", type: type === 'inter-hotel' ? 'accommodation' : type === 'arrival' ? 'airport-port' : 'accommodation', showGroupTitles: false }) })), _jsx("div", __assign({ className: "transfer-line__field transfer-line__field--dropoff" }, { children: _jsx(LocationDropdown, { label: "Drop-off point", options: filterLocations('dropoff').options, groups: filterLocations('dropoff').groups, selectedValue: (internalDropoffPoint === null || internalDropoffPoint === void 0 ? void 0 : internalDropoffPoint.id) || null, onSelectionChange: handleDropoffChange, placeholder: "Select a drop-off point", direction: "dropoff", type: type === 'inter-hotel' ? 'accommodation' : type === 'departure' ? 'airport-port' : 'accommodation', showGroupTitles: false }) }))] })), showDelete && (_jsx("div", __assign({ className: "transfer-line__delete" }, { children: _jsx("button", __assign({ type: "button", className: "transfer-line__delete-btn", onClick: onDelete, "aria-label": "Delete transfer line" }, { children: _jsx(Icon, { name: "delete", size: "sm", className: "transfer-line__delete-icon" }) })) })))] }))] })));
|
|
178
|
+
};
|
|
179
|
+
export default TransferLine;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "secondary" | "outline" | "default" | "destructive" | "ghost" | null | undefined;
|
|
5
|
-
size?: "sm" | "lg" | "default" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export { Button, buttonVariants };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "secondary" | "outline" | "default" | "destructive" | "ghost" | null | undefined;
|
|
5
|
+
size?: "sm" | "lg" | "default" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Button, buttonVariants };
|
|
@@ -1,56 +1,56 @@
|
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
25
|
-
import { cva } from "class-variance-authority";
|
|
26
|
-
import { cn } from "../../lib/utils";
|
|
27
|
-
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
28
|
-
variants: {
|
|
29
|
-
variant: {
|
|
30
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
31
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
32
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
33
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
34
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
35
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
36
|
-
},
|
|
37
|
-
size: {
|
|
38
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
39
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
40
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
41
|
-
icon: "size-9",
|
|
42
|
-
"icon-sm": "size-8",
|
|
43
|
-
"icon-lg": "size-10",
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
defaultVariants: {
|
|
47
|
-
variant: "default",
|
|
48
|
-
size: "default",
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
function Button(_a) {
|
|
52
|
-
var className = _a.className, variant = _a.variant, size = _a.size, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "size", "asChild"]);
|
|
53
|
-
var Comp = asChild ? Slot : "button";
|
|
54
|
-
return (_jsx(Comp, __assign({ "data-slot": "button", className: cn(buttonVariants({ variant: variant, size: size, className: className })) }, props)));
|
|
55
|
-
}
|
|
56
|
-
export { Button, buttonVariants };
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
25
|
+
import { cva } from "class-variance-authority";
|
|
26
|
+
import { cn } from "../../lib/utils";
|
|
27
|
+
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
28
|
+
variants: {
|
|
29
|
+
variant: {
|
|
30
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
31
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
32
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
33
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
34
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
35
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
36
|
+
},
|
|
37
|
+
size: {
|
|
38
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
39
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
40
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
41
|
+
icon: "size-9",
|
|
42
|
+
"icon-sm": "size-8",
|
|
43
|
+
"icon-lg": "size-10",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
variant: "default",
|
|
48
|
+
size: "default",
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
function Button(_a) {
|
|
52
|
+
var className = _a.className, variant = _a.variant, size = _a.size, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "size", "asChild"]);
|
|
53
|
+
var Comp = asChild ? Slot : "button";
|
|
54
|
+
return (_jsx(Comp, __assign({ "data-slot": "button", className: cn(buttonVariants({ variant: variant, size: size, className: className })) }, props)));
|
|
55
|
+
}
|
|
56
|
+
export { Button, buttonVariants };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { DayButton, DayPicker } from "react-day-picker";
|
|
3
|
-
import { Button } from "./button";
|
|
4
|
-
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
|
-
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export { Calendar, CalendarDayButton };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DayButton, DayPicker } from "react-day-picker";
|
|
3
|
+
import { Button } from "./button";
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
|
+
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { Calendar, CalendarDayButton };
|