@admin-layout/tailwind-design-pro 10.1.1-alpha.3 → 10.1.1-alpha.5
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/UI/PropertyCard.js +1 -1
- package/lib/components/UI/VehicleCard/PricePopover.d.ts +8 -0
- package/lib/components/UI/VehicleCard/PricePopover.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard/PricePopover.js +98 -0
- package/lib/components/UI/VehicleCard/PricePopover.js.map +1 -0
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts +7 -0
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts +9 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.js +23 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.js.map +1 -0
- package/lib/components/UI/VehicleCard/types.d.ts +59 -0
- package/lib/components/UI/VehicleCard/types.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard.d.ts +2 -2
- package/lib/components/UI/VehicleCard.d.ts.map +1 -1
- package/lib/components/UI/VehicleCard.js +149 -23
- package/lib/components/UI/VehicleCard.js.map +1 -1
- package/lib/components/UI/VehicleCardList.js +1 -1
- package/lib/components/UI/VehicleCardList.js.map +1 -1
- package/lib/components/UI/index.d.ts +0 -1
- package/lib/components/UI/index.d.ts.map +1 -1
- package/lib/components/index.js +1 -1
- package/package.json +2 -2
- package/lib/components/UI/VehicleComponents/CarCardFooter.d.ts +0 -7
- package/lib/components/UI/VehicleComponents/CarCardFooter.d.ts.map +0 -1
- package/lib/components/UI/VehicleComponents/CarCardFooter.js +0 -61
- package/lib/components/UI/VehicleComponents/CarCardFooter.js.map +0 -1
- package/lib/components/UI/VehicleComponents/CarCardImage.d.ts +0 -9
- package/lib/components/UI/VehicleComponents/CarCardImage.d.ts.map +0 -1
- package/lib/components/UI/VehicleComponents/CarCardImage.js +0 -32
- package/lib/components/UI/VehicleComponents/CarCardImage.js.map +0 -1
- package/lib/components/UI/VehicleComponents/CarCardInfo.d.ts +0 -13
- package/lib/components/UI/VehicleComponents/CarCardInfo.d.ts.map +0 -1
- package/lib/components/UI/VehicleComponents/CarCardInfo.js +0 -49
- package/lib/components/UI/VehicleComponents/CarCardInfo.js.map +0 -1
- package/lib/components/UI/VehicleComponents/index.d.ts +0 -4
- package/lib/components/UI/VehicleComponents/index.d.ts.map +0 -1
|
@@ -145,7 +145,7 @@ const PropertyCard = ({
|
|
|
145
145
|
WithAuthentication(LikeButton);
|
|
146
146
|
return jsx(Fragment, {
|
|
147
147
|
children: jsxs("div", {
|
|
148
|
-
className: "flex flex-row p-2 relative",
|
|
148
|
+
className: "flex flex-row p-2 relative max-w-[370px]",
|
|
149
149
|
onMouseEnter: () => setFocus(item.id),
|
|
150
150
|
onMouseLeave: () => setBlur(item.id),
|
|
151
151
|
...props,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PricePopover.d.ts","sourceRoot":"","sources":["../../../../src/components/UI/VehicleCard/PricePopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,UAAU,iBAAiB;IACvB,OAAO,EAAE,UAAU,CAAC;CACvB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyF7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import {jsxs,Fragment,jsx}from'react/jsx-runtime';import {useState,useRef,useEffect}from'react';import {BiTag}from'react-icons/bi';const PricePopover = ({
|
|
2
|
+
pricing
|
|
3
|
+
}) => {
|
|
4
|
+
const [position, setPosition] = useState({
|
|
5
|
+
top: 0,
|
|
6
|
+
left: 0
|
|
7
|
+
});
|
|
8
|
+
const popoverRef = useRef(null);
|
|
9
|
+
const triggerRef = useRef(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const updatePosition = () => {
|
|
12
|
+
if (!popoverRef.current || !triggerRef.current) return;
|
|
13
|
+
const trigger = triggerRef.current.getBoundingClientRect();
|
|
14
|
+
const popover = popoverRef.current.getBoundingClientRect();
|
|
15
|
+
const viewport = {
|
|
16
|
+
width: window.innerWidth,
|
|
17
|
+
height: window.innerHeight
|
|
18
|
+
};
|
|
19
|
+
let top = trigger.bottom + 8;
|
|
20
|
+
let left = trigger.left;
|
|
21
|
+
if (top + popover.height > viewport.height) {
|
|
22
|
+
top = trigger.top - popover.height - 8;
|
|
23
|
+
}
|
|
24
|
+
if (left + popover.width > viewport.width) {
|
|
25
|
+
left = viewport.width - popover.width - 16;
|
|
26
|
+
}
|
|
27
|
+
left = Math.max(16, left);
|
|
28
|
+
setPosition({
|
|
29
|
+
top,
|
|
30
|
+
left
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
updatePosition();
|
|
34
|
+
window.addEventListener('scroll', updatePosition);
|
|
35
|
+
window.addEventListener('resize', updatePosition);
|
|
36
|
+
return () => {
|
|
37
|
+
window.removeEventListener('scroll', updatePosition);
|
|
38
|
+
window.removeEventListener('resize', updatePosition);
|
|
39
|
+
};
|
|
40
|
+
}, []);
|
|
41
|
+
return jsxs(Fragment, {
|
|
42
|
+
children: [jsx("div", {
|
|
43
|
+
ref: triggerRef,
|
|
44
|
+
className: "absolute inset-0"
|
|
45
|
+
}), jsx("div", {
|
|
46
|
+
ref: popoverRef,
|
|
47
|
+
style: {
|
|
48
|
+
top: position.top,
|
|
49
|
+
left: position.left,
|
|
50
|
+
position: 'fixed'
|
|
51
|
+
},
|
|
52
|
+
className: "invisible group-hover:visible opacity-0 group-hover:opacity-100 transition-all duration-200 bg-white rounded-lg shadow-xl border border-gray-100 p-4 min-w-[280px] z-50",
|
|
53
|
+
children: jsxs("div", {
|
|
54
|
+
className: "flex flex-col gap-3",
|
|
55
|
+
children: [jsxs("div", {
|
|
56
|
+
className: "flex items-center justify-between text-[15px]",
|
|
57
|
+
children: [jsx("span", {
|
|
58
|
+
className: "text-gray-600",
|
|
59
|
+
children: "Base rate"
|
|
60
|
+
}), jsxs("span", {
|
|
61
|
+
className: "font-medium",
|
|
62
|
+
children: [pricing.currency, " ", pricing.amount]
|
|
63
|
+
})]
|
|
64
|
+
}), pricing.discount && jsxs("div", {
|
|
65
|
+
className: "flex items-center justify-between text-green-600",
|
|
66
|
+
children: [jsxs("div", {
|
|
67
|
+
className: "flex items-center",
|
|
68
|
+
children: [jsx(BiTag, {
|
|
69
|
+
className: "h-4 w-4 mr-1"
|
|
70
|
+
}), jsx("span", {
|
|
71
|
+
children: "Discount"
|
|
72
|
+
})]
|
|
73
|
+
}), jsxs("span", {
|
|
74
|
+
children: ["-", pricing.discount]
|
|
75
|
+
})]
|
|
76
|
+
}), jsx("div", {
|
|
77
|
+
className: "border-t border-gray-200 mt-1 pt-3",
|
|
78
|
+
children: jsxs("div", {
|
|
79
|
+
className: "flex items-center justify-between",
|
|
80
|
+
children: [jsxs("span", {
|
|
81
|
+
className: "font-medium text-[15px]",
|
|
82
|
+
children: ["Total ", pricing.period && `(${pricing.period})`]
|
|
83
|
+
}), jsxs("div", {
|
|
84
|
+
className: "text-right",
|
|
85
|
+
children: [jsxs("span", {
|
|
86
|
+
className: "text-xl font-semibold",
|
|
87
|
+
children: [pricing.currency, " ", pricing.amount]
|
|
88
|
+
}), pricing.beforeTaxes && jsx("div", {
|
|
89
|
+
className: "text-sm text-gray-500",
|
|
90
|
+
children: "before taxes"
|
|
91
|
+
})]
|
|
92
|
+
})]
|
|
93
|
+
})
|
|
94
|
+
})]
|
|
95
|
+
})
|
|
96
|
+
})]
|
|
97
|
+
});
|
|
98
|
+
};export{PricePopover as default};//# sourceMappingURL=PricePopover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PricePopover.js","sources":["../../../../src/components/UI/Vehic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AAA;AACpB,MAAA,MAAA,CAAA,mBACkL,CAAA,QAAA,EAAA,cAAA,CAAA;AAqCnM,KAAE;AAEF,GAAA,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VehicleBadge.d.ts","sourceRoot":"","sources":["../../../../src/components/UI/VehicleCard/VehicleBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,cAAc;IACpB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAY1C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
interface CardFeatureProps {
|
|
3
|
+
icon: ReactNode;
|
|
4
|
+
label: string;
|
|
5
|
+
iconColor?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const VehicleFeature: React.FC<CardFeatureProps>;
|
|
8
|
+
export default VehicleFeature;
|
|
9
|
+
//# sourceMappingURL=VehicleFeature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VehicleFeature.d.ts","sourceRoot":"","sources":["../../../../src/components/UI/VehicleCard/VehicleFeature.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,UAAU,gBAAgB;IACtB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAiB9C,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import {renderDynamicIcon}from'../../../helpers/DynamicIcon.js';const VehicleFeature = ({
|
|
2
|
+
icon,
|
|
3
|
+
label,
|
|
4
|
+
iconColor = '#6B7280'
|
|
5
|
+
}) => {
|
|
6
|
+
// gray-500
|
|
7
|
+
return jsxs("div", {
|
|
8
|
+
className: "flex items-center bg-gray-50 px-1.5 py-0.5 rounded text-[11px] text-gray-700",
|
|
9
|
+
children: [jsx("div", {
|
|
10
|
+
className: "text-gray-500 mr-0.5",
|
|
11
|
+
children: renderDynamicIcon({
|
|
12
|
+
name: icon,
|
|
13
|
+
style: {
|
|
14
|
+
iconColor: iconColor,
|
|
15
|
+
w: '20px',
|
|
16
|
+
h: '20px'
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
}), jsx("span", {
|
|
20
|
+
children: label
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
};export{VehicleFeature as default};//# sourceMappingURL=VehicleFeature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VehicleFeature.js","sources":["../../../../src/components/UI/VehicleCard/VehicleFeature.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"yGASA,MAAM,cAAc,GAA+B,CAAC;MACrC;AACX,EAAA,KAAA;AAIgB,EAAA,SAAA,GAAA;AACA,CAAA,KAAA;AACI;AACA,EAAA,OAAAA,IAAA,CAAA,KAAA,EAAA;AACA,IAAA,SAAA,EAAA,8EAAS;AACZ,IAAA,QAAA,EAAA,CAAAC,GAAA,CAAA,KAAA,EAAA;AACJ,MAAA,SAAA,EAAA,sBAEL;AAGZ,MAAE,QAAA,EAAA,iBAAA,CAAA;AAEF,QAAA,IAAA,EAAA;;;;;;;;;;;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface CarBags {
|
|
2
|
+
count: number;
|
|
3
|
+
size?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface RentalCompany {
|
|
6
|
+
name: string;
|
|
7
|
+
logo?: string;
|
|
8
|
+
rating?: number;
|
|
9
|
+
reviewCount?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PickupInfo {
|
|
12
|
+
location: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
freePickup?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface CarPricing {
|
|
17
|
+
currency: string;
|
|
18
|
+
amount: number | string;
|
|
19
|
+
originalPrice?: string;
|
|
20
|
+
discount?: string;
|
|
21
|
+
period?: string;
|
|
22
|
+
beforeTaxes?: boolean;
|
|
23
|
+
freeCancel?: boolean;
|
|
24
|
+
deals?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface CarActions {
|
|
27
|
+
showInfo?: boolean;
|
|
28
|
+
showEmail?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface Car {
|
|
31
|
+
id: string;
|
|
32
|
+
make: string;
|
|
33
|
+
model: string;
|
|
34
|
+
image?: string;
|
|
35
|
+
subtitle?: string;
|
|
36
|
+
tags?: string[];
|
|
37
|
+
isNewListing?: boolean;
|
|
38
|
+
isFavorite?: boolean;
|
|
39
|
+
rating?: number;
|
|
40
|
+
reviews?: string;
|
|
41
|
+
hostStatus?: string;
|
|
42
|
+
location?: string;
|
|
43
|
+
hasAC?: boolean;
|
|
44
|
+
transmission?: string;
|
|
45
|
+
seats?: number;
|
|
46
|
+
bags?: CarBags;
|
|
47
|
+
mileage?: string;
|
|
48
|
+
rentalCompany?: RentalCompany;
|
|
49
|
+
pickupInfo?: PickupInfo;
|
|
50
|
+
pricing?: CarPricing;
|
|
51
|
+
actions?: CarActions;
|
|
52
|
+
source?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface CarCardProps {
|
|
55
|
+
car: Car;
|
|
56
|
+
onFavorite?: (id: string) => void;
|
|
57
|
+
onViewDeal?: (id: string) => void;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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AAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,GAAG,CAAC;IACT,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC"}
|
|
@@ -10,6 +10,6 @@ type VehicleCardProps = {
|
|
|
10
10
|
authenticated?: boolean;
|
|
11
11
|
extraIcons?: any[];
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
export
|
|
13
|
+
declare const VehicleCard: React.FC<VehicleCardProps>;
|
|
14
|
+
export default VehicleCard;
|
|
15
15
|
//# sourceMappingURL=VehicleCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleCard.d.ts","sourceRoot":"","sources":["../../../src/components/UI/VehicleCard.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"VehicleCard.d.ts","sourceRoot":"","sources":["../../../src/components/UI/VehicleCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoC1B,KAAK,gBAAgB,GAAG;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAuK3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
import {jsx,jsxs}from'react/jsx-runtime';import {
|
|
2
|
-
|
|
1
|
+
import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {AiFillHeart,AiOutlineHeart,AiFillStar}from'react-icons/ai';import {FiMapPin}from'react-icons/fi';import {FaAward,FaShieldAlt}from'react-icons/fa';import VehicleFeature from'./VehicleCard/VehicleFeature.js';import PricePopover from'./VehicleCard/PricePopover.js';import {useMemo}from'react';const startCase = str => {
|
|
2
|
+
return str.toLowerCase().split('_').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
|
|
3
|
+
};
|
|
4
|
+
const seatWordToNumber = word => {
|
|
5
|
+
const map = {
|
|
6
|
+
ONE: 1,
|
|
7
|
+
TWO: 2,
|
|
8
|
+
THREE: 3,
|
|
9
|
+
FOUR: 4,
|
|
10
|
+
FIVE: 5,
|
|
11
|
+
SIX: 6,
|
|
12
|
+
SEVEN: 7,
|
|
13
|
+
EIGHT: 8,
|
|
14
|
+
NINE: 9,
|
|
15
|
+
TEN: 10
|
|
16
|
+
};
|
|
17
|
+
return map[word.toUpperCase()] || word;
|
|
18
|
+
};
|
|
19
|
+
const VehicleCard = ({
|
|
20
|
+
item,
|
|
3
21
|
isSaved,
|
|
4
22
|
setFocus,
|
|
5
23
|
setBlur,
|
|
@@ -7,34 +25,142 @@ import {jsx,jsxs}from'react/jsx-runtime';import {CarCardFooter}from'./VehicleCom
|
|
|
7
25
|
likeBtnLoading,
|
|
8
26
|
categoryTypes,
|
|
9
27
|
authenticated,
|
|
10
|
-
extraIcons = []
|
|
11
|
-
...props
|
|
28
|
+
extraIcons = []
|
|
12
29
|
}) => {
|
|
30
|
+
useMemo(() => categoryTypes?.filter(type => item?.types?.includes(type.id)), [item, categoryTypes]);
|
|
13
31
|
return jsx("div", {
|
|
14
|
-
className: "
|
|
32
|
+
className: "bg-white rounded-lg overflow-hidden border border-gray-200 sm:h-[250px]",
|
|
33
|
+
onMouseEnter: () => setFocus(item.id),
|
|
34
|
+
onMouseLeave: () => setBlur(item.id),
|
|
15
35
|
children: jsxs("div", {
|
|
16
|
-
className: "flex flex-col
|
|
17
|
-
children: [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
36
|
+
className: "flex flex-col sm:flex-row sm:h-full",
|
|
37
|
+
children: [jsxs("div", {
|
|
38
|
+
className: "relative w-full sm:w-[240px] h-[200px] sm:h-full flex-shrink-0",
|
|
39
|
+
children: [item.thumbnail?.url && jsx("img", {
|
|
40
|
+
src: item.thumbnail.url,
|
|
41
|
+
alt: item.title,
|
|
42
|
+
className: "w-full h-full object-contain bg-gray-50 p-2"
|
|
43
|
+
}), jsx("button", {
|
|
44
|
+
onClick: () => handleLike?.(item.id),
|
|
45
|
+
className: "absolute top-2 right-2 p-1.5 bg-white/90 backdrop-blur-sm rounded-full hover:bg-white transition-colors duration-200",
|
|
46
|
+
children: item.isUserLike ? jsx(AiFillHeart, {
|
|
47
|
+
className: "h-4 w-4 text-red-500"
|
|
48
|
+
}) : jsx(AiOutlineHeart, {
|
|
49
|
+
className: "h-4 w-4 text-gray-500"
|
|
50
|
+
})
|
|
51
|
+
})]
|
|
21
52
|
}), jsxs("div", {
|
|
22
|
-
className: "flex
|
|
23
|
-
children: [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
53
|
+
className: "flex-1 p-4 flex flex-col",
|
|
54
|
+
children: [jsxs("div", {
|
|
55
|
+
children: [jsxs("div", {
|
|
56
|
+
className: "flex items-start justify-between gap-2 mb-2",
|
|
57
|
+
children: [jsx("h2", {
|
|
58
|
+
className: "text-base font-semibold text-gray-900 truncate",
|
|
59
|
+
children: item.title
|
|
60
|
+
}), item.stats?.averageRating && jsxs("div", {
|
|
61
|
+
className: "flex items-center shrink-0",
|
|
62
|
+
children: [jsx("span", {
|
|
63
|
+
className: "font-semibold text-black-700",
|
|
64
|
+
children: item.stats.averageRating
|
|
65
|
+
}), jsx(AiFillStar, {
|
|
66
|
+
className: "h-3.5 w-3.5 text-yellow-500 ml-0.5"
|
|
67
|
+
}), item.stats?.totalReviews && jsxs("span", {
|
|
68
|
+
className: "text-xs text-gray-600 ml-1",
|
|
69
|
+
children: ["(", item.stats.totalReviews, ")"]
|
|
70
|
+
})]
|
|
71
|
+
})]
|
|
72
|
+
}), jsxs("div", {
|
|
73
|
+
className: "flex flex-wrap items-center gap-2 text-xs mb-2",
|
|
74
|
+
children: [item.orgName && jsxs("span", {
|
|
75
|
+
className: "text-purple-600 flex items-center",
|
|
76
|
+
children: [jsx(FaAward, {
|
|
77
|
+
className: "h-3.5 w-3.5 mr-0.5"
|
|
78
|
+
}), item.orgName]
|
|
79
|
+
}), item.preferences?.details?.freeCancellation && jsxs("span", {
|
|
80
|
+
className: "text-green-600 flex items-center",
|
|
81
|
+
children: [jsx(FaShieldAlt, {
|
|
82
|
+
className: "h-3.5 w-3.5 mr-0.5"
|
|
83
|
+
}), "Free cancellation"]
|
|
84
|
+
})]
|
|
85
|
+
}), item.address?.description && jsxs("div", {
|
|
86
|
+
className: "flex items-center text-xs text-gray-400 mb-3",
|
|
87
|
+
children: [jsx(FiMapPin, {
|
|
88
|
+
className: "h-3.5 w-3.5 mr-0.5 flex-shrink-0"
|
|
89
|
+
}), jsx("span", {
|
|
90
|
+
className: "truncate",
|
|
91
|
+
children: item.address.description
|
|
92
|
+
})]
|
|
93
|
+
})]
|
|
94
|
+
}), jsx("div", {
|
|
95
|
+
className: "flex flex-wrap gap-1.5 mb-4",
|
|
96
|
+
children: Object.entries(item.preferences?.details?.metadata || {}).map(([key, value]) => {
|
|
97
|
+
// Skip non-feature metadata
|
|
98
|
+
if (key === '__typename' || key === 'suitcases') return null;
|
|
99
|
+
const feature = value;
|
|
100
|
+
if (!feature.enable) return null;
|
|
101
|
+
let label = '';
|
|
102
|
+
switch (key) {
|
|
103
|
+
case 'aircon':
|
|
104
|
+
label = 'AC';
|
|
105
|
+
break;
|
|
106
|
+
case 'seats':
|
|
107
|
+
label = `${seatWordToNumber(item.preferences.details.seats.replace('_SEATER', ''))} Seats`;
|
|
108
|
+
break;
|
|
109
|
+
case 'suitcases':
|
|
110
|
+
const small = value.small?.value || 0;
|
|
111
|
+
const big = value.big?.value || 0;
|
|
112
|
+
label = `${small + big} Bags`;
|
|
113
|
+
break;
|
|
114
|
+
case 'unlimitedMileage':
|
|
115
|
+
label = startCase(item.mileage);
|
|
116
|
+
break;
|
|
117
|
+
default:
|
|
118
|
+
label = startCase(key);
|
|
119
|
+
}
|
|
120
|
+
return jsx(VehicleFeature, {
|
|
121
|
+
icon: feature.icon,
|
|
122
|
+
label: label
|
|
123
|
+
}, key);
|
|
124
|
+
})
|
|
31
125
|
}), jsx("div", {
|
|
32
126
|
className: "mt-auto",
|
|
33
|
-
children:
|
|
34
|
-
|
|
127
|
+
children: jsxs("div", {
|
|
128
|
+
className: "flex items-end justify-between",
|
|
129
|
+
children: [jsxs("div", {
|
|
130
|
+
className: "relative group",
|
|
131
|
+
children: [item.pricingInfo && jsxs(Fragment, {
|
|
132
|
+
children: [jsx("div", {
|
|
133
|
+
className: "space-y-0.5",
|
|
134
|
+
children: jsxs("div", {
|
|
135
|
+
className: "flex items-baseline",
|
|
136
|
+
children: [jsxs("span", {
|
|
137
|
+
className: "text-lg font-bold",
|
|
138
|
+
children: [item.pricingInfo.currency, item.pricingInfo.basePrice]
|
|
139
|
+
}), jsx("span", {
|
|
140
|
+
className: "text-gray-500 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-gray-400 block mt-1",
|
|
154
|
+
children: ["via ", item.__typename.replace('Vehicle', '')]
|
|
155
|
+
})]
|
|
156
|
+
}), jsx("button", {
|
|
157
|
+
onClick: () => {},
|
|
158
|
+
className: "bg-blue-600 text-white px-4 py-2 text-sm rounded-lg font-medium hover:bg-blue-700 transition-colors duration-200",
|
|
159
|
+
children: "View deal"
|
|
160
|
+
})]
|
|
35
161
|
})
|
|
36
162
|
})]
|
|
37
163
|
})]
|
|
38
164
|
})
|
|
39
|
-
}
|
|
40
|
-
};export{VehicleCard};//# sourceMappingURL=VehicleCard.js.map
|
|
165
|
+
});
|
|
166
|
+
};export{VehicleCard as default};//# sourceMappingURL=VehicleCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleCard.js","sources":["../../../src/components/UI/VehicleCard.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VehicleCard.js","sources":["../../../src/components/UI/VehicleCard.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":"4VAYA,MAAM,SAAS,GAAG,GAAC,IAAe;AAC9B,EAAA,OAAA,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,SAAA,CAAA,EAAAA,GAAA,CAAA,QAAA,EAAA;0CACM,CAAA,EAAA,CAAA;AACV,UAAA,SAAA,EAAA,sHAAuB;AACnB,UAAA,QAAA,EAAA,IAAA,CAAA,UAAA,GAAAA,GAAA,CAAA,WAAiB,EAAA;;AAErB,WAAA,CAAA,GAAAA,GAAA,CAAA,cAAA,EAAA;AACI,YAAA,SAAA,EAAA;;AAGR,SAAA,CAAA;AACJ,OAAA,CAAA,EAAAC,IAAA,CAAA,KAAA,EAAA;AAoBwB,QAAA,SAAA,EAAA,0BAAA;AACA,QAAA,QAAA,EAAA,CAAAA,IAAA,CAAA,KAAA,EAAA;AACA,UAAA,QAAA,EAAA,CAAAA,IAAA,CAAA,KAAA,EAAA;AACA,YAAA,SAAA,EAAA,6CAAQ;;AAwBxD,cAAE,SAAA,EAAA,gDAAA;AAEF,cAAA,cAA2B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {jsx}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {isEmpty}from'lodash-es';import {isUserAuthenticated}from'@adminide-stack/user-auth0-client';import
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {isEmpty}from'lodash-es';import {isUserAuthenticated}from'@adminide-stack/user-auth0-client';import VehicleCard from'./VehicleCard.js';const VehicleCardList = props => {
|
|
2
2
|
const {
|
|
3
3
|
setBlur,
|
|
4
4
|
setFocus,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehicleCardList.js","sources":["../../../src/components/UI/VehicleCardList.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VehicleCardList.js","sources":["../../../src/components/UI/VehicleCardList.tsx"],"sourcesContent":[null],"names":[],"mappings":"6NAiBa,MAAA,eAAe,GAAmC,KAAC,IAAS;QAC/D;AACN,IAAA;AACA,IAAA,QAAQ;AAER,IAAA,IAAI;cACO;IACX,cAAC;AACD,IAAA,YACI;AAiBR,IAAE,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,6 @@ export * from './ParamSearchResultContainer';
|
|
|
5
5
|
export * from './CardList';
|
|
6
6
|
export * from './PropertyCard';
|
|
7
7
|
export * from './Pagination';
|
|
8
|
-
export * from './VehicleComponents';
|
|
9
8
|
export * from './VehicleCard';
|
|
10
9
|
export * from './VehicleCardList';
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/UI/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/UI/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}
|
package/lib/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CategoriesTypeList}from'./UI/CategoriesTypeList.js';export{PropertyCardOnMap}from'./UI/PropertyCardOnMap.js';export{LazyLoadingGoogleMarker}from'./UI/LazyLoadingGoogleMarker.js';export{ParamSearchResultContainer}from'./UI/ParamSearchResultContainer.js';export{CardList}from'./UI/CardList.js';export{PropertyCard}from'./UI/PropertyCard.js';export{Pagination}from'./UI/Pagination.js';
|
|
1
|
+
export{CategoriesTypeList}from'./UI/CategoriesTypeList.js';export{PropertyCardOnMap}from'./UI/PropertyCardOnMap.js';export{LazyLoadingGoogleMarker}from'./UI/LazyLoadingGoogleMarker.js';export{ParamSearchResultContainer}from'./UI/ParamSearchResultContainer.js';export{CardList}from'./UI/CardList.js';export{PropertyCard}from'./UI/PropertyCard.js';export{Pagination}from'./UI/Pagination.js';import'react/jsx-runtime';import'react-icons/ai';import'react-icons/fi';import'react-icons/fa';import'../helpers/DynamicIcon.js';import'react';import'react-icons/bi';export{VehicleCardList}from'./UI/VehicleCardList.js';export{MainHeader,defaultRenderLogo,defaultRenderLogoAndTitle}from'./Layout/GlobalHeader/MainHeader.js';export{Logo}from'./Layout/GlobalHeader/Logo.js';export{RightMenu}from'./Layout/GlobalHeader/RightMenu.js';export{ThemeProviderTailwind,useTheme}from'./ThemeProvider/ThemeProvider.js';export{ThemeToggle}from'./ThemeProvider/ThemeToggle.js';//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/tailwind-design-pro",
|
|
3
|
-
"version": "10.1.1-alpha.
|
|
3
|
+
"version": "10.1.1-alpha.5",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"typescript": {
|
|
62
62
|
"definition": "lib/index.d.ts"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "f103c1d67260b17f7182c4baf59cb06dbaee27de"
|
|
65
65
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CarCardFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/UI/VehicleComponents/CarCardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,UAAU,kBAAkB;IACxB,KAAK,CAAC,EAAE,GAAG,CAAC;CACf;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA4DtD,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import {jsxs,jsx}from'react/jsx-runtime';import {useState}from'react';const CarCardFooter = ({
|
|
2
|
-
price
|
|
3
|
-
}) => {
|
|
4
|
-
const [showPopover, setShowPopover] = useState(false);
|
|
5
|
-
if (!price) return null;
|
|
6
|
-
return jsxs("div", {
|
|
7
|
-
className: "flex flex-col sm:flex-row sm:justify-between items-start sm:items-end mt-4 pt-4 border-t border-gray-100",
|
|
8
|
-
children: [price.discount > 0 && jsxs("div", {
|
|
9
|
-
className: "px-3 py-1 text-sm font-medium text-green-600 bg-[#F1FFF9] rounded-md",
|
|
10
|
-
children: ["Save ", price.currency, " ", price.discount]
|
|
11
|
-
}), jsxs("div", {
|
|
12
|
-
className: "flex flex-col items-end",
|
|
13
|
-
children: [jsxs("div", {
|
|
14
|
-
className: "relative",
|
|
15
|
-
children: [price.originalAmount > price.amount && jsxs("span", {
|
|
16
|
-
className: "line-through text-gray-500 text-lg mr-2",
|
|
17
|
-
children: [price.currency, price.originalAmount]
|
|
18
|
-
}), jsxs("span", {
|
|
19
|
-
className: "text-xl font-semibold text-gray-900 cursor-pointer",
|
|
20
|
-
onMouseEnter: () => setShowPopover(true),
|
|
21
|
-
onMouseLeave: () => setShowPopover(false),
|
|
22
|
-
children: [price.currency, " ", price.amount, " total"]
|
|
23
|
-
}), showPopover && jsx("div", {
|
|
24
|
-
className: "absolute bottom-full right-0 mb-2 p-3 bg-white shadow-lg rounded-lg border border-gray-200 z-10 w-48",
|
|
25
|
-
children: jsxs("div", {
|
|
26
|
-
className: "flex flex-col gap-2 text-sm",
|
|
27
|
-
children: [jsxs("div", {
|
|
28
|
-
className: "flex justify-between",
|
|
29
|
-
children: [jsx("span", {
|
|
30
|
-
className: "text-gray-600",
|
|
31
|
-
children: "Original price:"
|
|
32
|
-
}), jsxs("span", {
|
|
33
|
-
className: "line-through text-gray-500",
|
|
34
|
-
children: [price.currency, " ", price.originalAmount]
|
|
35
|
-
})]
|
|
36
|
-
}), price.discount > 0 && jsxs("div", {
|
|
37
|
-
className: "flex justify-between",
|
|
38
|
-
children: [jsx("span", {
|
|
39
|
-
className: "text-gray-600",
|
|
40
|
-
children: "Discount:"
|
|
41
|
-
}), jsxs("span", {
|
|
42
|
-
className: "text-green-600",
|
|
43
|
-
children: ["-", price.currency, " ", price.discount]
|
|
44
|
-
})]
|
|
45
|
-
}), jsxs("div", {
|
|
46
|
-
className: "flex justify-between font-medium pt-1 border-t border-gray-100",
|
|
47
|
-
children: [jsx("span", {
|
|
48
|
-
children: "Final price:"
|
|
49
|
-
}), jsxs("span", {
|
|
50
|
-
children: [price.currency, " ", price.amount]
|
|
51
|
-
})]
|
|
52
|
-
})]
|
|
53
|
-
})
|
|
54
|
-
})]
|
|
55
|
-
}), jsx("span", {
|
|
56
|
-
className: "text-sm text-gray-600",
|
|
57
|
-
children: "Before taxes"
|
|
58
|
-
})]
|
|
59
|
-
})]
|
|
60
|
-
});
|
|
61
|
-
};export{CarCardFooter};//# sourceMappingURL=CarCardFooter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CarCardFooter.js","sources":["../../../../src/components/UI/VehicleComponents/CarCardFooter.tsx"],"sourcesContent":[null],"names":["_jsxs"],"mappings":"4EAMa,aAAa,GAAiC,CAAC;;AAGxD,CAAA,KAAA;AAAY,EAAA,MAAA,CAAA,WAAY,EAAA,cAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA;MAEjB,CAAA,KACH;AAsDR,EAAE,OAAAA,IAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CarCardImage.d.ts","sourceRoot":"","sources":["../../../../src/components/UI/VehicleComponents/CarCardImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,iBAAiB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8BpD,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {jsxs,jsx}from'react/jsx-runtime';import {useState}from'react';import {FaHeart}from'@react-icons/all-files/fa/FaHeart.js';import {FaRegHeart}from'@react-icons/all-files/fa/FaRegHeart.js';const CarCardImage = ({
|
|
2
|
-
imageUrl,
|
|
3
|
-
alt,
|
|
4
|
-
isFavorite: initialFavorite = false
|
|
5
|
-
}) => {
|
|
6
|
-
const [isFavorite, setIsFavorite] = useState(initialFavorite);
|
|
7
|
-
const [isHovering, setIsHovering] = useState(false);
|
|
8
|
-
const toggleFavorite = e => {
|
|
9
|
-
e.preventDefault();
|
|
10
|
-
e.stopPropagation();
|
|
11
|
-
setIsFavorite(!isFavorite);
|
|
12
|
-
};
|
|
13
|
-
return jsxs("div", {
|
|
14
|
-
className: "w-full md:w-[291px] h-[191px] md:h-[191px] bg-gray-200 flex-shrink-0",
|
|
15
|
-
children: [imageUrl && jsx("img", {
|
|
16
|
-
src: imageUrl,
|
|
17
|
-
alt: alt || 'Car image',
|
|
18
|
-
className: "w-full h-full object-cover"
|
|
19
|
-
}), jsx("button", {
|
|
20
|
-
"aria-label": isFavorite ? 'Remove from favorites' : 'Add to favorites',
|
|
21
|
-
className: "absolute top-4 right-4 w-10 h-10 rounded-full bg-white bg-opacity-70 hover:bg-opacity-90 \n flex items-center justify-center transition-all duration-200 \n shadow-sm hover:shadow focus:outline-none",
|
|
22
|
-
onClick: toggleFavorite,
|
|
23
|
-
onMouseEnter: () => setIsHovering(true),
|
|
24
|
-
onMouseLeave: () => setIsHovering(false),
|
|
25
|
-
children: isFavorite ? jsx(FaHeart, {
|
|
26
|
-
className: "text-2xl text-red-500"
|
|
27
|
-
}) : jsx(FaRegHeart, {
|
|
28
|
-
className: `text-2xl ${isHovering ? 'text-red-500' : 'text-gray-600'}`
|
|
29
|
-
})
|
|
30
|
-
})]
|
|
31
|
-
});
|
|
32
|
-
};export{CarCardImage};//# sourceMappingURL=CarCardImage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CarCardImage.js","sources":["../../../../src/components/UI/VehicleComponents/CarCardImage.tsx"],"sourcesContent":[null],"names":[],"mappings":"kMAUa,MAAA,YAAY,GAAgC,CAAC;UAChD;KACA;AAEN,EAAA,UAAoB,EAAA,eAAuB,GAAI;;QAE3C,CAAC,UAAgB,EAAA,aAAG,CAAA,GAAA,QAAA,CAAA,eAAA,CAAA;AACpB,EAAA,MAAA,CAAA,UAAA,EAAa,aAAa,CAAC,GAAA,QAAA,CAAA,KAAA,CAAA;AAC/B,EAAA,MAAE,cAAA,GAAA,CAAA,IAAA;IAEF,CAAO,CAAA;AAoBX,IAAE,CAAA,CAAA,eAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface CarCardInfoProps {
|
|
3
|
-
make?: string;
|
|
4
|
-
model?: string;
|
|
5
|
-
year?: number;
|
|
6
|
-
rating?: number;
|
|
7
|
-
trips?: number;
|
|
8
|
-
isAllStarHost?: boolean;
|
|
9
|
-
location?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare const CarCardInfo: React.FC<CarCardInfoProps>;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=CarCardInfo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CarCardInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/UI/VehicleComponents/CarCardInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,gBAAgB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+ClD,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {FaStar}from'@react-icons/all-files/fa/FaStar.js';import {FaTrophy}from'@react-icons/all-files/fa/FaTrophy.js';import {FaMapMarkerAlt}from'@react-icons/all-files/fa/FaMapMarkerAlt.js';const CarCardInfo = ({
|
|
2
|
-
make,
|
|
3
|
-
model,
|
|
4
|
-
year,
|
|
5
|
-
rating,
|
|
6
|
-
trips,
|
|
7
|
-
isAllStarHost,
|
|
8
|
-
location
|
|
9
|
-
}) => {
|
|
10
|
-
return jsxs("div", {
|
|
11
|
-
className: "flex flex-col gap-2",
|
|
12
|
-
children: [jsxs("div", {
|
|
13
|
-
className: "flex flex-col gap-2",
|
|
14
|
-
children: [(make || model || year) && jsxs("h2", {
|
|
15
|
-
className: "text-2xl font-semibold text-gray-900",
|
|
16
|
-
children: [make, " ", model, " ", year]
|
|
17
|
-
}), (rating || trips || isAllStarHost) && jsxs("div", {
|
|
18
|
-
className: "flex items-center gap-2",
|
|
19
|
-
children: [rating && jsxs(Fragment, {
|
|
20
|
-
children: [jsx("span", {
|
|
21
|
-
className: "font-semibold text-gray-900",
|
|
22
|
-
children: rating.toFixed(2)
|
|
23
|
-
}), jsx(FaStar, {
|
|
24
|
-
className: "text-indigo-500 mb-0.5"
|
|
25
|
-
})]
|
|
26
|
-
}), trips && jsxs("span", {
|
|
27
|
-
className: "text-gray-600 text-sm",
|
|
28
|
-
children: ["(", trips, " trips)"]
|
|
29
|
-
}), isAllStarHost && jsxs("div", {
|
|
30
|
-
className: "flex items-center ml-2",
|
|
31
|
-
children: [jsx(FaTrophy, {
|
|
32
|
-
className: "text-indigo-500 mr-1"
|
|
33
|
-
}), jsx("span", {
|
|
34
|
-
className: "text-gray-800 text-sm font-medium",
|
|
35
|
-
children: "All-Star Host"
|
|
36
|
-
})]
|
|
37
|
-
})]
|
|
38
|
-
})]
|
|
39
|
-
}), location && jsx("div", {
|
|
40
|
-
className: "flex flex-col gap-2",
|
|
41
|
-
children: jsxs("span", {
|
|
42
|
-
className: "flex items-center gap-2",
|
|
43
|
-
children: [jsx(FaMapMarkerAlt, {
|
|
44
|
-
className: "text-gray-500"
|
|
45
|
-
}), location]
|
|
46
|
-
})
|
|
47
|
-
})]
|
|
48
|
-
});
|
|
49
|
-
};export{CarCardInfo};//# sourceMappingURL=CarCardInfo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CarCardInfo.js","sources":["../../../../src/components/UI/VehicleComponents/CarCardInfo.tsx"],"sourcesContent":[null],"names":[],"mappings":"uPAea,WAAW,GAA+B,CAAC;AASpD,EAAA,IAAA;AAsCJ,EAAE,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/UI/VehicleComponents/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|