mautourco-components 0.2.10 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/Icon/Icon.d.ts +1 -1
- package/dist/components/atoms/Icon/Icon.js +1 -1
- package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.js +1 -1
- package/dist/components/atoms/Icon/icons/registry.d.ts +0 -11
- package/dist/components/atoms/Icon/icons/registry.js +27 -49
- package/dist/components/atoms/Typography/Typography.d.ts +1 -3
- package/dist/components/atoms/Typography/Typography.js +15 -3
- package/dist/components/organisms/DateTimePicker/DateTimePicker.d.ts +2 -0
- package/dist/components/organisms/DateTimePicker/DateTimePicker.js +31 -3
- package/dist/components/organisms/RoundTrip/RoundTrip.js +1 -1
- package/dist/components/organisms/TransferLine/TransferLine.js +1 -1
- package/dist/components/ui/popover.d.ts +3 -3
- package/dist/components/ui/popover.js +5 -5
- package/dist/index.d.ts +33 -41
- package/dist/index.js +20 -26
- package/dist/styles/components/typography.css +0 -1
- package/package.json +1 -6
- package/src/components/atoms/Icon/Icon.tsx +8 -2
- package/src/components/atoms/Icon/icons/ArrowRightOutlineIcon.tsx +7 -2
- package/src/components/atoms/Icon/icons/registry.tsx +28 -50
- package/src/components/atoms/Typography/Typography.tsx +30 -22
- package/src/components/organisms/DateTimePicker/DateTimePicker.tsx +33 -2
- package/src/components/organisms/RoundTrip/RoundTrip.tsx +1 -0
- package/src/components/organisms/SearchBarTransfer/index.ts +1 -0
- package/src/components/organisms/TransferLine/TransferLine.tsx +1 -0
- package/src/components/ui/popover.tsx +10 -10
- package/src/styles/components/typography.css +0 -4
- package/dist/components/atoms/Icon/icons/AccomIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/AccomIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.d.ts +0 -8
- package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/BusIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/BusIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/Calendar2Icon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/Calendar2Icon.js +0 -36
- package/dist/components/atoms/Icon/icons/MapIcon.d.ts +0 -8
- package/dist/components/atoms/Icon/icons/MapIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/MicroIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/MicroIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/MoreVerticalIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/MoreVerticalIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/NightIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/NightIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/RowExcursion.d.ts +0 -16
- package/dist/components/atoms/Icon/icons/RowExcursion.js +0 -28
- package/dist/components/atoms/Icon/icons/StopWatchIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/StopWatchIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/Utensils.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/Utensils.js +0 -36
- package/dist/components/atoms/Icon/icons/WalletIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/WalletIcon.js +0 -36
- package/dist/components/molecules/ActionDropdown/ActionDropdown.css +0 -2119
- package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +0 -21
- package/dist/components/molecules/ActionDropdown/ActionDropdown.js +0 -34
- package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +0 -14
- package/dist/components/molecules/DateDisplay/DateDisplay.js +0 -39
- package/dist/components/molecules/FromTo/FromTo.d.ts +0 -8
- package/dist/components/molecules/FromTo/FromTo.js +0 -24
- package/dist/components/molecules/TableServiceItem/DetailsCol.d.ts +0 -12
- package/dist/components/molecules/TableServiceItem/DetailsCol.js +0 -17
- package/dist/components/molecules/TableServiceItem/ItemCol.d.ts +0 -13
- package/dist/components/molecules/TableServiceItem/ItemCol.js +0 -24
- package/dist/components/molecules/TableServiceItem/RowAccommodation.d.ts +0 -16
- package/dist/components/molecules/TableServiceItem/RowAccommodation.js +0 -37
- package/dist/components/molecules/TableServiceItem/RowExcursion.d.ts +0 -16
- package/dist/components/molecules/TableServiceItem/RowExcursion.js +0 -22
- package/dist/components/molecules/TableServiceItem/RowOtherServices.d.ts +0 -9
- package/dist/components/molecules/TableServiceItem/RowOtherServices.js +0 -34
- package/dist/components/molecules/TableServiceItem/RowTransfer.d.ts +0 -15
- package/dist/components/molecules/TableServiceItem/RowTransfer.js +0 -37
- package/dist/components/molecules/TableServiceItem/index.d.ts +0 -17
- package/dist/components/molecules/TableServiceItem/index.js +0 -15
- package/dist/components/molecules/TextWithIcon/TextWithIcon.d.ts +0 -30
- package/dist/components/molecules/TextWithIcon/TextWithIcon.js +0 -31
- package/dist/components/molecules/TooltipDisplay/TooltipDisplay.d.ts +0 -13
- package/dist/components/molecules/TooltipDisplay/TooltipDisplay.js +0 -18
- package/dist/components/organisms/Table/Table.css +0 -2280
- package/dist/components/organisms/Table/Table.d.ts +0 -50
- package/dist/components/organisms/Table/Table.js +0 -95
- package/dist/components/organisms/Table/TableCell.d.ts +0 -15
- package/dist/components/organisms/Table/TableCell.js +0 -16
- package/dist/components/organisms/Table/columns/booking-columns.d.ts +0 -7
- package/dist/components/organisms/Table/columns/booking-columns.js +0 -83
- package/dist/components/organisms/Table/columns/detail-resume-columns.d.ts +0 -3
- package/dist/components/organisms/Table/columns/detail-resume-columns.js +0 -178
- package/dist/components/organisms/Table/columns/index.d.ts +0 -12
- package/dist/components/organisms/Table/columns/index.js +0 -9
- package/dist/components/organisms/Table/columns/quotation-columns.d.ts +0 -7
- package/dist/components/organisms/Table/columns/quotation-columns.js +0 -91
- package/dist/components/organisms/Table/constant.d.ts +0 -6
- package/dist/components/organisms/Table/constant.js +0 -24
- package/dist/components/organisms/Table/index.d.ts +0 -2
- package/dist/components/organisms/Table/index.js +0 -2
- package/dist/components/ui/tooltip.d.ts +0 -7
- package/dist/components/ui/tooltip.js +0 -42
- package/dist/types/table/action-dropdown-type.types.d.ts +0 -5
- package/dist/types/table/action-dropdown-type.types.js +0 -6
- package/dist/types/table/booking.types.d.ts +0 -16
- package/dist/types/table/booking.types.js +0 -1
- package/dist/types/table/detail-resume.types.d.ts +0 -155
- package/dist/types/table/detail-resume.types.js +0 -7
- package/dist/types/table/index.d.ts +0 -3
- package/dist/types/table/index.js +0 -3
- package/dist/types/table/quotation.types.d.ts +0 -23
- package/dist/types/table/quotation.types.js +0 -1
- package/src/components/atoms/Icon/icons/AccomIcon.tsx +0 -45
- package/src/components/atoms/Icon/icons/ArrowDownOutlineIcon.tsx +0 -41
- package/src/components/atoms/Icon/icons/BusIcon.tsx +0 -52
- package/src/components/atoms/Icon/icons/Calendar2Icon.tsx +0 -54
- package/src/components/atoms/Icon/icons/MapIcon.tsx +0 -48
- package/src/components/atoms/Icon/icons/MicroIcon.tsx +0 -45
- package/src/components/atoms/Icon/icons/MoreVerticalIcon.tsx +0 -53
- package/src/components/atoms/Icon/icons/NightIcon.tsx +0 -45
- package/src/components/atoms/Icon/icons/RowExcursion.tsx +0 -54
- package/src/components/atoms/Icon/icons/StopWatchIcon.tsx +0 -45
- package/src/components/atoms/Icon/icons/Utensils.tsx +0 -45
- package/src/components/atoms/Icon/icons/WalletIcon.tsx +0 -45
- package/src/components/molecules/ActionDropdown/ActionDropdown.css +0 -23
- package/src/components/molecules/ActionDropdown/ActionDropdown.tsx +0 -53
- package/src/components/molecules/DateDisplay/DateDisplay.tsx +0 -47
- package/src/components/molecules/FromTo/FromTo.tsx +0 -31
- package/src/components/molecules/TableServiceItem/DetailsCol.tsx +0 -25
- package/src/components/molecules/TableServiceItem/ItemCol.tsx +0 -68
- package/src/components/molecules/TableServiceItem/RowAccommodation.tsx +0 -56
- package/src/components/molecules/TableServiceItem/RowExcursion.tsx +0 -40
- package/src/components/molecules/TableServiceItem/RowOtherServices.tsx +0 -50
- package/src/components/molecules/TableServiceItem/RowTransfer.tsx +0 -60
- package/src/components/molecules/TableServiceItem/index.ts +0 -24
- package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +0 -62
- package/src/components/molecules/TooltipDisplay/TooltipDisplay.tsx +0 -32
- package/src/components/organisms/Table/Table.css +0 -185
- package/src/components/organisms/Table/Table.tsx +0 -273
- package/src/components/organisms/Table/TableCell.tsx +0 -40
- package/src/components/organisms/Table/columns/booking-columns.tsx +0 -118
- package/src/components/organisms/Table/columns/detail-resume-columns.tsx +0 -226
- package/src/components/organisms/Table/columns/index.ts +0 -11
- package/src/components/organisms/Table/columns/quotation-columns.tsx +0 -150
- package/src/components/organisms/Table/constant.ts +0 -31
- package/src/components/organisms/Table/index.ts +0 -2
- package/src/components/ui/tooltip.tsx +0 -45
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type IconName } from './icons/registry';
|
|
3
3
|
interface IconProps {
|
|
4
4
|
name: IconName;
|
|
5
|
-
size?:
|
|
5
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
6
6
|
className?: string;
|
|
7
7
|
color?: string;
|
|
8
8
|
style?: React.CSSProperties;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ICONS } from './icons/registry';
|
|
3
3
|
var Icon = function (_a) {
|
|
4
|
-
var name = _a.name, _b = _a.size, size = _b === void 0 ?
|
|
4
|
+
var name = _a.name, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.className, className = _c === void 0 ? "" : _c, color = _a.color, style = _a.style;
|
|
5
5
|
var IconComponent = ICONS[name];
|
|
6
6
|
return _jsx(IconComponent, { size: size, className: className, color: color, style: style });
|
|
7
7
|
};
|
|
@@ -31,6 +31,6 @@ var ArrowRightOutlineIcon = function (_a) {
|
|
|
31
31
|
var sizeClasses = getSizeClasses();
|
|
32
32
|
var colorClass = color ? "text-".concat(color) : "text-current";
|
|
33
33
|
var classes = "".concat(sizeClasses, " ").concat(colorClass, " ").concat(className);
|
|
34
|
-
return (_jsx("svg", __assign({ className: classes, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "
|
|
34
|
+
return (_jsx("svg", __assign({ className: classes, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M6 12L10 8L6 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }) })));
|
|
35
35
|
};
|
|
36
36
|
export default ArrowRightOutlineIcon;
|
|
@@ -25,7 +25,6 @@ export declare const ICONS: {
|
|
|
25
25
|
readonly 'calendar-outline': IconComponent;
|
|
26
26
|
readonly 'calendar-range-outline': IconComponent;
|
|
27
27
|
readonly 'arrow-right-outline': IconComponent;
|
|
28
|
-
readonly 'arrow-down-outline': IconComponent;
|
|
29
28
|
readonly 'plane-takeoff-outline': IconComponent;
|
|
30
29
|
readonly 'plane-landing-outline': IconComponent;
|
|
31
30
|
readonly 'building-2-outline': IconComponent;
|
|
@@ -52,15 +51,5 @@ export declare const ICONS: {
|
|
|
52
51
|
readonly plane: IconComponent;
|
|
53
52
|
readonly ship: IconComponent;
|
|
54
53
|
readonly building: IconComponent;
|
|
55
|
-
readonly calendar2: IconComponent;
|
|
56
|
-
readonly 'more-vertical': IconComponent;
|
|
57
|
-
readonly accom: IconComponent;
|
|
58
|
-
readonly night: IconComponent;
|
|
59
|
-
readonly utensils: IconComponent;
|
|
60
|
-
readonly micro: IconComponent;
|
|
61
|
-
readonly stopwatch: IconComponent;
|
|
62
|
-
readonly bus: IconComponent;
|
|
63
|
-
readonly map: IconComponent;
|
|
64
|
-
readonly wallet: IconComponent;
|
|
65
54
|
};
|
|
66
55
|
export type IconName = keyof typeof ICONS;
|
|
@@ -10,53 +10,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import AccomIcon from './AccomIcon';
|
|
14
|
-
import ArrivalIcon from './ArrivalIcon';
|
|
15
|
-
import ArrowDownOutlineIcon from './ArrowDownOutlineIcon';
|
|
16
|
-
import ArrowRightOutlineIcon from './ArrowRightOutlineIcon';
|
|
17
|
-
import Building2OutlineIcon from './Building2OutlineIcon';
|
|
18
|
-
import BuildingIcon from './BuildingIcon';
|
|
19
|
-
import BusIcon from './BusIcon';
|
|
20
|
-
import Calendar2Icon from './Calendar2Icon';
|
|
21
|
-
import CalendarIcon from './CalendarIcon';
|
|
22
|
-
import CalendarOutlineIcon from './CalendarOutlineIcon';
|
|
23
|
-
import CalendarRangeOutlineIcon from './CalendarRangeOutlineIcon';
|
|
24
|
-
import CarIcon from './CarIcon';
|
|
25
|
-
import Check from './Check';
|
|
26
|
-
import CheckCircleIcon from './CheckCircleIcon';
|
|
27
13
|
import Chevron from './Chevron';
|
|
14
|
+
import Check from './Check';
|
|
28
15
|
import Close from './Close';
|
|
29
|
-
import
|
|
16
|
+
import Search from './Search';
|
|
17
|
+
import User from './User';
|
|
18
|
+
import UserIcon from './UserIcon';
|
|
19
|
+
import CalendarIcon from './CalendarIcon';
|
|
20
|
+
import ArrivalIcon from './ArrivalIcon';
|
|
30
21
|
import DepartureIcon from './DepartureIcon';
|
|
22
|
+
import MapPinIcon from './MapPinIcon';
|
|
23
|
+
import DeleteIcon from './DeleteIcon';
|
|
31
24
|
import EyeIcon from './EyeIcon';
|
|
32
|
-
import FacebookIcon from './FacebookIcon';
|
|
33
|
-
import HomeIcon from './HomeIcon';
|
|
34
25
|
import InfoIcon from './InfoIcon';
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import MautourcoLogo from './MautoucoLogo';
|
|
39
|
-
import MenuIcon from './MenuIcon';
|
|
40
|
-
import MicroIcon from './MicroIcon';
|
|
41
|
-
import MinusIcon from './MinusIcon';
|
|
26
|
+
import CheckCircleIcon from './CheckCircleIcon';
|
|
27
|
+
import StrollerIcon from './StrollerIcon';
|
|
28
|
+
import CarIcon from './CarIcon';
|
|
42
29
|
import MoreIcon from './MoreIcon';
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
30
|
+
import Settings from './Settings';
|
|
31
|
+
import MenuIcon from './MenuIcon';
|
|
32
|
+
import MautourcoLogo from './MautoucoLogo';
|
|
33
|
+
import YouTubeIcon from './Youtube';
|
|
34
|
+
import FacebookIcon from './FacebookIcon';
|
|
35
|
+
import TwitterIcon from './TwitterIcon';
|
|
36
|
+
import LinkedInIcon from './LinkedInIcon';
|
|
37
|
+
import CalendarOutlineIcon from './CalendarOutlineIcon';
|
|
38
|
+
import CalendarRangeOutlineIcon from './CalendarRangeOutlineIcon';
|
|
39
|
+
import ArrowRightOutlineIcon from './ArrowRightOutlineIcon';
|
|
47
40
|
import PlaneTakeoffOutlineIcon from './PlaneTakeoffOutlineIcon';
|
|
41
|
+
import PlaneLandingOutlineIcon from './PlaneLandingOutlineIcon';
|
|
42
|
+
import Building2OutlineIcon from './Building2OutlineIcon';
|
|
48
43
|
import PlusIcon from './PlusIcon';
|
|
49
|
-
import
|
|
50
|
-
import
|
|
44
|
+
import MinusIcon from './MinusIcon';
|
|
45
|
+
import HomeIcon from './HomeIcon';
|
|
46
|
+
import PlaneIcon from './PlaneIcon';
|
|
51
47
|
import ShipIcon from './ShipIcon';
|
|
52
|
-
import
|
|
53
|
-
import StrollerIcon from './StrollerIcon';
|
|
54
|
-
import TwitterIcon from './TwitterIcon';
|
|
55
|
-
import User from './User';
|
|
56
|
-
import UserIcon from './UserIcon';
|
|
57
|
-
import UtensilsIcon from './Utensils';
|
|
58
|
-
import WalletIcon from './WalletIcon';
|
|
59
|
-
import YouTubeIcon from './Youtube';
|
|
48
|
+
import BuildingIcon from './BuildingIcon';
|
|
60
49
|
var ChevronDown = function (props) { return _jsx(Chevron, __assign({ direction: "down" }, props)); };
|
|
61
50
|
var ChevronUp = function (props) { return _jsx(Chevron, __assign({ direction: "up" }, props)); };
|
|
62
51
|
var ChevronLeft = function (props) { return _jsx(Chevron, __assign({ direction: "left" }, props)); };
|
|
@@ -81,7 +70,6 @@ export var ICONS = {
|
|
|
81
70
|
'calendar-outline': CalendarOutlineIcon,
|
|
82
71
|
'calendar-range-outline': CalendarRangeOutlineIcon,
|
|
83
72
|
'arrow-right-outline': ArrowRightOutlineIcon,
|
|
84
|
-
'arrow-down-outline': ArrowDownOutlineIcon,
|
|
85
73
|
'plane-takeoff-outline': PlaneTakeoffOutlineIcon,
|
|
86
74
|
'plane-landing-outline': PlaneLandingOutlineIcon,
|
|
87
75
|
'building-2-outline': Building2OutlineIcon,
|
|
@@ -108,14 +96,4 @@ export var ICONS = {
|
|
|
108
96
|
plane: PlaneIcon,
|
|
109
97
|
ship: ShipIcon,
|
|
110
98
|
building: BuildingIcon,
|
|
111
|
-
calendar2: Calendar2Icon,
|
|
112
|
-
'more-vertical': MoreVerticalIcon,
|
|
113
|
-
accom: AccomIcon,
|
|
114
|
-
night: NightIcon,
|
|
115
|
-
utensils: UtensilsIcon,
|
|
116
|
-
micro: MicroIcon,
|
|
117
|
-
stopwatch: StopWatchIcon,
|
|
118
|
-
bus: BusIcon,
|
|
119
|
-
map: MapIcon,
|
|
120
|
-
wallet: WalletIcon,
|
|
121
99
|
};
|
|
@@ -4,9 +4,7 @@ type BodySizeInput = BodyTokenSize | 'base' | 'xl';
|
|
|
4
4
|
type Variant = 'light' | 'regular' | 'medium' | 'bold' | 'black';
|
|
5
5
|
type Leading = 'none' | '4' | '5' | '6' | '7';
|
|
6
6
|
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
|
-
|
|
8
|
-
export type TextVariant = Variant;
|
|
9
|
-
export type TextLeading = Leading;
|
|
7
|
+
type TextColor = 'default' | 'accent' | 'subtle' | 'light' | 'brand' | 'inverted' | 'state-default' | 'state-hover' | 'state-filled' | 'state-disabled' | 'state-error' | 'state-success';
|
|
10
8
|
interface BaseProps {
|
|
11
9
|
variant?: Variant;
|
|
12
10
|
leading?: Leading;
|
|
@@ -53,7 +53,9 @@ var mapLeadingToToken = function (leading) {
|
|
|
53
53
|
var getBodyClass = function (size, leading) {
|
|
54
54
|
var availableLeadings = tokenBodyLeadings[size];
|
|
55
55
|
var desiredLeading = leading ? mapLeadingToToken(leading) : mapLeadingToToken(defaultBodyLeading[size]);
|
|
56
|
-
var resolvedLeading = availableLeadings.includes(desiredLeading)
|
|
56
|
+
var resolvedLeading = availableLeadings.includes(desiredLeading)
|
|
57
|
+
? desiredLeading
|
|
58
|
+
: availableLeadings[0];
|
|
57
59
|
return {
|
|
58
60
|
className: "body-".concat(size, "-").concat(resolvedLeading),
|
|
59
61
|
lineHeightHandled: desiredLeading === resolvedLeading,
|
|
@@ -77,7 +79,12 @@ export var Heading = function (_a) {
|
|
|
77
79
|
var Tag = as || "h".concat(level);
|
|
78
80
|
var baseClass = (_b = headingTokenClass[level]) !== null && _b !== void 0 ? _b : headingTokenClass[2];
|
|
79
81
|
var variantClass = buildVariantClass(baseClass, variant);
|
|
80
|
-
var classes = [
|
|
82
|
+
var classes = [
|
|
83
|
+
baseClass,
|
|
84
|
+
variantClass,
|
|
85
|
+
leading ? leadingFallback[leading] : '',
|
|
86
|
+
className,
|
|
87
|
+
]
|
|
81
88
|
.filter(Boolean)
|
|
82
89
|
.join(' ');
|
|
83
90
|
var colorStyle = getColorStyle(color);
|
|
@@ -89,7 +96,12 @@ export var Text = function (_a) {
|
|
|
89
96
|
var normalizedSize = bodySizeAlias[size];
|
|
90
97
|
var _e = getBodyClass(normalizedSize, leading), baseClass = _e.className, lineHeightHandled = _e.lineHeightHandled;
|
|
91
98
|
var variantClass = buildVariantClass(baseClass, variant);
|
|
92
|
-
var classes = [
|
|
99
|
+
var classes = [
|
|
100
|
+
baseClass,
|
|
101
|
+
variantClass,
|
|
102
|
+
leading && !lineHeightHandled ? leadingFallback[leading] : '',
|
|
103
|
+
className,
|
|
104
|
+
]
|
|
93
105
|
.filter(Boolean)
|
|
94
106
|
.join(' ');
|
|
95
107
|
var colorStyle = getColorStyle(color);
|
|
@@ -4,6 +4,8 @@ export interface DateTimePickerProps extends Partial<DateTimeProps> {
|
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
onValueChange?: (value: string | string[]) => void;
|
|
7
|
+
/** Default value for the date picker (format: "yyyy-MM-dd" for single, ["yyyy-MM-dd", "yyyy-MM-dd"] for range) */
|
|
8
|
+
defaultValue?: string | string[];
|
|
7
9
|
/** Whether the calendar icon has full bg*/
|
|
8
10
|
iconBGFull?: boolean;
|
|
9
11
|
/** Position of the calendar icon: left or right */
|
|
@@ -26,9 +26,37 @@ var formatDateRange = function (dateRange) {
|
|
|
26
26
|
return "".concat(format(from, "dd/MM/yyyy"), " - ").concat(format(to, "dd/MM/yyyy"));
|
|
27
27
|
};
|
|
28
28
|
var DateTimePicker = function (_a) {
|
|
29
|
-
var _b = _a.placeholder, placeholder = _b === void 0 ? "Select date" : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.mode, mode = _d === void 0 ? "both" : _d, _e = _a.selectionMode, selectionMode = _e === void 0 ? "range" : _e, _f = _a.numberOfMonths, numberOfMonths = _f === void 0 ? 2 : _f, _g = _a.disableBeforeToday, disableBeforeToday = _g === void 0 ? true : _g, _h = _a.disableToday, disableToday = _h === void 0 ? false : _h, onValueChange = _a.onValueChange, _j = _a.iconBGFull, iconBGFull = _j === void 0 ? true : _j, _k = _a.iconPosition, iconPosition = _k === void 0 ? "right" : _k, _l = _a.showChevron, showChevron = _l === void 0 ? false : _l;
|
|
30
|
-
|
|
31
|
-
var
|
|
29
|
+
var _b = _a.placeholder, placeholder = _b === void 0 ? "Select date" : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.mode, mode = _d === void 0 ? "both" : _d, _e = _a.selectionMode, selectionMode = _e === void 0 ? "range" : _e, _f = _a.numberOfMonths, numberOfMonths = _f === void 0 ? 2 : _f, _g = _a.disableBeforeToday, disableBeforeToday = _g === void 0 ? true : _g, _h = _a.disableToday, disableToday = _h === void 0 ? false : _h, onValueChange = _a.onValueChange, defaultValue = _a.defaultValue, _j = _a.iconBGFull, iconBGFull = _j === void 0 ? true : _j, _k = _a.iconPosition, iconPosition = _k === void 0 ? "right" : _k, _l = _a.showChevron, showChevron = _l === void 0 ? false : _l;
|
|
30
|
+
// Parse default value and set initial state
|
|
31
|
+
var parseDefaultValue = function () {
|
|
32
|
+
if (!defaultValue)
|
|
33
|
+
return { value: "", dateRange: undefined };
|
|
34
|
+
try {
|
|
35
|
+
if (selectionMode === "range" && Array.isArray(defaultValue)) {
|
|
36
|
+
// Handle range: ["yyyy-MM-dd", "yyyy-MM-dd"]
|
|
37
|
+
var fromStr = defaultValue[0], toStr = defaultValue[1];
|
|
38
|
+
var from = new Date(fromStr);
|
|
39
|
+
var to = toStr ? new Date(toStr) : from;
|
|
40
|
+
var dateRange = { from: from, to: to };
|
|
41
|
+
var displayValue = formatDateRange(dateRange);
|
|
42
|
+
return { value: displayValue, dateRange: dateRange };
|
|
43
|
+
}
|
|
44
|
+
else if (selectionMode === "single" && typeof defaultValue === "string") {
|
|
45
|
+
// Handle single: "yyyy-MM-dd"
|
|
46
|
+
var date = new Date(defaultValue);
|
|
47
|
+
var dateRange = { from: date, to: date };
|
|
48
|
+
var displayValue = format(date, "dd/MM/yyyy");
|
|
49
|
+
return { value: displayValue, dateRange: dateRange };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.error("Error parsing default date value:", error);
|
|
54
|
+
}
|
|
55
|
+
return { value: "", dateRange: undefined };
|
|
56
|
+
};
|
|
57
|
+
var initialState = parseDefaultValue();
|
|
58
|
+
var _m = useState(initialState.value), value = _m[0], setValue = _m[1];
|
|
59
|
+
var _o = useState(initialState.dateRange), selectedDateRange = _o[0], setSelectedDateRange = _o[1];
|
|
32
60
|
var _p = useState(undefined), selectedTime = _p[0], setSelectedTime = _p[1];
|
|
33
61
|
var _q = useState(false), isOpen = _q[0], setIsOpen = _q[1];
|
|
34
62
|
var handleDtChange = React.useCallback(function (payload) {
|
|
@@ -174,6 +174,6 @@ var RoundTrip = function (_a) {
|
|
|
174
174
|
};
|
|
175
175
|
var pickupDropoffOptions = getPickupDropoffOptions();
|
|
176
176
|
var accommodationOptions = getAccommodationOptions();
|
|
177
|
-
return (_jsx("div", __assign({ className: "round-trip ".concat(className), "data-round-trip-id": id }, { children: _jsxs("div", __assign({ className: "round-trip__content" }, { children: [_jsx("div", __assign({ className: "round-trip__field round-trip__field--pax" }, { children: _jsx(PaxSelector, { label: "Number of pax", value: internalPaxData, onChange: handlePaxChange, placeholder: "2 pax" }) })), _jsxs("div", __assign({ className: "round-trip__field round-trip__field--dates" }, { children: [_jsx(Text, __assign({ size: "sm", variant: "regular", className: "round-trip__field-label" }, { children: "Arrival date - Departure date" })), _jsx(DateTimePicker, { placeholder: "DD/MM/YYYY - DD/MM/YYYY", mode: "calendar", iconPosition: "left", numberOfMonths: 2, iconBGFull: false, showChevron: true, onValueChange: handleDateRangeChange, selectionMode: "range" })] })), _jsx("div", __assign({ className: "round-trip__field round-trip__field--pickup-dropoff" }, { children: _jsx(LocationDropdown, { label: "Pick up / Drop-off point", options: pickupDropoffOptions.options, groups: pickupDropoffOptions.groups, selectedValue: (internalPickupDropoffPoint === null || internalPickupDropoffPoint === void 0 ? void 0 : internalPickupDropoffPoint.id) || null, onSelectionChange: handlePickupDropoffChange, placeholder: "Select pick-up / drop-off point", direction: undefined, type: "airport-port", showGroupTitles: true }) })), _jsx("div", __assign({ className: "round-trip__field round-trip__field--accommodation" }, { children: _jsx(LocationDropdown, { label: "Accommodation", options: accommodationOptions.options, groups: accommodationOptions.groups, selectedValue: (internalAccommodation === null || internalAccommodation === void 0 ? void 0 : internalAccommodation.id) || null, onSelectionChange: handleAccommodationChange, placeholder: "Select accommodation", direction: "dropoff", type: "accommodation", showGroupTitles: false }) }))] })) })));
|
|
177
|
+
return (_jsx("div", __assign({ className: "round-trip ".concat(className), "data-round-trip-id": id }, { children: _jsxs("div", __assign({ className: "round-trip__content" }, { children: [_jsx("div", __assign({ className: "round-trip__field round-trip__field--pax" }, { children: _jsx(PaxSelector, { label: "Number of pax", value: internalPaxData, onChange: handlePaxChange, placeholder: "2 pax" }) })), _jsxs("div", __assign({ className: "round-trip__field round-trip__field--dates" }, { children: [_jsx(Text, __assign({ size: "sm", variant: "regular", className: "round-trip__field-label" }, { children: "Arrival date - Departure date" })), _jsx(DateTimePicker, { placeholder: "DD/MM/YYYY - DD/MM/YYYY", mode: "calendar", iconPosition: "left", numberOfMonths: 2, iconBGFull: false, showChevron: true, onValueChange: handleDateRangeChange, selectionMode: "range", defaultValue: arrivalDate && departureDate ? [arrivalDate, departureDate] : undefined })] })), _jsx("div", __assign({ className: "round-trip__field round-trip__field--pickup-dropoff" }, { children: _jsx(LocationDropdown, { label: "Pick up / Drop-off point", options: pickupDropoffOptions.options, groups: pickupDropoffOptions.groups, selectedValue: (internalPickupDropoffPoint === null || internalPickupDropoffPoint === void 0 ? void 0 : internalPickupDropoffPoint.id) || null, onSelectionChange: handlePickupDropoffChange, placeholder: "Select pick-up / drop-off point", direction: undefined, type: "airport-port", showGroupTitles: true }) })), _jsx("div", __assign({ className: "round-trip__field round-trip__field--accommodation" }, { children: _jsx(LocationDropdown, { label: "Accommodation", options: accommodationOptions.options, groups: accommodationOptions.groups, selectedValue: (internalAccommodation === null || internalAccommodation === void 0 ? void 0 : internalAccommodation.id) || null, onSelectionChange: handleAccommodationChange, placeholder: "Select accommodation", direction: "dropoff", type: "accommodation", showGroupTitles: false }) }))] })) })));
|
|
178
178
|
};
|
|
179
179
|
export default RoundTrip;
|
|
@@ -174,6 +174,6 @@ var TransferLine = function (_a) {
|
|
|
174
174
|
setInternalDropoffPoint(location);
|
|
175
175
|
onDropoffChange === null || onDropoffChange === void 0 ? void 0 : onDropoffChange(location);
|
|
176
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" }) })) })))] }))] })));
|
|
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", defaultValue: transferDate })] })), _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
178
|
};
|
|
179
179
|
export default TransferLine;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
3
|
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export { Popover,
|
|
7
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -21,8 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import * as PopoverPrimitive from
|
|
25
|
-
import { cn } from
|
|
24
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
25
|
+
import { cn } from "../../lib/utils";
|
|
26
26
|
function Popover(_a) {
|
|
27
27
|
var props = __rest(_a, []);
|
|
28
28
|
return _jsx(PopoverPrimitive.Root, __assign({ "data-slot": "popover" }, props));
|
|
@@ -32,11 +32,11 @@ function PopoverTrigger(_a) {
|
|
|
32
32
|
return _jsx(PopoverPrimitive.Trigger, __assign({ "data-slot": "popover-trigger" }, props));
|
|
33
33
|
}
|
|
34
34
|
function PopoverContent(_a) {
|
|
35
|
-
var className = _a.className, _b = _a.align, align = _b === void 0 ?
|
|
36
|
-
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, __assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn(
|
|
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
37
|
}
|
|
38
38
|
function PopoverAnchor(_a) {
|
|
39
39
|
var props = __rest(_a, []);
|
|
40
40
|
return _jsx(PopoverPrimitive.Anchor, __assign({ "data-slot": "popover-anchor" }, props));
|
|
41
41
|
}
|
|
42
|
-
export { Popover,
|
|
42
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,66 +6,58 @@ export { default as Icon } from './components/atoms/Icon/Icon';
|
|
|
6
6
|
export { default as DropdownInput } from './components/atoms/Inputs/DropdownInput/DropdownInput';
|
|
7
7
|
export { default as Input } from './components/atoms/Inputs/Input/Input';
|
|
8
8
|
export { default as Textarea } from './components/atoms/Inputs/Textarea/Textarea';
|
|
9
|
-
export { default as RatingStar } from './components/atoms/RatingStar/RatingStar';
|
|
10
|
-
export { default as SegmentedButton } from './components/atoms/SegmentedButton/SegmentedButton';
|
|
11
9
|
export { default as SelectedValue } from './components/atoms/SelectedValue/SelectedValue';
|
|
12
|
-
export { default as Slider } from './components/atoms/Slider/Slider';
|
|
13
10
|
export { default as Spinner } from './components/atoms/Spinner/Spinner';
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
11
|
+
export { default as Slider } from './components/atoms/Slider/Slider';
|
|
12
|
+
export { default as RatingStar } from './components/atoms/RatingStar/RatingStar';
|
|
13
|
+
export { Heading } from './components/atoms/Typography/Typography';
|
|
14
|
+
export { Text } from './components/atoms/Typography/Typography';
|
|
15
|
+
export { default as SegmentedButton } from './components/atoms/SegmentedButton/SegmentedButton';
|
|
16
|
+
export { default as MultiSelectDropdown } from './components/molecules/MultiSelectDropdown/MultiSelectDropdown';
|
|
17
17
|
export { default as CalendarInput } from './components/molecules/Calendar/CalendarInput';
|
|
18
18
|
export { default as TimePicker } from './components/molecules/Calendar/TimePicker';
|
|
19
|
-
export { default as FeatureRow } from './components/molecules/FeatureRow/FeatureRow';
|
|
20
|
-
export { default as FromTo } from './components/molecules/FromTo/FromTo';
|
|
21
|
-
export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
22
|
-
export { default as MultiSelectDropdown } from './components/molecules/MultiSelectDropdown/MultiSelectDropdown';
|
|
23
|
-
export { default as Pagination } from './components/molecules/Pagination/Pagination';
|
|
24
19
|
export { default as RatingTab } from './components/molecules/RatingTab/RatingTab';
|
|
25
|
-
export { default as
|
|
20
|
+
export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
26
21
|
export { default as ServiceSelector } from './components/molecules/ServiceSelector/ServiceSelector';
|
|
22
|
+
export { default as Pagination } from './components/molecules/Pagination/Pagination';
|
|
27
23
|
export { default as Stepper } from './components/molecules/Stepper/Stepper';
|
|
28
|
-
export { default as
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
|
|
32
|
-
export { CardContainer } from './components/organisms/CardContainer/CardContainer';
|
|
33
|
-
export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
34
|
-
export { Dialog } from './components/organisms/Dialog/Dialog';
|
|
24
|
+
export { default as FeatureRow } from './components/molecules/FeatureRow/FeatureRow';
|
|
25
|
+
export { default as SectionTitle } from './components/molecules/SectionTitle/SectionTitle';
|
|
26
|
+
export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
|
|
35
27
|
export { Footer } from './components/organisms/Footer/Footer';
|
|
28
|
+
export { Dialog } from './components/organisms/Dialog/Dialog';
|
|
29
|
+
export { CardContainer } from './components/organisms/CardContainer/CardContainer';
|
|
30
|
+
export { Illustration } from './components/atoms/Illustration/Illustration';
|
|
36
31
|
export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSelector';
|
|
32
|
+
export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
37
33
|
export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
|
|
38
|
-
export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
|
|
39
|
-
export * from './components/organisms/Table';
|
|
40
|
-
export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
|
|
41
34
|
export { default as TransferLine } from './components/organisms/TransferLine/TransferLine';
|
|
35
|
+
export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
|
|
36
|
+
export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
|
|
42
37
|
export { default as ButtonSpinner } from './components/atoms/Spinner/variants/ButtonSpinner';
|
|
43
38
|
export { default as LoadingSpinner } from './components/atoms/Spinner/variants/LoadingSpinner';
|
|
44
39
|
export { default as CheckIcon } from './components/atoms/Icon/icons/Check';
|
|
45
40
|
export { default as ChevronIcon } from './components/atoms/Icon/icons/Chevron';
|
|
46
41
|
export { default as CloseIcon } from './components/atoms/Icon/icons/Close';
|
|
47
|
-
export { default as HomeIcon } from './components/atoms/Icon/icons/HomeIcon';
|
|
48
|
-
export { default as MinusIcon } from './components/atoms/Icon/icons/MinusIcon';
|
|
49
|
-
export { default as PlusIcon } from './components/atoms/Icon/icons/PlusIcon';
|
|
50
42
|
export { default as SearchIcon } from './components/atoms/Icon/icons/Search';
|
|
51
43
|
export { default as SettingsIcon } from './components/atoms/Icon/icons/Settings';
|
|
52
44
|
export { default as UserIcon } from './components/atoms/Icon/icons/User';
|
|
45
|
+
export { default as PlusIcon } from './components/atoms/Icon/icons/PlusIcon';
|
|
46
|
+
export { default as MinusIcon } from './components/atoms/Icon/icons/MinusIcon';
|
|
47
|
+
export { default as HomeIcon } from './components/atoms/Icon/icons/HomeIcon';
|
|
48
|
+
export type { TopNavigationProps } from './components/organisms/TopNavigation/TopNavigation';
|
|
49
|
+
export type { FooterProps } from './components/organisms/Footer/Footer';
|
|
50
|
+
export type { DialogProps, DialogSize } from './components/organisms/Dialog/Dialog';
|
|
51
|
+
export type { CardContainerProps, CardContainerSpacing } from './components/organisms/CardContainer/CardContainer';
|
|
52
|
+
export type { PaxSelectorProps, PaxData, ClientType } from './components/organisms/PaxSelector/PaxSelector';
|
|
53
|
+
export type { LocationDropdownProps, LocationOption, LocationGroup, LocationData } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
54
|
+
export type { ServiceSelectorProps, ServiceType, ServiceOption } from './components/molecules/ServiceSelector/ServiceSelector';
|
|
55
|
+
export type { DateTimePickerProps } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
56
|
+
export type { RoundTripProps, RoundTripData, RoundTripTransfer } from './components/organisms/RoundTrip/RoundTrip';
|
|
57
|
+
export type { TransferLineProps, TransferLineData, TransferType } from './components/organisms/TransferLine/TransferLine';
|
|
58
|
+
export type { SearchBarTransferProps, SearchBarTransferData, TransferMode } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
|
|
59
|
+
export type { CarBookingCardProps, CarBookingCardPriceRow, CarBookingCardSize, CarBookingCardState, CarBookingCardType, } from './components/organisms/CarBookingCard/CarBookingCard';
|
|
53
60
|
export type { DividerProps } from './components/atoms/Divider/Divider';
|
|
54
|
-
export type { FeatureRowProps } from './components/molecules/FeatureRow/FeatureRow';
|
|
55
|
-
export type { LocationData, LocationDropdownProps, LocationGroup, LocationOption, } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
56
|
-
export type { ServiceOption, ServiceSelectorProps, ServiceType, } from './components/molecules/ServiceSelector/ServiceSelector';
|
|
57
61
|
export type { StepperProps } from './components/molecules/Stepper/Stepper';
|
|
58
|
-
export type {
|
|
59
|
-
export type { CardContainerProps, CardContainerSpacing, } from './components/organisms/CardContainer/CardContainer';
|
|
60
|
-
export type { DateTimePickerProps } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
61
|
-
export type { DialogProps, DialogSize } from './components/organisms/Dialog/Dialog';
|
|
62
|
-
export type { FooterProps } from './components/organisms/Footer/Footer';
|
|
63
|
-
export type { ClientType, PaxData, PaxSelectorProps, } from './components/organisms/PaxSelector/PaxSelector';
|
|
64
|
-
export type { RoundTripData, RoundTripProps, RoundTripTransfer, } from './components/organisms/RoundTrip/RoundTrip';
|
|
65
|
-
export type { SearchBarTransferData, SearchBarTransferProps, TransferMode, } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
|
|
66
|
-
export type { TopNavigationProps } from './components/organisms/TopNavigation/TopNavigation';
|
|
67
|
-
export type { TransferLineData, TransferLineProps, TransferType, } from './components/organisms/TransferLine/TransferLine';
|
|
68
|
-
export type { FromToProps } from './components/molecules/FromTo/FromTo';
|
|
62
|
+
export type { FeatureRowProps } from './components/molecules/FeatureRow/FeatureRow';
|
|
69
63
|
export type { SectionTitleProps } from './components/molecules/SectionTitle/SectionTitle';
|
|
70
|
-
export type { DetailsColProps, ItemColProps, RowAccommodationProps, RowExcursionProps, RowTransferProps, } from './components/molecules/TableServiceItem';
|
|
71
|
-
export * from './types/table';
|
package/dist/index.js
CHANGED
|
@@ -7,41 +7,36 @@ export { default as Icon } from './components/atoms/Icon/Icon';
|
|
|
7
7
|
export { default as DropdownInput } from './components/atoms/Inputs/DropdownInput/DropdownInput';
|
|
8
8
|
export { default as Input } from './components/atoms/Inputs/Input/Input';
|
|
9
9
|
export { default as Textarea } from './components/atoms/Inputs/Textarea/Textarea';
|
|
10
|
-
export { default as RatingStar } from './components/atoms/RatingStar/RatingStar';
|
|
11
|
-
export { default as SegmentedButton } from './components/atoms/SegmentedButton/SegmentedButton';
|
|
12
10
|
export { default as SelectedValue } from './components/atoms/SelectedValue/SelectedValue';
|
|
13
|
-
export { default as Slider } from './components/atoms/Slider/Slider';
|
|
14
11
|
export { default as Spinner } from './components/atoms/Spinner/Spinner';
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
12
|
+
export { default as Slider } from './components/atoms/Slider/Slider';
|
|
13
|
+
export { default as RatingStar } from './components/atoms/RatingStar/RatingStar';
|
|
14
|
+
export { Heading } from './components/atoms/Typography/Typography';
|
|
15
|
+
export { Text } from './components/atoms/Typography/Typography';
|
|
16
|
+
export { default as SegmentedButton } from './components/atoms/SegmentedButton/SegmentedButton';
|
|
18
17
|
// Molecules - Composed components
|
|
18
|
+
export { default as MultiSelectDropdown } from './components/molecules/MultiSelectDropdown/MultiSelectDropdown';
|
|
19
19
|
export { default as CalendarInput } from './components/molecules/Calendar/CalendarInput';
|
|
20
20
|
export { default as TimePicker } from './components/molecules/Calendar/TimePicker';
|
|
21
|
-
export { default as FeatureRow } from './components/molecules/FeatureRow/FeatureRow';
|
|
22
|
-
export { default as FromTo } from './components/molecules/FromTo/FromTo';
|
|
23
|
-
export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
24
|
-
export { default as MultiSelectDropdown } from './components/molecules/MultiSelectDropdown/MultiSelectDropdown';
|
|
25
|
-
export { default as Pagination } from './components/molecules/Pagination/Pagination';
|
|
26
21
|
export { default as RatingTab } from './components/molecules/RatingTab/RatingTab';
|
|
27
|
-
export { default as
|
|
22
|
+
export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
28
23
|
export { default as ServiceSelector } from './components/molecules/ServiceSelector/ServiceSelector';
|
|
24
|
+
export { default as Pagination } from './components/molecules/Pagination/Pagination';
|
|
29
25
|
export { default as Stepper } from './components/molecules/Stepper/Stepper';
|
|
30
|
-
export { default as
|
|
26
|
+
export { default as FeatureRow } from './components/molecules/FeatureRow/FeatureRow';
|
|
27
|
+
export { default as SectionTitle } from './components/molecules/SectionTitle/SectionTitle';
|
|
31
28
|
// Organisms - Complex components
|
|
32
|
-
export {
|
|
33
|
-
export { default as TableServiceItem } from './components/molecules/TableServiceItem';
|
|
34
|
-
export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
|
|
35
|
-
export { CardContainer } from './components/organisms/CardContainer/CardContainer';
|
|
36
|
-
export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
37
|
-
export { Dialog } from './components/organisms/Dialog/Dialog';
|
|
29
|
+
export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
|
|
38
30
|
export { Footer } from './components/organisms/Footer/Footer';
|
|
31
|
+
export { Dialog } from './components/organisms/Dialog/Dialog';
|
|
32
|
+
export { CardContainer } from './components/organisms/CardContainer/CardContainer';
|
|
33
|
+
export { Illustration } from './components/atoms/Illustration/Illustration';
|
|
39
34
|
export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSelector';
|
|
35
|
+
export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
40
36
|
export { default as RoundTrip } from './components/organisms/RoundTrip/RoundTrip';
|
|
41
|
-
export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
|
|
42
|
-
export * from './components/organisms/Table';
|
|
43
|
-
export { TopNavigation } from './components/organisms/TopNavigation/TopNavigation';
|
|
44
37
|
export { default as TransferLine } from './components/organisms/TransferLine/TransferLine';
|
|
38
|
+
export { default as SearchBarTransfer } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
|
|
39
|
+
export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
|
|
45
40
|
// Spinner Variants
|
|
46
41
|
export { default as ButtonSpinner } from './components/atoms/Spinner/variants/ButtonSpinner';
|
|
47
42
|
export { default as LoadingSpinner } from './components/atoms/Spinner/variants/LoadingSpinner';
|
|
@@ -49,12 +44,11 @@ export { default as LoadingSpinner } from './components/atoms/Spinner/variants/L
|
|
|
49
44
|
export { default as CheckIcon } from './components/atoms/Icon/icons/Check';
|
|
50
45
|
export { default as ChevronIcon } from './components/atoms/Icon/icons/Chevron';
|
|
51
46
|
export { default as CloseIcon } from './components/atoms/Icon/icons/Close';
|
|
52
|
-
export { default as HomeIcon } from './components/atoms/Icon/icons/HomeIcon';
|
|
53
|
-
export { default as MinusIcon } from './components/atoms/Icon/icons/MinusIcon';
|
|
54
|
-
export { default as PlusIcon } from './components/atoms/Icon/icons/PlusIcon';
|
|
55
47
|
export { default as SearchIcon } from './components/atoms/Icon/icons/Search';
|
|
56
48
|
export { default as SettingsIcon } from './components/atoms/Icon/icons/Settings';
|
|
57
49
|
export { default as UserIcon } from './components/atoms/Icon/icons/User';
|
|
58
|
-
export
|
|
50
|
+
export { default as PlusIcon } from './components/atoms/Icon/icons/PlusIcon';
|
|
51
|
+
export { default as MinusIcon } from './components/atoms/Icon/icons/MinusIcon';
|
|
52
|
+
export { default as HomeIcon } from './components/atoms/Icon/icons/HomeIcon';
|
|
59
53
|
// export type { InputProps } from './components/atoms/Inputs/Input/Input';
|
|
60
54
|
// export type { CheckboxProps } from './components/atoms/Checkbox/Checkbox';
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mautourco-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Bibliothèque de composants Motorco pour le redesign",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"engines": {
|
|
9
|
-
"node": ">=23.0.0"
|
|
10
|
-
},
|
|
11
8
|
"files": [
|
|
12
9
|
"dist",
|
|
13
10
|
"src/components",
|
|
@@ -27,7 +24,6 @@
|
|
|
27
24
|
"dependencies": {
|
|
28
25
|
"@radix-ui/react-popover": "^1.1.15",
|
|
29
26
|
"@radix-ui/react-slot": "^1.2.4",
|
|
30
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
31
27
|
"@testing-library/dom": "^10.4.1",
|
|
32
28
|
"@testing-library/jest-dom": "^6.8.0",
|
|
33
29
|
"@testing-library/react": "^16.3.0",
|
|
@@ -40,7 +36,6 @@
|
|
|
40
36
|
"clsx": "^2.1.1",
|
|
41
37
|
"date-fns": "^4.1.0",
|
|
42
38
|
"lucide-react": "^0.554.0",
|
|
43
|
-
"motion": "^12.23.26",
|
|
44
39
|
"react": "^19.1.1",
|
|
45
40
|
"react-day-picker": "^9.11.2",
|
|
46
41
|
"react-dom": "^19.1.1",
|
|
@@ -3,13 +3,19 @@ import { ICONS, type IconName } from './icons/registry';
|
|
|
3
3
|
|
|
4
4
|
interface IconProps {
|
|
5
5
|
name: IconName;
|
|
6
|
-
size?:
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
7
7
|
className?: string;
|
|
8
8
|
color?: string;
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const Icon: React.FC<IconProps> = ({
|
|
12
|
+
const Icon: React.FC<IconProps> = ({
|
|
13
|
+
name,
|
|
14
|
+
size = "md",
|
|
15
|
+
className = "",
|
|
16
|
+
color,
|
|
17
|
+
style,
|
|
18
|
+
}) => {
|
|
13
19
|
const IconComponent = ICONS[name];
|
|
14
20
|
return <IconComponent size={size} className={className} color={color} style={style} />;
|
|
15
21
|
};
|
|
@@ -40,11 +40,16 @@ const ArrowRightOutlineIcon: React.FC<ArrowRightOutlineIconProps> = ({
|
|
|
40
40
|
xmlns="http://www.w3.org/2000/svg"
|
|
41
41
|
>
|
|
42
42
|
<path
|
|
43
|
-
d="
|
|
44
|
-
|
|
43
|
+
d="M6 12L10 8L6 4"
|
|
44
|
+
stroke="currentColor"
|
|
45
|
+
strokeWidth="1.5"
|
|
46
|
+
strokeLinecap="round"
|
|
47
|
+
strokeLinejoin="round"
|
|
48
|
+
fill="none"
|
|
45
49
|
/>
|
|
46
50
|
</svg>
|
|
47
51
|
);
|
|
48
52
|
};
|
|
49
53
|
|
|
50
54
|
export default ArrowRightOutlineIcon;
|
|
55
|
+
|