kupos-ui-components-lib 10.1.2 → 10.1.4

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.
@@ -52,10 +52,10 @@ class ServiceFilter extends React.Component {
52
52
  // Define the desired filter order
53
53
  const FILTER_ORDER = [
54
54
  "time",
55
+ "operator",
55
56
  "special_departure",
56
57
  "tipo",
57
58
  "seat_types",
58
- "operator",
59
59
  "train_type",
60
60
  "amenities",
61
61
  ];
@@ -198,6 +198,7 @@ export interface MobileServiceItemProps {
198
198
  rightGradiantColor?: string;
199
199
  leftGradiantColor?: string;
200
200
  discountSeatPriceColor?: string;
201
+ topLabelBgColor?: string;
201
202
  };
202
203
  isCiva?: boolean;
203
204
  currencySign?: string;
@@ -174,6 +174,7 @@ export interface ServiceItemProps {
174
174
  rightGradiantColor?: string;
175
175
  leftGradiantColor?: string;
176
176
  discountSeatPriceColor?: string;
177
+ topLabelBgColor?: string;
177
178
  };
178
179
  cityOrigin?: {
179
180
  value: number;
@@ -223,7 +223,7 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
223
223
  height: "20px",
224
224
  marginRight: "5px",
225
225
  } })),
226
- seatLabel)) : (React.createElement("span", { className: "text-[13.33px]" }, "Desde")))));
226
+ CommonService.capitalize(seatLabel))) : (React.createElement("span", { className: "text-[13.33px]" }, "Desde")))));
227
227
  }
228
228
  return renderSeatNames();
229
229
  };
@@ -4,7 +4,7 @@ import CommonService from "../../utils/CommonService";
4
4
  const ServiceBadges = ({ showTopLabel, isSoldOut, colors, renderIcon, translation, serviceItem, isAllinBus = false, boardingName, getAnimationIcon, }) => {
5
5
  return (React.createElement("div", { className: "absolute -top-[10px] left-0 w-full flex items-center justify-end gap-[12px] pr-[22px] z-10" },
6
6
  showTopLabel && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-10`, style: {
7
- backgroundColor: "#fff",
7
+ backgroundColor: colors.topLabelBgColor || "rgb(255, 242, 235)",
8
8
  border: isSoldOut
9
9
  ? "1px solid #ccc"
10
10
  : `1px solid ${colors.topLabelColor}`,
@@ -89,7 +89,9 @@ function SeatSectionMobile({ seatTypes: seatTypesData, isSoldOut, isPeru, seatPr
89
89
  React.createElement("span", { className: "min-[420]:text-[13px] text-[12px]", style: { color: "#bbb" } }, "Antes"),
90
90
  React.createElement("span", { className: "min-[420]:text-[13px] text-[12px] line-through", style: { color: "#bbb" } }, commonService.currency(originalPrice, currencySign)))),
91
91
  React.createElement("div", { className: "w-[100%] flex flex-row justify-between items-center" },
92
- React.createElement("span", { className: "min-[420]:text-[13px] text-[12px] bold-text", style: { color: isSoldOut ? "#bbb" : "#464647" } }, originalPrice !== discountedPrice ? "Desde" : seatLabel || "Desde"),
92
+ React.createElement("span", { className: "min-[420]:text-[13px] text-[12px] bold-text", style: { color: isSoldOut ? "#bbb" : "#464647" } }, originalPrice !== discountedPrice
93
+ ? "Desde"
94
+ : commonService.capitalize(seatLabel) || "Desde"),
93
95
  React.createElement("span", { className: "min-[420]:text-[13px] text-[12px] bold-text", style: { color: priceColor } }, commonService.currency(discountedPrice, currencySign)))));
94
96
  };
95
97
  const renderDpSeats = () => {
@@ -23,7 +23,7 @@ const ServiceBadgesMobile = ({ showTopLabel, isSoldOut, colors, renderIcon, serv
23
23
  renderIcon("directo", "12px"),
24
24
  React.createElement("div", { className: "ml-[5px]" }, "Directo"))),
25
25
  isConexion && (React.createElement("div", { className: `flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[11px] z-20`, style: {
26
- backgroundColor: "#fff",
26
+ backgroundColor: colors.topLabelBgColor || "#fff",
27
27
  border: isSoldOut
28
28
  ? "1px solid #ccc"
29
29
  : `1px solid ${colors.topLabelColor}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "10.1.2",
3
+ "version": "10.1.4",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -79,10 +79,10 @@ class ServiceFilter extends React.Component<
79
79
  // Define the desired filter order
80
80
  const FILTER_ORDER = [
81
81
  "time",
82
+ "operator",
82
83
  "special_departure",
83
84
  "tipo",
84
85
  "seat_types",
85
- "operator",
86
86
  "train_type",
87
87
  "amenities",
88
88
  ];
@@ -210,6 +210,7 @@ export interface MobileServiceItemProps {
210
210
  rightGradiantColor?: string;
211
211
  leftGradiantColor?: string;
212
212
  discountSeatPriceColor?: string;
213
+ topLabelBgColor?: string;
213
214
  };
214
215
  isCiva?: boolean;
215
216
  currencySign?: string;
@@ -178,6 +178,7 @@ export interface ServiceItemProps {
178
178
  rightGradiantColor?: string;
179
179
  leftGradiantColor?: string;
180
180
  discountSeatPriceColor?: string;
181
+ topLabelBgColor?: string;
181
182
  };
182
183
  cityOrigin?: { value: number; label: string };
183
184
  cityDestination?: { value: number; label: string };
@@ -428,7 +428,7 @@ function SeatSection({
428
428
  }}
429
429
  />
430
430
  )}
431
- {seatLabel}
431
+ {CommonService.capitalize(seatLabel)}
432
432
  </span>
433
433
  ) : (
434
434
  <span className="text-[13.33px]">Desde</span>
@@ -37,7 +37,7 @@ const ServiceBadges: React.FC<ServiceBadgesProps> = ({
37
37
  <div
38
38
  className={`flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-10`}
39
39
  style={{
40
- backgroundColor: "#fff",
40
+ backgroundColor: colors.topLabelBgColor || "rgb(255, 242, 235)",
41
41
  border: isSoldOut
42
42
  ? "1px solid #ccc"
43
43
  : `1px solid ${colors.topLabelColor}`,
@@ -230,7 +230,9 @@ function SeatSectionMobile({
230
230
  className="min-[420]:text-[13px] text-[12px] bold-text"
231
231
  style={{ color: isSoldOut ? "#bbb" : "#464647" }}
232
232
  >
233
- {originalPrice !== discountedPrice ? "Desde" : seatLabel || "Desde"}
233
+ {originalPrice !== discountedPrice
234
+ ? "Desde"
235
+ : commonService.capitalize(seatLabel) || "Desde"}
234
236
  </span>
235
237
  <span
236
238
  className="min-[420]:text-[13px] text-[12px] bold-text"
@@ -76,7 +76,7 @@ const ServiceBadgesMobile: React.FC<ServiceBadgesMobileProps> = ({
76
76
  <div
77
77
  className={`flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[11px] z-20`}
78
78
  style={{
79
- backgroundColor: "#fff",
79
+ backgroundColor: colors.topLabelBgColor || "#fff",
80
80
  border: isSoldOut
81
81
  ? "1px solid #ccc"
82
82
  : `1px solid ${colors.topLabelColor}`,