@admin-layout/tailwind-travel-pro 12.0.16-alpha.93 → 12.2.1-alpha.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/lib/components/CardList.js +20 -22
- package/lib/components/CardList.js.map +1 -1
- package/lib/components/CategoriesTypeList.d.ts +2 -1
- package/lib/components/CategoriesTypeList.d.ts.map +1 -1
- package/lib/components/CategoriesTypeList.js +46 -51
- package/lib/components/CategoriesTypeList.js.map +1 -1
- package/lib/components/LazyLoadingGoogleMarker.js +15 -18
- package/lib/components/LazyLoadingGoogleMarker.js.map +1 -1
- package/lib/components/Pagination.d.ts +2 -1
- package/lib/components/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination.js +15 -16
- package/lib/components/Pagination.js.map +1 -1
- package/lib/components/ParamSearchResultContainer.d.ts +1 -1
- package/lib/components/ParamSearchResultContainer.d.ts.map +1 -1
- package/lib/components/ParamSearchResultContainer.js +21 -26
- package/lib/components/ParamSearchResultContainer.js.map +1 -1
- package/lib/components/PropertyCard.d.ts +1 -1
- package/lib/components/PropertyCard.d.ts.map +1 -1
- package/lib/components/PropertyCard.js +198 -264
- package/lib/components/PropertyCard.js.map +1 -1
- package/lib/components/PropertyCardOnMap.d.ts +2 -1
- package/lib/components/PropertyCardOnMap.d.ts.map +1 -1
- package/lib/components/PropertyCardOnMap.js +67 -85
- package/lib/components/PropertyCardOnMap.js.map +1 -1
- package/lib/components/VehicleCard/PricePopover.js +39 -58
- package/lib/components/VehicleCard/PricePopover.js.map +1 -1
- package/lib/components/VehicleCard/VehicleFeature.js +13 -17
- package/lib/components/VehicleCard/VehicleFeature.js.map +1 -1
- package/lib/components/VehicleCard.js +106 -134
- package/lib/components/VehicleCard.js.map +1 -1
- package/lib/components/VehicleCardList.js +18 -19
- package/lib/components/VehicleCardList.js.map +1 -1
- package/lib/components/VehicleParamSearchResultContainer.d.ts +2 -2
- package/lib/components/VehicleParamSearchResultContainer.d.ts.map +1 -1
- package/lib/components/icons/LocationIcon.d.ts +2 -1
- package/lib/components/icons/LocationIcon.d.ts.map +1 -1
- package/lib/components/icons/LocationIcon.js +7 -8
- package/lib/components/icons/LocationIcon.js.map +1 -1
- package/lib/index.js +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React,{useMemo,useState,useEffect}from'react';import {useTranslation}from'react-i18next';import {Link}from'@remix-run/react';import {BsStarFill}from'@react-icons/all-files/bs/BsStarFill.js';import {Carousel,CarouselContent,CarouselItem,CarouselPrevious,CarouselNext}from'@admin-layout/tailwind-ui/lib/shardui/carousel';import {useLayoutSettings}from'@admin-layout/client';const PropertyCardOnMap = ({
|
|
2
2
|
room,
|
|
3
3
|
isSaved,
|
|
4
4
|
carouselOptions = {},
|
|
@@ -44,88 +44,70 @@ import {jsxs,jsx}from'react/jsx-runtime';import React,{useMemo,useState,useEffec
|
|
|
44
44
|
};
|
|
45
45
|
}, [carouselApi]);
|
|
46
46
|
// const { color, grayColor } = useColorTheme();
|
|
47
|
-
return
|
|
48
|
-
className: `flex flex-col flex-wrap mt-4 ${className}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
className: "flex items-center",
|
|
114
|
-
children: [jsx(BsStarFill, {
|
|
115
|
-
className: "text-yellow-500 w-3 h-3 mr-1"
|
|
116
|
-
}), jsxs("span", {
|
|
117
|
-
className: "text-[0.832rem] font-bold",
|
|
118
|
-
style: {
|
|
119
|
-
color: settings?.secondaryColor
|
|
120
|
-
},
|
|
121
|
-
children: [room?.reviewsOverview ? room.reviewsOverview.rating : 0, " (", room.reviewsOverview ? room.reviewsOverview.ratingCount : 0, " ", t('property.reviews'), ")"]
|
|
122
|
-
})]
|
|
123
|
-
})]
|
|
124
|
-
}), jsx("div", {
|
|
125
|
-
className: "text-lg font-bold mt-auto mb-[-2px]",
|
|
126
|
-
children: room.preferences?.property?.pricing?.price?.price_breakdown?.details?.pricing?.finalPrice?.total
|
|
127
|
-
})]
|
|
128
|
-
})]
|
|
129
|
-
})]
|
|
130
|
-
});
|
|
47
|
+
return React.createElement("div", {
|
|
48
|
+
className: `flex flex-col flex-wrap mt-4 ${className}`
|
|
49
|
+
}, React.createElement("div", {
|
|
50
|
+
className: "w-full"
|
|
51
|
+
}, React.createElement(Carousel, {
|
|
52
|
+
setApi: setCarouselApi,
|
|
53
|
+
"aria-label": t('property.property_images'),
|
|
54
|
+
opts: {
|
|
55
|
+
align: 'start',
|
|
56
|
+
loop: true,
|
|
57
|
+
...carouselOptions
|
|
58
|
+
},
|
|
59
|
+
className: "w-full relative"
|
|
60
|
+
}, React.createElement(CarouselContent, null, images && images.length == 0 && React.createElement(CarouselItem, null, React.createElement("div", {
|
|
61
|
+
className: "w-[280px] h-[200px]"
|
|
62
|
+
}, React.createElement("img", {
|
|
63
|
+
src: room.thumbnailUrl,
|
|
64
|
+
className: "w-[280px] h-[200px] object-cover cursor-pointer transition-all duration-500 hover:brightness-50",
|
|
65
|
+
loading: "lazy",
|
|
66
|
+
alt: room.title || 'Property'
|
|
67
|
+
}))), images.map((image, i) => {
|
|
68
|
+
return React.createElement(CarouselItem, {
|
|
69
|
+
key: 'sliderImage1_' + i
|
|
70
|
+
}, React.createElement(Link, {
|
|
71
|
+
to: '/property/' + room.id,
|
|
72
|
+
className: "w-full"
|
|
73
|
+
}, React.createElement("div", {
|
|
74
|
+
className: "w-[280px] h-[200px]"
|
|
75
|
+
}, React.createElement("img", {
|
|
76
|
+
src: image.src,
|
|
77
|
+
className: "w-[280px] h-[200px] object-cover cursor-pointer transition-all duration-500 hover:brightness-50",
|
|
78
|
+
loading: "lazy",
|
|
79
|
+
alt: room.title || 'Property'
|
|
80
|
+
}))));
|
|
81
|
+
})), React.createElement(CarouselPrevious, {
|
|
82
|
+
className: "absolute left-2 top-1/2 -translate-y-1/2 bg-background hover:bg-muted"
|
|
83
|
+
}), React.createElement(CarouselNext, {
|
|
84
|
+
className: "absolute right-2 top-1/2 -translate-y-1/2 bg-background hover:bg-muted"
|
|
85
|
+
}))), React.createElement("div", {
|
|
86
|
+
className: "w-full flex flex-col mt-2"
|
|
87
|
+
}, React.createElement("div", {
|
|
88
|
+
className: "font-semibold text-sm",
|
|
89
|
+
style: {
|
|
90
|
+
color: settings?.primaryColor
|
|
91
|
+
}
|
|
92
|
+
}, room?.title), React.createElement("div", {
|
|
93
|
+
className: "flex flex-row justify-between"
|
|
94
|
+
}, React.createElement("div", {
|
|
95
|
+
className: "flex flex-col"
|
|
96
|
+
}, React.createElement("div", {
|
|
97
|
+
className: "mt-1 flex text-[9px] font-semibold",
|
|
98
|
+
style: {
|
|
99
|
+
color: settings?.primaryColor
|
|
100
|
+
}
|
|
101
|
+
}, room?.address && room?.address.city && room?.address.city.state ? room?.address.city.name + ', ' + room?.address.city.state.name : ''), React.createElement("div", {
|
|
102
|
+
className: "flex items-center"
|
|
103
|
+
}, React.createElement(BsStarFill, {
|
|
104
|
+
className: "text-yellow-500 w-3 h-3 mr-1"
|
|
105
|
+
}), React.createElement("span", {
|
|
106
|
+
className: "text-[0.832rem] font-bold",
|
|
107
|
+
style: {
|
|
108
|
+
color: settings?.secondaryColor
|
|
109
|
+
}
|
|
110
|
+
}, room?.reviewsOverview ? room.reviewsOverview.rating : 0, " (", room.reviewsOverview ? room.reviewsOverview.ratingCount : 0, " ", t('property.reviews'), ")"))), React.createElement("div", {
|
|
111
|
+
className: "text-lg font-bold mt-auto mb-[-2px]"
|
|
112
|
+
}, room.preferences?.property?.pricing?.price?.price_breakdown?.details?.pricing?.finalPrice?.total))));
|
|
131
113
|
};export{PropertyCardOnMap};//# sourceMappingURL=PropertyCardOnMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyCardOnMap.js","sources":["../../src/components/PropertyCardOnMap.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropertyCardOnMap.js","sources":["../../src/components/PropertyCardOnMap.tsx"],"sourcesContent":[null],"names":["LinkReact"],"mappings":"iYAyBa,iBAAiB,GAAG,CAAC;AAO9B,EAAA,IAAA;AACA,EAAA,OAAA;AACA,EAAA,eAAQ,GAAQ,EAAE;WACX,GAAA,EAAA;KAEP;MACA;QACI,MAAI,UAAW,CAAE,YAAW,MAAO,EAAE,IAAG,CAAA,GAAI,CAAE;;SAE9C;IACJ,GAAA,EAAA;AAEA,GAAA,CAAA,CAAA,EAAA,CAAA,IAAM,CAAA,CAAA;AACF,EAAA,MAAA;;AAEA,GAAA,GAAA,cAAM,EAAA;;AAGF,IAAA;uBACI,EAAA;oBACA,EAAA,cAAY,CAAA,GAAY,KAAC,CAAA,QAAA,EAAA;aAC5B,EAAA,OAAA,CAAA,GAAA,QAAA,CAAA,CAAA,CAAA;kBAAO;mBACJ,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,EAAA,MAAA,CAAA,GAAA,CAAA,CAAA,KAAA,EAAA,CAAA,KACL;gBAEV,CAAA,aAAA,CAAA,YAAA,EAAK;AAGO,MAAA,GAAA,EAAA,kBAGV;AAItB,KAAE,EAAA,KAAA,CAAA,aAAA,CAAAA,IAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React,{useState,useRef,useEffect}from'react';import {BiTag}from'@react-icons/all-files/bi/BiTag.js';const PricePopover = ({
|
|
2
2
|
pricing
|
|
3
3
|
}) => {
|
|
4
4
|
const [position, setPosition] = useState({
|
|
@@ -38,61 +38,42 @@ import {jsxs,Fragment,jsx}from'react/jsx-runtime';import {useState,useRef,useEff
|
|
|
38
38
|
window.removeEventListener('resize', updatePosition);
|
|
39
39
|
};
|
|
40
40
|
}, []);
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
className: "flex items-center justify-between",
|
|
80
|
-
children: [jsxs("span", {
|
|
81
|
-
className: "font-medium text-[15px] text-foreground",
|
|
82
|
-
children: ["Total ", pricing.period && `(${pricing.period})`]
|
|
83
|
-
}), jsxs("div", {
|
|
84
|
-
className: "text-right",
|
|
85
|
-
children: [jsxs("span", {
|
|
86
|
-
className: "text-xl font-semibold text-foreground",
|
|
87
|
-
children: [pricing.currency, " ", pricing.amount]
|
|
88
|
-
}), pricing.beforeTaxes && jsx("div", {
|
|
89
|
-
className: "text-sm text-muted-foreground",
|
|
90
|
-
children: "before taxes"
|
|
91
|
-
})]
|
|
92
|
-
})]
|
|
93
|
-
})
|
|
94
|
-
})]
|
|
95
|
-
})
|
|
96
|
-
})]
|
|
97
|
-
});
|
|
41
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
42
|
+
ref: triggerRef,
|
|
43
|
+
className: "absolute inset-0"
|
|
44
|
+
}), React.createElement("div", {
|
|
45
|
+
ref: popoverRef,
|
|
46
|
+
style: {
|
|
47
|
+
top: position.top,
|
|
48
|
+
left: position.left,
|
|
49
|
+
position: 'fixed'
|
|
50
|
+
},
|
|
51
|
+
className: "invisible group-hover:visible opacity-0 group-hover:opacity-100 transition-all duration-200 themed-dropdown p-4 min-w-[280px] z-50"
|
|
52
|
+
}, React.createElement("div", {
|
|
53
|
+
className: "flex flex-col gap-3"
|
|
54
|
+
}, React.createElement("div", {
|
|
55
|
+
className: "flex items-center justify-between text-[15px]"
|
|
56
|
+
}, React.createElement("span", {
|
|
57
|
+
className: "text-muted-foreground"
|
|
58
|
+
}, "Base rate"), React.createElement("span", {
|
|
59
|
+
className: "font-medium text-foreground"
|
|
60
|
+
}, pricing.currency, " ", pricing.amount)), pricing.discount && React.createElement("div", {
|
|
61
|
+
className: "flex items-center justify-between text-success"
|
|
62
|
+
}, React.createElement("div", {
|
|
63
|
+
className: "flex items-center"
|
|
64
|
+
}, React.createElement(BiTag, {
|
|
65
|
+
className: "h-4 w-4 mr-1"
|
|
66
|
+
}), React.createElement("span", null, "Discount")), React.createElement("span", null, "-", pricing.discount)), React.createElement("div", {
|
|
67
|
+
className: "border-t border-border mt-1 pt-3"
|
|
68
|
+
}, React.createElement("div", {
|
|
69
|
+
className: "flex items-center justify-between"
|
|
70
|
+
}, React.createElement("span", {
|
|
71
|
+
className: "font-medium text-[15px] text-foreground"
|
|
72
|
+
}, "Total ", pricing.period && `(${pricing.period})`), React.createElement("div", {
|
|
73
|
+
className: "text-right"
|
|
74
|
+
}, React.createElement("span", {
|
|
75
|
+
className: "text-xl font-semibold text-foreground"
|
|
76
|
+
}, pricing.currency, " ", pricing.amount), pricing.beforeTaxes && React.createElement("div", {
|
|
77
|
+
className: "text-sm text-muted-foreground"
|
|
78
|
+
}, "before taxes")))))));
|
|
98
79
|
};export{PricePopover as default};//# sourceMappingURL=PricePopover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PricePopover.js","sources":["../../../src/components/VehicleCard/PricePopover.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PricePopover.js","sources":["../../../src/components/VehicleCard/PricePopover.tsx"],"sourcesContent":[null],"names":[],"mappings":"2GAQA,MAAM,YAAY,GAAgC,CAAC;AAC/C,EAAA;AACA,CAAA,KAAA;AACA,EAAA,MAAA,CAAA,qBAA0C,CAAA,GAAI,QAAE,CAAA;IAEhD,GAAA,EAAA,CAAA;QACI,EAAA;;kBACoD,GAAA,MAAO,CAAA,IAAA,CAAA;kBAEjD,GAAA,OAAU,IAAA,CAAA;YAChB,MAAM;AACN,IAAA,MAAA,iBAAc,MAAG;qBACR,CAAA,OAAQ,IAAC,CAAA,UAAU,CAAA,OAAA,EAAA;mBACxB,GAAM,UAAS,CAAA,OAAA,CAAA,qBAAW,EAAA;mBAC5B,GAAA,UAAA,CAAA,OAAA,CAAA,qBAAA,EAAA;AAEF,MAAA,MAAA,QAAO,GAAG;AACV,QAAA,KAAA,EAAA,MAAQ,CAAA;cAER,EAAI,MAAM,CAAA;;aAET,GAAA,OAAA,CAAA,MAAA,GAAA,CAAA;cAED,GAAI,OAAO,CAAA,IAAA;gBACP,OAAO,CAAA,MAAA,GAAS,eAAgB,EAAA;cACnC,OAAA,CAAA,GAAA,GAAA,OAAA,CAAA,MAAA,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AAA,UAAA,CAAA,CAAA,EAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,IAAA,EAAA,GAAA,EAAA,OAAA,CAAA,QAAA,CAAA,CAAA,EAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAEF,IAAA,SAAA,EAAe;;;;;;;;;;;;"}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from'react';import {renderDynamicIcon}from'@admin-layout/tailwind-design-pro/lib/helpers/DynamicIcon.js';const VehicleFeature = ({
|
|
2
2
|
icon,
|
|
3
3
|
label,
|
|
4
4
|
iconColor = '#6B7280'
|
|
5
5
|
}) => {
|
|
6
|
-
return
|
|
7
|
-
className: "flex items-center bg-muted px-1.5 py-0.5 rounded-themed text-[11px] text-muted-foreground"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}), jsx("span", {
|
|
19
|
-
children: label
|
|
20
|
-
})]
|
|
21
|
-
});
|
|
6
|
+
return React.createElement("div", {
|
|
7
|
+
className: "flex items-center bg-muted px-1.5 py-0.5 rounded-themed text-[11px] text-muted-foreground"
|
|
8
|
+
}, React.createElement("div", {
|
|
9
|
+
className: "text-muted-foreground mr-0.5"
|
|
10
|
+
}, renderDynamicIcon({
|
|
11
|
+
name: icon,
|
|
12
|
+
style: {
|
|
13
|
+
iconColor: iconColor,
|
|
14
|
+
w: '20px',
|
|
15
|
+
h: '20px'
|
|
16
|
+
}
|
|
17
|
+
})), React.createElement("span", null, label));
|
|
22
18
|
};export{VehicleFeature as default};//# sourceMappingURL=VehicleFeature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleFeature.js","sources":["../../../src/components/VehicleCard/VehicleFeature.tsx"],"sourcesContent":[null],"names":[
|
|
1
|
+
{"version":3,"file":"VehicleFeature.js","sources":["../../../src/components/VehicleCard/VehicleFeature.tsx"],"sourcesContent":[null],"names":[],"mappings":"sHAQA,MAAM,cAAc,GAA+B,CAAC;AAChD,EAAA,IAAA;AAEQ,EAAA,KAAA;AAEQ,EAAA,SAAA,GAAA;AACA,CAAA,KAAA;AACI,EAAA,OAAA,KAAA,CAAA,aAAW,CAAA,KAAA,EAAS;AACpB,IAAA,SAAA,EAAA;AACA,GAAA,EAAA,KAAA,CAAA,aAAG,CAAM,KAAA,EAAA;AACZ,IAAA,SAAA,EAAA;AACJ,GAAA,EAAA,iBACC,CAAA;AACN,IAAA,IAAA,EAAA,IAAA;AAGZ,IAAE,KAAA,EAAA;AAEF,MAAA,SAAe;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import React,{useMemo}from'react';import {AiFillHeart}from'@react-icons/all-files/ai/AiFillHeart.js';import {AiFillStar}from'@react-icons/all-files/ai/AiFillStar.js';import {AiOutlineHeart}from'@react-icons/all-files/ai/AiOutlineHeart.js';import {FaAward}from'@react-icons/all-files/fa/FaAward.js';import {FaShieldAlt}from'@react-icons/all-files/fa/FaShieldAlt.js';import {FiMapPin}from'@react-icons/all-files/fi/FiMapPin.js';import {Button}from'@admin-layout/tailwind-ui/lib/shardui/button';import VehicleFeature from'./VehicleCard/VehicleFeature.js';import PricePopover from'./VehicleCard/PricePopover.js';const startCase = str => {
|
|
2
2
|
return str.toLowerCase().split('_').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
|
|
3
3
|
};
|
|
4
4
|
const seatWordToNumber = word => {
|
|
@@ -28,139 +28,111 @@ const VehicleCard = ({
|
|
|
28
28
|
extraIcons = []
|
|
29
29
|
}) => {
|
|
30
30
|
useMemo(() => categoryTypes?.filter(type => item?.types?.includes(type.id)), [item, categoryTypes]);
|
|
31
|
-
return
|
|
31
|
+
return React.createElement("div", {
|
|
32
32
|
className: "bg-card text-card-foreground rounded-themed overflow-hidden border border-border sm:h-[250px] themed-card",
|
|
33
33
|
onMouseEnter: () => setFocus(item.id),
|
|
34
|
-
onMouseLeave: () => setBlur(item.id)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
children: [item.pricingInfo.currency, item.pricingInfo.basePrice]
|
|
139
|
-
}), jsx("span", {
|
|
140
|
-
className: "text-muted-foreground text-xs ml-1",
|
|
141
|
-
children: "total"
|
|
142
|
-
})]
|
|
143
|
-
})
|
|
144
|
-
}), jsx(PricePopover, {
|
|
145
|
-
pricing: {
|
|
146
|
-
freeCancel: item.preferences?.details?.freeCancellation,
|
|
147
|
-
currency: item.pricingInfo.currency,
|
|
148
|
-
amount: item.pricingInfo.basePrice,
|
|
149
|
-
period: 'total'
|
|
150
|
-
}
|
|
151
|
-
})]
|
|
152
|
-
}), item.__typename && jsxs("span", {
|
|
153
|
-
className: "text-xs text-muted-foreground block mt-1",
|
|
154
|
-
children: ["via ", item.__typename.replace('Vehicle', '')]
|
|
155
|
-
})]
|
|
156
|
-
}), jsx(Button, {
|
|
157
|
-
onClick: () => {},
|
|
158
|
-
className: "themed-button",
|
|
159
|
-
children: "View deal"
|
|
160
|
-
})]
|
|
161
|
-
})
|
|
162
|
-
})]
|
|
163
|
-
})]
|
|
164
|
-
})
|
|
165
|
-
});
|
|
34
|
+
onMouseLeave: () => setBlur(item.id)
|
|
35
|
+
}, React.createElement("div", {
|
|
36
|
+
className: "flex flex-col sm:flex-row sm:h-full"
|
|
37
|
+
}, React.createElement("div", {
|
|
38
|
+
className: "relative w-full sm:w-[240px] h-[200px] sm:h-full flex-shrink-0"
|
|
39
|
+
}, item.thumbnail?.url && React.createElement("img", {
|
|
40
|
+
src: item.thumbnail.url,
|
|
41
|
+
alt: item.title,
|
|
42
|
+
className: "w-full h-full object-contain bg-muted p-2"
|
|
43
|
+
}), React.createElement("button", {
|
|
44
|
+
onClick: () => handleLike?.(item.id),
|
|
45
|
+
className: "absolute top-2 right-2 p-1.5 bg-background/90 backdrop-blur-sm rounded-full hover:bg-background transition-colors duration-200"
|
|
46
|
+
}, item.isUserLike ? React.createElement(AiFillHeart, {
|
|
47
|
+
className: "h-4 w-4 text-error"
|
|
48
|
+
}) : React.createElement(AiOutlineHeart, {
|
|
49
|
+
className: "h-4 w-4 text-muted-foreground"
|
|
50
|
+
}))), React.createElement("div", {
|
|
51
|
+
className: "flex-1 p-4 flex flex-col"
|
|
52
|
+
}, React.createElement("div", null, React.createElement("div", {
|
|
53
|
+
className: "flex items-start justify-between gap-2 mb-2"
|
|
54
|
+
}, React.createElement("h2", {
|
|
55
|
+
className: "text-base font-semibold text-foreground truncate"
|
|
56
|
+
}, item.title), item.stats?.averageRating && React.createElement("div", {
|
|
57
|
+
className: "flex items-center shrink-0"
|
|
58
|
+
}, React.createElement("span", {
|
|
59
|
+
className: "font-semibold text-foreground"
|
|
60
|
+
}, item.stats.averageRating), React.createElement(AiFillStar, {
|
|
61
|
+
className: "h-3.5 w-3.5 text-warning ml-0.5"
|
|
62
|
+
}), item.stats?.totalReviews && React.createElement("span", {
|
|
63
|
+
className: "text-xs text-muted-foreground ml-1"
|
|
64
|
+
}, "(", item.stats.totalReviews, ")"))), React.createElement("div", {
|
|
65
|
+
className: "flex flex-wrap items-center gap-2 text-xs mb-2"
|
|
66
|
+
}, item.orgName && React.createElement("span", {
|
|
67
|
+
className: "text-accent flex items-center"
|
|
68
|
+
}, React.createElement(FaAward, {
|
|
69
|
+
className: "h-3.5 w-3.5 mr-0.5"
|
|
70
|
+
}), item.orgName), item.preferences?.details?.freeCancellation && React.createElement("span", {
|
|
71
|
+
className: "text-success flex items-center"
|
|
72
|
+
}, React.createElement(FaShieldAlt, {
|
|
73
|
+
className: "h-3.5 w-3.5 mr-0.5"
|
|
74
|
+
}), "Free cancellation")), item.address?.description && React.createElement("div", {
|
|
75
|
+
className: "flex items-center text-xs text-muted-foreground mb-3"
|
|
76
|
+
}, React.createElement(FiMapPin, {
|
|
77
|
+
className: "h-3.5 w-3.5 mr-0.5 flex-shrink-0"
|
|
78
|
+
}), React.createElement("span", {
|
|
79
|
+
className: "truncate"
|
|
80
|
+
}, item.address.description))), React.createElement("div", {
|
|
81
|
+
className: "flex flex-wrap gap-1.5 mb-4"
|
|
82
|
+
}, Object.entries(item.preferences?.details?.metadata || {}).map(([key, value]) => {
|
|
83
|
+
// Skip non-feature metadata
|
|
84
|
+
if (key === '__typename' || key === 'suitcases') return null;
|
|
85
|
+
const feature = value;
|
|
86
|
+
if (!feature.enable) return null;
|
|
87
|
+
let label = '';
|
|
88
|
+
switch (key) {
|
|
89
|
+
case 'aircon':
|
|
90
|
+
label = 'AC';
|
|
91
|
+
break;
|
|
92
|
+
case 'seats':
|
|
93
|
+
label = `${seatWordToNumber(item.preferences.details.seats.replace('_SEATER', ''))} Seats`;
|
|
94
|
+
break;
|
|
95
|
+
case 'suitcases':
|
|
96
|
+
const small = value.small?.value || 0;
|
|
97
|
+
const big = value.big?.value || 0;
|
|
98
|
+
label = `${small + big} Bags`;
|
|
99
|
+
break;
|
|
100
|
+
case 'unlimitedMileage':
|
|
101
|
+
label = startCase(item.mileage);
|
|
102
|
+
break;
|
|
103
|
+
default:
|
|
104
|
+
label = startCase(key);
|
|
105
|
+
}
|
|
106
|
+
return React.createElement(VehicleFeature, {
|
|
107
|
+
key: key,
|
|
108
|
+
icon: feature.icon,
|
|
109
|
+
label: label
|
|
110
|
+
});
|
|
111
|
+
})), React.createElement("div", {
|
|
112
|
+
className: "mt-auto"
|
|
113
|
+
}, React.createElement("div", {
|
|
114
|
+
className: "flex items-end justify-between"
|
|
115
|
+
}, React.createElement("div", {
|
|
116
|
+
className: "relative group"
|
|
117
|
+
}, item.pricingInfo && React.createElement(React.Fragment, null, React.createElement("div", {
|
|
118
|
+
className: "space-y-0.5"
|
|
119
|
+
}, React.createElement("div", {
|
|
120
|
+
className: "flex items-baseline"
|
|
121
|
+
}, React.createElement("span", {
|
|
122
|
+
className: "text-lg font-bold text-foreground"
|
|
123
|
+
}, item.pricingInfo.currency, item.pricingInfo.basePrice), React.createElement("span", {
|
|
124
|
+
className: "text-muted-foreground text-xs ml-1"
|
|
125
|
+
}, "total"))), React.createElement(PricePopover, {
|
|
126
|
+
pricing: {
|
|
127
|
+
freeCancel: item.preferences?.details?.freeCancellation,
|
|
128
|
+
currency: item.pricingInfo.currency,
|
|
129
|
+
amount: item.pricingInfo.basePrice,
|
|
130
|
+
period: 'total'
|
|
131
|
+
}
|
|
132
|
+
})), item.__typename && React.createElement("span", {
|
|
133
|
+
className: "text-xs text-muted-foreground block mt-1"
|
|
134
|
+
}, "via ", item.__typename.replace('Vehicle', ''))), React.createElement(Button, {
|
|
135
|
+
onClick: () => {},
|
|
136
|
+
className: "themed-button"
|
|
137
|
+
}, "View deal"))))));
|
|
166
138
|
};export{VehicleCard as default};//# sourceMappingURL=VehicleCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleCard.js","sources":["../../src/components/VehicleCard.tsx"],"sourcesContent":[null],"names":[
|
|
1
|
+
{"version":3,"file":"VehicleCard.js","sources":["../../src/components/VehicleCard.tsx"],"sourcesContent":[null],"names":[],"mappings":"gmBAaA,MAAM,SAAS,GAAG,GAAC,IAAa;AAC5B,EAAA,OAAA,GAAO,CAAA,WAAG,EAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,IAAA,IAAA,IAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA,WAAA,EAAA,GAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,GAAA,CAAA;AACL,CAAA;sBACU,GAAA,IAAA,IAAA;WACV,GAAK;SACL,CAAA;AACT,IAAE,GAAA,EAAA,CAAA;AAEF,IAAA,KAAM,EAAA,CAAA;AACF,IAAA,IAAA,EAAM;AACF,IAAA,IAAA,EAAA,CAAG;AACH,IAAA,GAAA,EAAA,CAAA;AACA,IAAA,KAAA,EAAA,CAAA;AACA,IAAA,KAAA,EAAA,CAAI;AACJ,IAAA,IAAA,EAAA,CAAA;AACA,IAAA,GAAA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