mautourco-components 0.1.2 → 0.2.1
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 +10 -6
- package/dist/components/atoms/Checkbox/Checkbox.js +7 -1
- package/dist/components/atoms/Icon/Icon.d.ts +1 -1
- package/dist/components/atoms/Icon/Icon.js +22 -1
- package/dist/components/atoms/Icon/icons/BuildingIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/BuildingIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/CalendarOutlineIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/CalendarOutlineIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/HomeIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/HomeIcon.js +25 -0
- package/dist/components/atoms/Icon/icons/MinusIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/MinusIcon.js +25 -0
- package/dist/components/atoms/Icon/icons/PlaneIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/PlaneIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/PlusIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/PlusIcon.js +25 -0
- package/dist/components/atoms/Icon/icons/ShipIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/ShipIcon.js +36 -0
- package/dist/components/atoms/Illustration/Illustration.d.ts +14 -0
- package/dist/components/atoms/Illustration/Illustration.js +33 -0
- package/dist/components/atoms/Illustration/illustrations.d.ts +51 -0
- package/dist/components/atoms/Illustration/illustrations.js +97 -0
- package/dist/components/atoms/RatingStar/RatingStar.d.ts +40 -0
- package/dist/components/atoms/RatingStar/RatingStar.js +54 -0
- package/dist/components/atoms/SegmentedButton/SegmentedButton.d.ts +27 -0
- package/dist/components/atoms/SegmentedButton/SegmentedButton.js +49 -0
- package/dist/components/atoms/Slider/Slider.d.ts +52 -0
- package/dist/components/atoms/Slider/Slider.js +30 -0
- package/dist/components/molecules/Calendar/CalendarInput.d.ts +34 -0
- package/dist/components/molecules/Calendar/CalendarInput.js +49 -0
- package/dist/components/molecules/Calendar/DateTime.d.ts +25 -0
- package/dist/components/molecules/Calendar/DateTime.js +106 -0
- package/dist/components/molecules/Calendar/TimePicker.d.ts +16 -0
- package/dist/components/molecules/Calendar/TimePicker.js +91 -0
- package/dist/components/molecules/LocationDropdown/LocationDropdown.d.ts +34 -0
- package/dist/components/molecules/LocationDropdown/LocationDropdown.js +120 -0
- package/dist/components/molecules/LocationDropdown/index.d.ts +2 -0
- package/dist/components/molecules/LocationDropdown/index.js +1 -0
- package/dist/components/molecules/RatingTab/RatingTab.d.ts +39 -0
- package/dist/components/molecules/RatingTab/RatingTab.js +41 -0
- package/dist/components/molecules/TabGroup/TabGroup.d.ts +17 -0
- package/dist/components/molecules/TabGroup/TabGroup.js +30 -0
- package/dist/components/organisms/CardContainer/CardContainer.d.ts +37 -0
- package/dist/components/organisms/CardContainer/CardContainer.js +27 -0
- package/dist/components/organisms/DateTimePicker/DateTimePicker.d.ts +15 -0
- package/dist/components/organisms/DateTimePicker/DateTimePicker.js +66 -0
- package/dist/components/organisms/Dialog/Dialog.d.ts +103 -0
- package/dist/components/organisms/Dialog/Dialog.js +162 -0
- package/dist/components/organisms/PaxSelector/PaxSelector.d.ts +63 -0
- package/dist/components/organisms/PaxSelector/PaxSelector.js +402 -0
- package/dist/components/organisms/RoundTrip/RoundTrip.d.ts +54 -0
- package/dist/components/organisms/RoundTrip/RoundTrip.js +179 -0
- package/dist/components/organisms/RoundTrip/index.d.ts +2 -0
- package/dist/components/organisms/RoundTrip/index.js +1 -0
- package/dist/components/organisms/SearchBarTransfer/SearchBarTransfer.d.ts +35 -0
- package/dist/components/organisms/SearchBarTransfer/SearchBarTransfer.js +192 -0
- package/dist/components/organisms/SearchBarTransfer/index.d.ts +2 -0
- package/dist/components/organisms/SearchBarTransfer/index.js +1 -0
- package/dist/components/organisms/TransferLine/TransferLine.d.ts +53 -0
- package/dist/components/organisms/TransferLine/TransferLine.js +179 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +56 -0
- package/dist/components/ui/calendar.d.ts +8 -0
- package/dist/components/ui/calendar.js +87 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.js +42 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +18 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.js +13 -0
- package/dist/styles/components/avatar.css +2165 -0
- package/dist/styles/components/calendar.css +2214 -0
- package/dist/styles/components/checkbox.css +2212 -0
- package/dist/styles/components/dropdown.css +2295 -0
- package/dist/styles/components/forms.css +2229 -0
- package/dist/styles/components/illustration.css +2081 -0
- package/dist/styles/components/molecule/calendarInput.css +2308 -0
- package/dist/styles/components/molecule/dateTime.css +2092 -0
- package/dist/styles/components/molecule/location-dropdown.css +2405 -0
- package/dist/styles/components/molecule/timePicker.css +2204 -0
- package/dist/styles/components/multiselect-dropdown.css +2312 -0
- package/dist/styles/components/organism/card-container.css +2128 -0
- package/dist/styles/components/organism/dialog.css +2441 -0
- package/dist/styles/components/organism/footer.css +2387 -0
- package/dist/styles/components/organism/pax-selector.css +2800 -0
- package/dist/styles/components/organism/round-trip.css +2143 -0
- package/dist/styles/components/organism/search-bar-transfer.css +2258 -0
- package/dist/styles/components/organism/topnavigation.css +2499 -0
- package/dist/styles/components/organism/transfer-line.css +2208 -0
- package/dist/styles/components/rating-star.css +2113 -0
- package/dist/styles/components/rating-tab.css +2157 -0
- package/dist/styles/components/scrollbar.css +2143 -0
- package/dist/styles/components/segmented-button.css +2218 -0
- package/dist/styles/components/selected-value.css +2159 -0
- package/dist/styles/components/slider.css +2164 -0
- package/dist/styles/components/typography.css +2417 -0
- package/dist/styles/tokens/_tokens.scss +2072 -0
- package/dist/styles/tokens/tokens.css +2075 -0
- package/package.json +24 -12
- package/src/components/atoms/Button/Button.css +34 -34
- package/src/components/atoms/Checkbox/Checkbox.tsx +83 -69
- package/src/components/atoms/Icon/Icon.tsx +30 -2
- package/src/components/atoms/Icon/icons/BuildingIcon.tsx +50 -0
- package/src/components/atoms/Icon/icons/CalendarOutlineIcon.tsx +50 -0
- package/src/components/atoms/Icon/icons/HomeIcon.tsx +52 -0
- package/src/components/atoms/Icon/icons/MinusIcon.tsx +45 -0
- package/src/components/atoms/Icon/icons/PlaneIcon.tsx +50 -0
- package/src/components/atoms/Icon/icons/PlusIcon.tsx +45 -0
- package/src/components/atoms/Icon/icons/ShipIcon.tsx +50 -0
- package/src/components/atoms/Illustration/Illustration.tsx +28 -0
- package/src/components/atoms/Illustration/illustrations.ts +116 -0
- package/src/components/atoms/RatingStar/RatingStar.tsx +114 -0
- package/src/components/atoms/SegmentedButton/SegmentedButton.tsx +94 -0
- package/src/components/atoms/Slider/Slider.tsx +95 -0
- package/src/components/molecules/Calendar/CalendarInput.tsx +135 -0
- package/src/components/molecules/Calendar/DateTime.tsx +172 -0
- package/src/components/molecules/Calendar/TimePicker.tsx +174 -0
- package/src/components/molecules/LocationDropdown/LocationDropdown.tsx +234 -0
- package/src/components/molecules/LocationDropdown/index.ts +2 -0
- package/src/components/molecules/RatingTab/RatingTab.tsx +96 -0
- package/src/components/molecules/TabGroup/TabGroup.tsx +60 -0
- package/src/components/molecules/UserCard/UserCard.stories.tsx +2 -2
- package/src/components/organisms/CardContainer/CardContainer.tsx +66 -0
- package/src/components/organisms/DateTimePicker/DateTimePicker.tsx +110 -0
- package/src/components/organisms/Dialog/Dialog.tsx +352 -0
- package/src/components/organisms/PaxSelector/PaxSelector.tsx +979 -0
- package/src/components/organisms/RoundTrip/RoundTrip.tsx +335 -0
- package/src/components/organisms/RoundTrip/index.ts +2 -0
- package/src/components/organisms/SearchBarTransfer/SearchBarTransfer.tsx +388 -0
- package/src/components/organisms/SearchBarTransfer/index.ts +2 -0
- package/src/components/organisms/TransferLine/TransferLine.tsx +369 -0
- package/src/components/ui/button.tsx +60 -0
- package/src/components/ui/calendar.tsx +246 -0
- package/src/components/ui/popover.tsx +46 -0
- package/src/styles/components/calendar.css +86 -0
- package/src/styles/components/checkbox.css +130 -132
- package/src/styles/components/dropdown.css +40 -40
- package/src/styles/components/forms.css +51 -51
- package/src/styles/components/illustration.css +7 -0
- package/src/styles/components/molecule/calendarInput.css +157 -0
- package/src/styles/components/molecule/dateTime.css +14 -0
- package/src/styles/components/molecule/location-dropdown.css +204 -0
- package/src/styles/components/molecule/timePicker.css +79 -0
- package/src/styles/components/multiselect-dropdown.css +230 -231
- package/src/styles/components/organism/card-container.css +49 -0
- package/src/styles/components/organism/dialog.css +241 -0
- package/src/styles/components/organism/pax-selector.css +702 -0
- package/src/styles/components/organism/round-trip.css +55 -0
- package/src/styles/components/organism/search-bar-transfer.css +128 -0
- package/src/styles/components/organism/transfer-line.css +86 -0
- package/src/styles/components/rating-star.css +39 -0
- package/src/styles/components/rating-tab.css +83 -0
- package/src/styles/components/segmented-button.css +134 -0
- package/src/styles/components/selected-value.css +16 -16
- package/src/styles/components/slider.css +86 -0
- package/src/styles/components/typography.css +36 -36
- package/src/styles/tokens/tokens.css +1093 -1093
- package/dist/components/atoms/Typography/Heading/Heading.d.ts +0 -9
- package/dist/components/atoms/Typography/Heading/Heading.js +0 -25
- package/dist/components/atoms/Typography/Text/Text.d.ts +0 -10
- package/dist/components/atoms/Typography/Text/Text.js +0 -77
|
@@ -0,0 +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;
|
|
@@ -0,0 +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 };
|
|
@@ -0,0 +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 };
|
|
@@ -0,0 +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 };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
+
var t = {};
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
+
t[p] = s[p];
|
|
21
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
+
t[p[i]] = s[p[i]];
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
};
|
|
28
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
import * as React from "react";
|
|
30
|
+
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, } from "lucide-react";
|
|
31
|
+
import { DayPicker, getDefaultClassNames, MonthGrid, } from "react-day-picker";
|
|
32
|
+
import { Button, buttonVariants } from "./button";
|
|
33
|
+
import { cn } from "../../lib/utils";
|
|
34
|
+
function Calendar(_a) {
|
|
35
|
+
var className = _a.className, classNames = _a.classNames, _b = _a.showOutsideDays, showOutsideDays = _b === void 0 ? true : _b, _c = _a.captionLayout, captionLayout = _c === void 0 ? "label" : _c, _d = _a.buttonVariant, buttonVariant = _d === void 0 ? "ghost" : _d, formatters = _a.formatters, components = _a.components, props = __rest(_a, ["className", "classNames", "showOutsideDays", "captionLayout", "buttonVariant", "formatters", "components"]);
|
|
36
|
+
var defaultClassNames = getDefaultClassNames();
|
|
37
|
+
return (_jsx(DayPicker, __assign({ showOutsideDays: showOutsideDays, className: cn("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw(templateObject_1 || (templateObject_1 = __makeTemplateObject(["rtl:**:[.rdp-button_next>svg]:rotate-180"], ["rtl:**:[.rdp-button\\_next>svg]:rotate-180"]))), String.raw(templateObject_2 || (templateObject_2 = __makeTemplateObject(["rtl:**:[.rdp-button_previous>svg]:rotate-180"], ["rtl:**:[.rdp-button\\_previous>svg]:rotate-180"]))), className), captionLayout: captionLayout, formatters: __assign({ formatMonthDropdown: function (date) {
|
|
38
|
+
return date.toLocaleString("default", { month: "short" });
|
|
39
|
+
} }, formatters), classNames: __assign({ root: cn("w-fit", defaultClassNames.root), months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months), month: cn("flex w-full flex-col gap-4", defaultClassNames.month), nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav), button_previous: cn(buttonVariants({ variant: buttonVariant }), "h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_previous), button_next: cn(buttonVariants({ variant: buttonVariant }), "h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_next), month_caption: cn("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]", defaultClassNames.month_caption), dropdowns: cn("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns), dropdown_root: cn("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border", defaultClassNames.dropdown_root), dropdown: cn("absolute inset-0 opacity-0", defaultClassNames.dropdown), caption_label: cn("select-none font-medium", captionLayout === "label"
|
|
40
|
+
? "text-sm"
|
|
41
|
+
: "[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5", defaultClassNames.caption_label, "calendar--caption_label"), table: "w-full border-collapse", weekdays: cn("flex", defaultClassNames.weekdays), weekday: cn("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal", defaultClassNames.weekday, "calendar--weekday"), week: cn("mt-2 flex w-full", defaultClassNames.week), week_number_header: cn("w-[--cell-size] select-none", defaultClassNames.week_number_header), week_number: cn("text-muted-foreground select-none text-[0.8rem]", defaultClassNames.week_number), day: cn("relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none", props.showWeekNumber
|
|
42
|
+
? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
|
|
43
|
+
: "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day), range_start: cn("bg-accent rounded-l-md", defaultClassNames.range_start), range_middle: cn("rounded-none", defaultClassNames.range_middle), range_end: cn("bg-accent rounded-r-md", defaultClassNames.range_end), today: cn("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none", defaultClassNames.today), outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside), disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled), hidden: cn("invisible", defaultClassNames.hidden) }, classNames), components: __assign({ Root: function (_a) {
|
|
44
|
+
var className = _a.className, rootRef = _a.rootRef, props = __rest(_a, ["className", "rootRef"]);
|
|
45
|
+
return (_jsx("div", __assign({ "data-slot": "calendar", ref: rootRef, className: cn(className) }, props)));
|
|
46
|
+
}, Chevron: function (_a) {
|
|
47
|
+
var className = _a.className, orientation = _a.orientation, props = __rest(_a, ["className", "orientation"]);
|
|
48
|
+
if (orientation === "left") {
|
|
49
|
+
return (_jsx(ChevronLeftIcon, __assign({ className: cn("size-4", className) }, props)));
|
|
50
|
+
}
|
|
51
|
+
if (orientation === "right") {
|
|
52
|
+
return (_jsx(ChevronRightIcon, __assign({ className: cn("size-4", className) }, props)));
|
|
53
|
+
}
|
|
54
|
+
return (_jsx(ChevronDownIcon, __assign({ className: cn("size-4", className) }, props)));
|
|
55
|
+
}, DayButton: CalendarDayButton, WeekNumber: function (_a) {
|
|
56
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
|
57
|
+
return (_jsx("td", __assign({}, props, { children: _jsx("div", __assign({ className: "flex size-[--cell-size] items-center justify-center text-center" }, { children: children })) })));
|
|
58
|
+
}, MonthGrid: CustomMonthGrid, CaptionLabel: CustomCaptionLabel }, components) }, props)));
|
|
59
|
+
}
|
|
60
|
+
function CalendarDayButton(_a) {
|
|
61
|
+
var className = _a.className, day = _a.day, modifiers = _a.modifiers, props = __rest(_a, ["className", "day", "modifiers"]);
|
|
62
|
+
var defaultClassNames = getDefaultClassNames();
|
|
63
|
+
var ref = React.useRef(null);
|
|
64
|
+
React.useEffect(function () {
|
|
65
|
+
var _a;
|
|
66
|
+
if (modifiers.focused)
|
|
67
|
+
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
68
|
+
}, [modifiers.focused]);
|
|
69
|
+
return (_jsx(Button, __assign({ ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
|
|
70
|
+
!modifiers.range_start &&
|
|
71
|
+
!modifiers.range_end &&
|
|
72
|
+
!modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn(
|
|
73
|
+
// "data-[selected-single=true]:bg-[#FFAB63] data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-[#FFAB63] data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-[#FFAB63] data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",
|
|
74
|
+
defaultClassNames.day, className
|
|
75
|
+
// 'data-[selected-single=true]:!rounded-full data-[range-start=true]:!rounded-full data-[range-end=true]:!rounded-full data-[range-middle=true]:bg-[#FFEBD4]'
|
|
76
|
+
) }, props, { children: _jsx("span", __assign({ className: "relative z-20" }, { children: day.date.getDate() })) })));
|
|
77
|
+
}
|
|
78
|
+
function CustomMonthGrid(props) {
|
|
79
|
+
return (_jsxs(_Fragment, { children: [_jsx("hr", { className: "calendar--separator" }), _jsx(MonthGrid, __assign({}, props))] }));
|
|
80
|
+
}
|
|
81
|
+
function CustomCaptionLabel(props) {
|
|
82
|
+
var children = props.children;
|
|
83
|
+
var _a = String(children).split(" "), month = _a[0], year = _a[1];
|
|
84
|
+
return (_jsxs("span", __assign({}, props, { children: [month, ", ", year] })));
|
|
85
|
+
}
|
|
86
|
+
export { Calendar, CalendarDayButton };
|
|
87
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -0,0 +1,42 @@
|
|
|
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 * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
25
|
+
import { cn } from "../../lib/utils";
|
|
26
|
+
function Popover(_a) {
|
|
27
|
+
var props = __rest(_a, []);
|
|
28
|
+
return _jsx(PopoverPrimitive.Root, __assign({ "data-slot": "popover" }, props));
|
|
29
|
+
}
|
|
30
|
+
function PopoverTrigger(_a) {
|
|
31
|
+
var props = __rest(_a, []);
|
|
32
|
+
return _jsx(PopoverPrimitive.Trigger, __assign({ "data-slot": "popover-trigger" }, props));
|
|
33
|
+
}
|
|
34
|
+
function PopoverContent(_a) {
|
|
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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className) }, props)) }));
|
|
37
|
+
}
|
|
38
|
+
function PopoverAnchor(_a) {
|
|
39
|
+
var props = __rest(_a, []);
|
|
40
|
+
return _jsx(PopoverPrimitive.Anchor, __assign({ "data-slot": "popover-anchor" }, props));
|
|
41
|
+
}
|
|
42
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,26 @@ export { default as Input } from './components/atoms/Inputs/Input/Input';
|
|
|
6
6
|
export { default as Textarea } from './components/atoms/Inputs/Textarea/Textarea';
|
|
7
7
|
export { default as SelectedValue } from './components/atoms/SelectedValue/SelectedValue';
|
|
8
8
|
export { default as Spinner } from './components/atoms/Spinner/Spinner';
|
|
9
|
+
export { default as Slider } from './components/atoms/Slider/Slider';
|
|
10
|
+
export { default as RatingStar } from './components/atoms/RatingStar/RatingStar';
|
|
9
11
|
export { Heading } from './components/atoms/Typography/Typography';
|
|
10
12
|
export { Text } from './components/atoms/Typography/Typography';
|
|
13
|
+
export { default as SegmentedButton } from './components/atoms/SegmentedButton/SegmentedButton';
|
|
11
14
|
export { default as MultiSelectDropdown } from './components/molecules/MultiSelectDropdown/MultiSelectDropdown';
|
|
15
|
+
export { default as CalendarInput } from './components/molecules/Calendar/CalendarInput';
|
|
16
|
+
export { default as TimePicker } from './components/molecules/Calendar/TimePicker';
|
|
17
|
+
export { default as RatingTab } from './components/molecules/RatingTab/RatingTab';
|
|
18
|
+
export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
12
19
|
export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
|
|
13
20
|
export { Footer } from './components/organisms/Footer/Footer';
|
|
21
|
+
export { Dialog } from './components/organisms/Dialog/Dialog';
|
|
22
|
+
export { CardContainer } from './components/organisms/CardContainer/CardContainer';
|
|
23
|
+
export { Illustration } from './components/atoms/Illustration/Illustration';
|
|
24
|
+
export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSelector';
|
|
25
|
+
export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
26
|
+
export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
|
|
27
|
+
export { default as TransferLine } from './components/organisms/TransferLine/TransferLine';
|
|
28
|
+
export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
|
|
14
29
|
export { default as ButtonSpinner } from './components/atoms/Spinner/variants/ButtonSpinner';
|
|
15
30
|
export { default as LoadingSpinner } from './components/atoms/Spinner/variants/LoadingSpinner';
|
|
16
31
|
export { default as CheckIcon } from './components/atoms/Icon/icons/Check';
|
|
@@ -19,5 +34,16 @@ export { default as CloseIcon } from './components/atoms/Icon/icons/Close';
|
|
|
19
34
|
export { default as SearchIcon } from './components/atoms/Icon/icons/Search';
|
|
20
35
|
export { default as SettingsIcon } from './components/atoms/Icon/icons/Settings';
|
|
21
36
|
export { default as UserIcon } from './components/atoms/Icon/icons/User';
|
|
37
|
+
export { default as PlusIcon } from './components/atoms/Icon/icons/PlusIcon';
|
|
38
|
+
export { default as MinusIcon } from './components/atoms/Icon/icons/MinusIcon';
|
|
39
|
+
export { default as HomeIcon } from './components/atoms/Icon/icons/HomeIcon';
|
|
22
40
|
export type { TopNavigationProps } from './components/organisms/TopNavigation/TopNavigation';
|
|
23
41
|
export type { FooterProps } from './components/organisms/Footer/Footer';
|
|
42
|
+
export type { DialogProps, DialogSize } from './components/organisms/Dialog/Dialog';
|
|
43
|
+
export type { CardContainerProps, CardContainerSpacing } from './components/organisms/CardContainer/CardContainer';
|
|
44
|
+
export type { PaxSelectorProps, PaxData, ClientType } from './components/organisms/PaxSelector/PaxSelector';
|
|
45
|
+
export type { LocationDropdownProps, LocationOption, LocationGroup, LocationData } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
46
|
+
export type { DateTimePickerProps } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
47
|
+
export type { RoundTripProps, RoundTripData, RoundTripTransfer } from './components/organisms/RoundTrip/RoundTrip';
|
|
48
|
+
export type { TransferLineProps, TransferLineData, TransferType } from './components/organisms/TransferLine/TransferLine';
|
|
49
|
+
export type { SearchBarTransferProps, SearchBarTransferData, TransferMode } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
|
package/dist/index.js
CHANGED
|
@@ -7,13 +7,28 @@ export { default as Input } from './components/atoms/Inputs/Input/Input';
|
|
|
7
7
|
export { default as Textarea } from './components/atoms/Inputs/Textarea/Textarea';
|
|
8
8
|
export { default as SelectedValue } from './components/atoms/SelectedValue/SelectedValue';
|
|
9
9
|
export { default as Spinner } from './components/atoms/Spinner/Spinner';
|
|
10
|
+
export { default as Slider } from './components/atoms/Slider/Slider';
|
|
11
|
+
export { default as RatingStar } from './components/atoms/RatingStar/RatingStar';
|
|
10
12
|
export { Heading } from './components/atoms/Typography/Typography';
|
|
11
13
|
export { Text } from './components/atoms/Typography/Typography';
|
|
14
|
+
export { default as SegmentedButton } from './components/atoms/SegmentedButton/SegmentedButton';
|
|
12
15
|
// Molecules - Composed components
|
|
13
16
|
export { default as MultiSelectDropdown } from './components/molecules/MultiSelectDropdown/MultiSelectDropdown';
|
|
17
|
+
export { default as CalendarInput } from './components/molecules/Calendar/CalendarInput';
|
|
18
|
+
export { default as TimePicker } from './components/molecules/Calendar/TimePicker';
|
|
19
|
+
export { default as RatingTab } from './components/molecules/RatingTab/RatingTab';
|
|
20
|
+
export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
14
21
|
// Organisms - Complex components
|
|
15
22
|
export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
|
|
16
23
|
export { Footer } from './components/organisms/Footer/Footer';
|
|
24
|
+
export { Dialog } from './components/organisms/Dialog/Dialog';
|
|
25
|
+
export { CardContainer } from './components/organisms/CardContainer/CardContainer';
|
|
26
|
+
export { Illustration } from './components/atoms/Illustration/Illustration';
|
|
27
|
+
export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSelector';
|
|
28
|
+
export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
29
|
+
export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
|
|
30
|
+
export { default as TransferLine } from './components/organisms/TransferLine/TransferLine';
|
|
31
|
+
export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
|
|
17
32
|
// Spinner Variants
|
|
18
33
|
export { default as ButtonSpinner } from './components/atoms/Spinner/variants/ButtonSpinner';
|
|
19
34
|
export { default as LoadingSpinner } from './components/atoms/Spinner/variants/LoadingSpinner';
|
|
@@ -24,5 +39,8 @@ export { default as CloseIcon } from './components/atoms/Icon/icons/Close';
|
|
|
24
39
|
export { default as SearchIcon } from './components/atoms/Icon/icons/Search';
|
|
25
40
|
export { default as SettingsIcon } from './components/atoms/Icon/icons/Settings';
|
|
26
41
|
export { default as UserIcon } from './components/atoms/Icon/icons/User';
|
|
42
|
+
export { default as PlusIcon } from './components/atoms/Icon/icons/PlusIcon';
|
|
43
|
+
export { default as MinusIcon } from './components/atoms/Icon/icons/MinusIcon';
|
|
44
|
+
export { default as HomeIcon } from './components/atoms/Icon/icons/HomeIcon';
|
|
27
45
|
// export type { InputProps } from './components/atoms/Inputs/Input/Input';
|
|
28
46
|
// export type { CheckboxProps } from './components/atoms/Checkbox/Checkbox';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
/**
|
|
3
|
+
* Utility to merge class names.
|
|
4
|
+
* For notre design system, `clsx` est suffisant
|
|
5
|
+
* (on n'a pas besoin de la logique spécifique de `tailwind-merge`).
|
|
6
|
+
*/
|
|
7
|
+
export function cn() {
|
|
8
|
+
var inputs = [];
|
|
9
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
10
|
+
inputs[_i] = arguments[_i];
|
|
11
|
+
}
|
|
12
|
+
return clsx(inputs);
|
|
13
|
+
}
|