mautourco-components 0.2.80 → 0.2.82
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.
|
@@ -38,6 +38,8 @@ export interface CarBookingCardProps {
|
|
|
38
38
|
supplementMessageState?: 'default' | 'error';
|
|
39
39
|
supplementLabel?: string;
|
|
40
40
|
supplementPlaceholder?: string;
|
|
41
|
+
/** @deprecated Use `supplements` and `transfers` instead. Array of supplement option strings for the old dropdown */
|
|
42
|
+
supplementOptions?: string[];
|
|
41
43
|
/** Array of available supplements */
|
|
42
44
|
supplements?: Supplement[];
|
|
43
45
|
/** Array of transfers for supplement selection */
|
|
@@ -29,8 +29,10 @@ var CarBookingCard = function (_a) {
|
|
|
29
29
|
var dropdownRef = useRef(null);
|
|
30
30
|
var panelRef = useRef(null);
|
|
31
31
|
// Synchronize internal isSelected state with the state prop when it changes from parent
|
|
32
|
+
// Also reset isHovered to prevent text staying as "Remove" when state changes
|
|
32
33
|
useEffect(function () {
|
|
33
34
|
setIsSelected(state === 'selected');
|
|
35
|
+
setIsHovered(false);
|
|
34
36
|
}, [state]);
|
|
35
37
|
var resolvedShowSupplement = showSupplement !== null && showSupplement !== void 0 ? showSupplement : Boolean(supplements.length > 0 && transfers.length > 0);
|
|
36
38
|
var hasSupplementsSelected = selectedSupplements.some(function (s) { return s.value > 0; });
|
package/package.json
CHANGED
|
@@ -49,6 +49,8 @@ export interface CarBookingCardProps {
|
|
|
49
49
|
supplementMessageState?: 'default' | 'error';
|
|
50
50
|
supplementLabel?: string;
|
|
51
51
|
supplementPlaceholder?: string;
|
|
52
|
+
/** @deprecated Use `supplements` and `transfers` instead. Array of supplement option strings for the old dropdown */
|
|
53
|
+
supplementOptions?: string[];
|
|
52
54
|
/** Array of available supplements */
|
|
53
55
|
supplements?: Supplement[];
|
|
54
56
|
/** Array of transfers for supplement selection */
|
|
@@ -105,8 +107,10 @@ const CarBookingCard: React.FC<CarBookingCardProps> = ({
|
|
|
105
107
|
const panelRef = useRef<HTMLDivElement>(null);
|
|
106
108
|
|
|
107
109
|
// Synchronize internal isSelected state with the state prop when it changes from parent
|
|
110
|
+
// Also reset isHovered to prevent text staying as "Remove" when state changes
|
|
108
111
|
useEffect(() => {
|
|
109
112
|
setIsSelected(state === 'selected');
|
|
113
|
+
setIsHovered(false);
|
|
110
114
|
}, [state]);
|
|
111
115
|
|
|
112
116
|
const resolvedShowSupplement =
|