kupos-ui-components-lib 9.2.6 → 9.2.8

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.
@@ -14,10 +14,18 @@ const getAmenitySplit = ({ isPeru, amenities, priorityIds }) => {
14
14
  /* ============================
15
15
  🇵🇪 PERU LOGIC
16
16
  ============================ */
17
+ // if (isPeru) {
18
+ // return hasPriority
19
+ // ? { visible: priority, plus: nonPriority }
20
+ // : { visible: [], plus: amenities };
21
+ // }
17
22
  if (isPeru) {
18
23
  return hasPriority
19
- ? { visible: priority, plus: nonPriority }
20
- : { visible: [], plus: amenities };
24
+ ? {
25
+ visible: priority.slice(0, 2),
26
+ plus: [...priority.slice(2), ...nonPriority],
27
+ }
28
+ : { visible: amenities.slice(0, 2), plus: amenities.slice(2) };
21
29
  }
22
30
  /* ============================
23
31
  🌍 NON-PERU LOGIC
@@ -53,8 +61,8 @@ const AmenitiesBlock = ({ serviceItem, metaData, isSoldOut, colors, isPeru, getA
53
61
  if (isWater(raw))
54
62
  return null;
55
63
  const baseName = getAmenityBaseName(raw);
56
- return (React.createElement("div", { key: key, className: "relative group cursor-pointer", style: { opacity: isSoldOut ? 0.5 : 1 } },
57
- React.createElement("div", { className: grayscaleClass },
64
+ return (React.createElement("div", { key: key, className: "relative group cursor-pointer" },
65
+ React.createElement("div", { className: grayscaleClass, style: { opacity: isSoldOut ? 0.5 : 1 } },
58
66
  React.createElement(SvgAmenities, { moreAnemities: false, name: baseName.toLowerCase() })),
59
67
  React.createElement("div", { className: TOOLTIP_CLASS, style: {
60
68
  backgroundColor: colors.bottomStripColor,
@@ -67,7 +75,7 @@ const AmenitiesBlock = ({ serviceItem, metaData, isSoldOut, colors, isPeru, getA
67
75
  shouldShowPlus && (React.createElement("div", { className: "relative ml-1 cursor-pointer" },
68
76
  React.createElement("div", { className: "group" },
69
77
  React.createElement("img", { src: ((_c = serviceItem.icons) === null || _c === void 0 ? void 0 : _c.plus) ||
70
- "/images/icons/amenities/icon_plus.svg", className: "w-[16px] h-[16px]", alt: "plus" }),
78
+ "/images/icons/amenities/icon_plus.svg", className: "w-[16px] h-[16px]", alt: "plus", style: { opacity: isSoldOut ? 0.5 : 1 } }),
71
79
  React.createElement("div", { style: { zIndex: 100 }, className: TOOLTIP_CLASS },
72
80
  React.createElement(TooltipArrow, { color: colors.tooltipColor }),
73
81
  React.createElement("div", { className: "flex flex-col gap-[10px] p-3 rounded-[8px] shadow-md", style: { backgroundColor: colors.tooltipColor } }, plusAmenities.map((val, key) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "9.2.6",
3
+ "version": "9.2.8",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -28,10 +28,19 @@ const getAmenitySplit = ({ isPeru, amenities, priorityIds }) => {
28
28
  /* ============================
29
29
  🇵🇪 PERU LOGIC
30
30
  ============================ */
31
+ // if (isPeru) {
32
+ // return hasPriority
33
+ // ? { visible: priority, plus: nonPriority }
34
+ // : { visible: [], plus: amenities };
35
+ // }
36
+
31
37
  if (isPeru) {
32
38
  return hasPriority
33
- ? { visible: priority, plus: nonPriority }
34
- : { visible: [], plus: amenities };
39
+ ? {
40
+ visible: priority.slice(0, 2),
41
+ plus: [...priority.slice(2), ...nonPriority],
42
+ }
43
+ : { visible: amenities.slice(0, 2), plus: amenities.slice(2) };
35
44
  }
36
45
 
37
46
  /* ============================
@@ -91,12 +100,11 @@ const AmenitiesBlock = ({
91
100
  const baseName = getAmenityBaseName(raw);
92
101
 
93
102
  return (
94
- <div
95
- key={key}
96
- className="relative group cursor-pointer"
97
- style={{ opacity: isSoldOut ? 0.5 : 1 }}
98
- >
99
- <div className={grayscaleClass}>
103
+ <div key={key} className="relative group cursor-pointer">
104
+ <div
105
+ className={grayscaleClass}
106
+ style={{ opacity: isSoldOut ? 0.5 : 1 }}
107
+ >
100
108
  <SvgAmenities
101
109
  moreAnemities={false}
102
110
  name={baseName.toLowerCase()}
@@ -131,6 +139,7 @@ const AmenitiesBlock = ({
131
139
  }
132
140
  className="w-[16px] h-[16px]"
133
141
  alt="plus"
142
+ style={{ opacity: isSoldOut ? 0.5 : 1 }}
134
143
  />
135
144
 
136
145
  <div style={{ zIndex: 100 }} className={TOOLTIP_CLASS}>