@prijsvrijtechsupport/ui 0.0.43 → 0.0.45

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/dist/index.js CHANGED
@@ -4114,10 +4114,18 @@ const PageRating = ({ rating, ratingsCount, text, className }) => {
4114
4114
  if (boxRating > 0) {
4115
4115
  if (roundedRating % 1 !== 0) {
4116
4116
  const halfColorIndex = Math.floor(roundedRating) * 2 - 1;
4117
- ratingColor = RATING_COLORS[Math.min(halfColorIndex, RATING_COLORS.length - 1)] || "#FB3C00";
4117
+ if (halfColorIndex >= 0 && halfColorIndex < RATING_COLORS.length && RATING_COLORS[halfColorIndex]) {
4118
+ ratingColor = RATING_COLORS[halfColorIndex];
4119
+ } else {
4120
+ ratingColor = "#FB3C00";
4121
+ }
4118
4122
  } else {
4119
4123
  const fullColorIndex = Math.floor(boxRating) * 2 - 2;
4120
- ratingColor = RATING_COLORS[Math.min(fullColorIndex, RATING_COLORS.length - 1)] || "#FB3C00";
4124
+ if (fullColorIndex >= 0 && fullColorIndex < RATING_COLORS.length && RATING_COLORS[fullColorIndex]) {
4125
+ ratingColor = RATING_COLORS[fullColorIndex];
4126
+ } else {
4127
+ ratingColor = "#FB3C00";
4128
+ }
4121
4129
  }
4122
4130
  }
4123
4131
  return /* @__PURE__ */ jsx("div", {
@@ -4183,11 +4191,11 @@ const PriceCheck = ({ className, price, text, disabled = false, "data-testid": t
4183
4191
  children: [
4184
4192
  /* @__PURE__ */ jsx("span", { className: "price-background block w-full h-full" }),
4185
4193
  /* @__PURE__ */ jsx("span", {
4186
- className: "price-check-text-padding text-start price-check-color price-check-fontFamily price-check-font-price-text text-[11px] whitespace-nowrap",
4194
+ className: `price-check-text-padding${price && price > 999 ? "-large" : ""} text-start price-check-color price-check-fontFamily price-check-font-price-text text-[11px] whitespace-nowrap`,
4187
4195
  children: text
4188
4196
  }),
4189
4197
  /* @__PURE__ */ jsxs("span", {
4190
- className: "price-check-price-padding text-start price-check-color-price price-check-fontFamily-price font-bold text-2xl whitespace-nowrap price-check-price-margin-top",
4198
+ className: `price-check-price-padding${price && price > 999 ? "-large" : ""} text-start price-check-color-price price-check-fontFamily-price font-bold text-2xl whitespace-nowrap price-check-price-margin-top`,
4191
4199
  children: [
4192
4200
  price,
4193
4201
  ",",