kupos-ui-components-lib 9.9.9 → 9.9.10

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.
Files changed (32) hide show
  1. package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
  2. package/dist/components/ServiceItem/ServiceItemDesktop.js +6 -24
  3. package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
  4. package/dist/components/ServiceItem/ServiceItemMobile.js +9 -4
  5. package/dist/components/ServiceItem/mobileTypes.d.ts +0 -2
  6. package/dist/components/ServiceItem/types.d.ts +0 -7
  7. package/dist/styles.css +6 -6
  8. package/dist/ui/OfferBanner.js +1 -1
  9. package/dist/ui/SeatSection/SeatSection.d.ts +1 -7
  10. package/dist/ui/SeatSection/SeatSection.js +9 -38
  11. package/dist/ui/ServiceBadges/ServiceBadges.d.ts +1 -1
  12. package/dist/ui/ServiceBadges/ServiceBadges.js +3 -1
  13. package/dist/ui/mobileweb/DateTimeSectionMobile.d.ts +1 -2
  14. package/dist/ui/mobileweb/DateTimeSectionMobile.js +6 -12
  15. package/dist/ui/mobileweb/SeatSectionMobile.d.ts +1 -2
  16. package/dist/ui/mobileweb/SeatSectionMobile.js +14 -21
  17. package/dist/ui/mobileweb/ServiceBadgesMobile.d.ts +1 -1
  18. package/dist/ui/mobileweb/ServiceBadgesMobile.js +3 -3
  19. package/dist/utils/CommonService.d.ts +1 -1
  20. package/dist/utils/CommonService.js +1 -5
  21. package/package.json +1 -1
  22. package/src/components/ServiceItem/ServiceItemDesktop.tsx +6 -46
  23. package/src/components/ServiceItem/ServiceItemMobile.tsx +14 -5
  24. package/src/components/ServiceItem/mobileTypes.ts +26 -32
  25. package/src/components/ServiceItem/types.ts +0 -12
  26. package/src/ui/OfferBanner.tsx +1 -1
  27. package/src/ui/SeatSection/SeatSection.tsx +18 -83
  28. package/src/ui/ServiceBadges/ServiceBadges.tsx +6 -4
  29. package/src/ui/mobileweb/DateTimeSectionMobile.tsx +35 -44
  30. package/src/ui/mobileweb/SeatSectionMobile.tsx +11 -23
  31. package/src/ui/mobileweb/ServiceBadgesMobile.tsx +8 -5
  32. package/src/utils/CommonService.ts +1 -7
@@ -4,7 +4,7 @@ interface ServiceBadgesMobileProps {
4
4
  showTopLabel?: string;
5
5
  isSoldOut: boolean;
6
6
  colors: any;
7
- renderIcon: (iconKey: string, size?: string) => React.ReactNode;
7
+ renderIcon: (iconKey: string, size?: string, styles?: any) => React.ReactNode;
8
8
  translation?: {
9
9
  directService?: string;
10
10
  };
@@ -24,10 +24,10 @@ const ServiceBadgesMobile: React.FC<ServiceBadgesMobileProps> = ({
24
24
  isConexion,
25
25
  }) => {
26
26
  return (
27
- <div className="absolute -top-[10px] left-0 w-full flex items-center justify-end gap-[12px] pr-[17px] z-10">
27
+ <div className="absolute -top-[12px] left-0 w-full flex items-center justify-end gap-[12px] pr-[17px] z-10">
28
28
  {showTopLabel && (
29
29
  <div
30
- className={`flex items-center gap-[2px] py-[4px] px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20`}
30
+ className={`flex items-center gap-[2p x] py-[4px] px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20`}
31
31
  style={{
32
32
  backgroundColor: "#fff",
33
33
  border: isSoldOut
@@ -36,8 +36,11 @@ const ServiceBadgesMobile: React.FC<ServiceBadgesMobileProps> = ({
36
36
  color: isSoldOut ? "#ccc" : colors.topLabelColor,
37
37
  }}
38
38
  >
39
- <div className={isSoldOut ? "grayscale" : ""}>
40
- {renderIcon("specialDeparture", "12px")}
39
+ <div
40
+ className={isSoldOut ? "grayscale" : ""}
41
+ style={{ marginTop: "1px" }}
42
+ >
43
+ {renderIcon("specialDeparture", "12px", { marginTop: "1px" })}
41
44
  </div>
42
45
  <div
43
46
  style={{
@@ -39,15 +39,9 @@ const commonService = {
39
39
  }
40
40
  },
41
41
 
42
- truncateSeatLabel: (label: string | number, maxLength?: number): string => {
42
+ truncateSeatLabel: (label: string | number): string => {
43
43
  if (typeof label !== "string") return String(label);
44
44
  if (label.includes("(")) return label;
45
-
46
- // If maxLength provided, hard-truncate regardless of word count
47
- if (maxLength != null && label.length > maxLength) {
48
- return label.slice(0, maxLength) + "...";
49
- }
50
-
51
45
  const words = label.trim().split(/\s+/);
52
46
 
53
47
  const truncateWord = (word: string) =>