@prijsvrijtechsupport/ui 0.0.39 → 0.0.41

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.cjs CHANGED
@@ -178,11 +178,18 @@ var globals_default = {};
178
178
  * This prevents global style conflicts when the UI package is imported.
179
179
  */
180
180
  function withPvUi(Component) {
181
- const WrappedComponent = (0, react.forwardRef)((props, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, {
182
- ...props,
183
- ref,
184
- "data-pv-ui": true
185
- }));
181
+ const WrappedComponent = (0, react.forwardRef)((props, ref) => {
182
+ const scopedProps = {
183
+ ...props,
184
+ ref,
185
+ "data-pv-ui": true
186
+ };
187
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
188
+ "data-pv-ui": true,
189
+ style: { display: "contents" },
190
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, { ...scopedProps })
191
+ });
192
+ });
186
193
  WrappedComponent.displayName = `withPvUi(${Component.displayName || Component.name || "Component"})`;
187
194
  return WrappedComponent;
188
195
  }
@@ -281,12 +288,12 @@ const Button = (0, react.forwardRef)(function Button$1({ type = "button", varian
281
288
  ...props,
282
289
  children: [
283
290
  !iconRight && formattedIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
284
- className: "w-4 h-4",
291
+ className: "w-4 h-4 justify-center flex items-center",
285
292
  children: formattedIcon
286
293
  }),
287
294
  children,
288
295
  iconRight && formattedIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
289
- className: "w-4 h-4",
296
+ className: "w-4 h-4 justify-center flex items-center",
290
297
  children: formattedIcon
291
298
  })
292
299
  ]
@@ -4345,9 +4352,9 @@ const TransportToggle = withPvUi(({ options, selectedValue, onSelect, disabled =
4345
4352
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
4346
4353
  className: "flex flex-col items-center",
4347
4354
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
4348
- className: "whitespace-nowrap uppercase flex flex-row items-center",
4355
+ className: "whitespace-nowrap uppercase flex flex-row items-center gap-2",
4349
4356
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4350
- className: "flex items-center justify-center w-8 h-4 mb-1",
4357
+ className: "flex items-center justify-center w-auto h-4",
4351
4358
  children: (() => {
4352
4359
  const IconComponent = iconMap[option.icon];
4353
4360
  if (!IconComponent) return null;
@@ -4366,7 +4373,7 @@ const TransportToggle = withPvUi(({ options, selectedValue, onSelect, disabled =
4366
4373
  })
4367
4374
  });
4368
4375
  });
4369
- const Toggle = withPvUi(TransportToggle);
4376
+ const Toggle = TransportToggle;
4370
4377
 
4371
4378
  //#endregion
4372
4379
  //#region src/components/topHeaderMenu/index.tsx
@@ -4967,7 +4974,7 @@ const Stepper = ({ className, steps,...props }) => {
4967
4974
 
4968
4975
  //#endregion
4969
4976
  //#region src/components/resultPageFilterBox/index.tsx
4970
- const ResultPageFilterBox = ({ className, filters,...props }) => {
4977
+ const ResultPageFilterBox = ({ className, filters, clickFunction,...props }) => {
4971
4978
  const departureDateData = filters.find((filter) => filter.Name === "Vertrekdatum");
4972
4979
  const durationData = filters.find((filter) => filter.Name === "Reisduur");
4973
4980
  const boardBasisData = filters.find((filter) => filter.Name === "Verzorging");
@@ -4990,19 +4997,22 @@ const ResultPageFilterBox = ({ className, filters,...props }) => {
4990
4997
  "YYYY-MM-DD"
4991
4998
  ]).locale("nl").format("D MMMM [']YY") : "Geen voorkeur",
4992
4999
  icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCalendar, { className: "size-5" }),
4993
- disabled: Boolean(departureDateData?.Items && departureDateData?.Items.length <= 1)
5000
+ disabled: Boolean(departureDateData?.Items && departureDateData?.Items.length <= 1),
5001
+ isCancellable: true
4994
5002
  },
4995
5003
  {
4996
5004
  name: travelParty?.Name,
4997
5005
  value: travelParty?.Value,
4998
5006
  icon: travelParty?.icon,
4999
- disabled: false
5007
+ disabled: false,
5008
+ isCancellable: true
5000
5009
  },
5001
5010
  {
5002
5011
  name: durationData?.Name,
5003
5012
  value: durationData?.Items?.find((item) => item.Active)?.Name || "Geen voorkeur",
5004
5013
  icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconClock, { className: "size-5" }),
5005
- disabled: Boolean(durationData?.Items && durationData?.Items.length <= 1)
5014
+ disabled: Boolean(durationData?.Items && durationData?.Items.length <= 1),
5015
+ isCancellable: true
5006
5016
  },
5007
5017
  {
5008
5018
  name: boardBasisData?.Name,
@@ -5042,21 +5052,28 @@ const ResultPageFilterBox = ({ className, filters,...props }) => {
5042
5052
  className: (0, clsx.default)("bg-white", className),
5043
5053
  ...props,
5044
5054
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5045
- className: "border border-primary rounded-md overflow-hidden grid grid-cols-1 md:grid-cols-2 [&>*:last-child]:border-b-0 md:[&>*:nth-last-child(-n+2)]:border-b-0 md:[&>*:nth-child(even)]:border-l md:[&>*:nth-child(even)]:border-l-primary [&>*:not(:last-child)]:border-b [&>*:not(:last-child)]:border-b-primary md:[&>*:not(:nth-last-child(-n+2))]:border-b md:[&>*:not(:nth-last-child(-n+2))]:border-b-primary",
5055
+ className: "border border-[#80c8f8] rounded-md overflow-hidden grid grid-cols-1 md:grid-cols-2 [&>*:last-child]:border-b-0 md:[&>*:nth-last-child(-n+2)]:border-b-0 md:[&>*:nth-child(even)]:border-l md:[&>*:nth-child(even)]:border-l-[#80c8f8] [&>*:not(:last-child)]:border-b [&>*:not(:last-child)]:border-b-[#80c8f8] md:[&>*:not(:nth-last-child(-n+2))]:border-b md:[&>*:not(:nth-last-child(-n+2))]:border-b-[#80c8f8]",
5046
5056
  children: filtersData.map((filter, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
5047
- className: `flex flex-row items-center gap-2 p-1.5 hover:bg-gray-50/80 cursor-pointer ${filter.disabled ? "bg-gray-50 text-black/50" : ""}`,
5048
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5049
- className: "whitespace-nowrap p-1.5",
5050
- children: filter.icon
5051
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5052
- className: "flex flex-col gap-0 items-start",
5057
+ onClick: () => {},
5058
+ className: `flex flex-row items-center justify-between gap-2 p-1.5 hover:bg-gray-50/70 cursor-pointer ${filter.disabled ? "bg-gray-100 text-black/50" : ""}`,
5059
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5060
+ className: "flex flex-row",
5053
5061
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5054
- className: "font-bold text-xs",
5055
- children: filter.name
5056
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5057
- className: "text-base",
5058
- children: filter.value
5062
+ className: "whitespace-nowrap p-1.5",
5063
+ children: filter.icon
5064
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5065
+ className: "flex flex-col gap-0 items-start",
5066
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5067
+ className: "font-bold text-xs text-[#666666]",
5068
+ children: filter.name
5069
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5070
+ className: "text-sm",
5071
+ children: filter.value
5072
+ })]
5059
5073
  })]
5074
+ }), filter.isCancellable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5075
+ className: "flex items-center mr-2 bg-gray-200 rounded-full p-1",
5076
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCancel, { className: "size-3 text-white" })
5060
5077
  })]
5061
5078
  }, index))
5062
5079
  })
@@ -9361,23 +9378,23 @@ const MatrixTable = ({ className, startDuration, endDuration, startDate, endDate
9361
9378
  onClick: loadPrevious,
9362
9379
  variant: "icon",
9363
9380
  iconRight: true,
9364
- className: "flex flex-row items-center justify-start text-xs",
9381
+ className: "flex flex-row font-medium items-center justify-start text-xs",
9365
9382
  icon: false,
9366
9383
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconArrowLeft, {
9367
9384
  className: "text-primary",
9368
- width: 16,
9369
- height: 16
9385
+ width: 20,
9386
+ height: 20
9370
9387
  }), " eerder"]
9371
9388
  }) : null, index === dates.length - 1 && loadNext ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
9372
9389
  onClick: loadNext,
9373
9390
  variant: "icon",
9374
- className: "flex flex-row items-center justify-start text-xs",
9391
+ className: "flex flex-row font-medium items-center justify-start text-xs",
9375
9392
  iconRight: true,
9376
9393
  icon: false,
9377
9394
  children: ["later", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconArrowRight, {
9378
9395
  className: "text-primary",
9379
- width: 16,
9380
- height: 16
9396
+ width: 20,
9397
+ height: 20
9381
9398
  })]
9382
9399
  }) : null]
9383
9400
  }, date);
@@ -9936,20 +9953,58 @@ const WarningText = ({ className, warningText, onClick, type,...props }) => /* @
9936
9953
  })]
9937
9954
  });
9938
9955
 
9956
+ //#endregion
9957
+ //#region src/components/reviewSmall/index.tsx
9958
+ const ReviewSmall = ({ className, rating, showArrow = true, "data-testid": dataTestId = "review",...props }) => {
9959
+ const formatRating$1 = (rating$1) => {
9960
+ return rating$1.toFixed(1);
9961
+ };
9962
+ const ratingProcessed = formatRating$1(rating);
9963
+ const RatingNumber = ({ className: className$1, showArrow: showArrow$1 }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9964
+ className: "relative",
9965
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9966
+ className: cn("review-small-color review-small-number-color", className$1),
9967
+ children: ratingProcessed
9968
+ }), showArrow$1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9969
+ className: "absolute left-1/2 -translate-x-1/2 -bottom-[6px]",
9970
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "w-0 h-0 border-l-[8px] border-l-transparent border-r-[8px] border-r-transparent border-t-[8px] review-small-arrow" })
9971
+ })]
9972
+ });
9973
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9974
+ "data-component": "review",
9975
+ "data-testid": dataTestId,
9976
+ className: (0, clsx.default)(className, "flex flex-col w-fit"),
9977
+ ...props,
9978
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9979
+ className: "flex flex-row gap-2 review-small rounded-sm",
9980
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9981
+ className: "flex content-center items-center font-bold",
9982
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RatingNumber, {
9983
+ className: "px-1 rounded-xs",
9984
+ showArrow
9985
+ })
9986
+ })
9987
+ })
9988
+ });
9989
+ };
9990
+
9939
9991
  //#endregion
9940
9992
  //#region src/components/hero/index.tsx
9941
9993
  const Hero = ({ className, sliderImages, topRightImage, bottomLeftImage, bottomRightImage, bottomRightOverlay, hotel, priceBoxPosition = "end",...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9942
9994
  "data-component": "hero",
9943
- className: (0, clsx.default)(className, "bg-white p-1 rounded-lg"),
9995
+ className: (0, clsx.default)(className, "bg-white p-1 rounded-lg hero-shadow"),
9944
9996
  ...props,
9945
9997
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9946
9998
  className: "flex flex-col md:flex-row",
9947
9999
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9948
10000
  className: (0, clsx.default)("grid gap-1 md:aspect-[16/6] md:grid-cols-3 md:grid-rows-[2fr_1fr]", priceBoxPosition === "start" ? "order-2 md:order-2" : "order-1 md:order-1"),
9949
10001
  children: [
9950
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9951
- className: "md:col-span-2 md:row-span-2 overflow-hidden rounded-l-lg",
9952
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Slider, {
10002
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
10003
+ className: "md:col-span-2 md:row-span-2 overflow-hidden rounded-l-lg relative",
10004
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReviewSmall, {
10005
+ className: "absolute right-4 top-4 z-50",
10006
+ rating: 9.3
10007
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Slider, {
9953
10008
  className: "h-full max-h-[340px] md:h-full rounded-l-lg",
9954
10009
  slides: sliderImages.map((src, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
9955
10010
  src,
@@ -9960,7 +10015,7 @@ const Hero = ({ className, sliderImages, topRightImage, bottomLeftImage, bottomR
9960
10015
  dotsPlacement: "inside",
9961
10016
  options: { loop: true },
9962
10017
  lazyLoad: true
9963
- })
10018
+ })]
9964
10019
  }),
9965
10020
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9966
10021
  className: "hidden md:flex col-span-1 row-span-1 overflow-hidden",
@@ -10403,41 +10458,6 @@ const FlightSwitch = ({ className, leg, direction, onClassSelect,...props }) =>
10403
10458
  });
10404
10459
  };
10405
10460
 
10406
- //#endregion
10407
- //#region src/components/reviewSmall/index.tsx
10408
- const ReviewSmall = ({ className, rating, showArrow = true, "data-testid": dataTestId = "review",...props }) => {
10409
- const formatRating$1 = (rating$1) => {
10410
- return rating$1.toFixed(1);
10411
- };
10412
- const ratingProcessed = formatRating$1(rating);
10413
- const RatingNumber = ({ className: className$1, showArrow: showArrow$1 }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
10414
- className: "relative",
10415
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
10416
- className: cn("review-small-color review-small-number-color", className$1),
10417
- children: ratingProcessed
10418
- }), showArrow$1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
10419
- className: "absolute left-1/2 -translate-x-1/2 -bottom-[6px]",
10420
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "w-0 h-0 border-l-[8px] border-l-transparent border-r-[8px] border-r-transparent border-t-[8px] review-small-arrow" })
10421
- })]
10422
- });
10423
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
10424
- "data-component": "review",
10425
- "data-testid": dataTestId,
10426
- className: (0, clsx.default)(className, "flex flex-col w-fit"),
10427
- ...props,
10428
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
10429
- className: "flex flex-row gap-2 review-small rounded-sm",
10430
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
10431
- className: "flex content-center items-center font-bold",
10432
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RatingNumber, {
10433
- className: "px-1 rounded-xs",
10434
- showArrow
10435
- })
10436
- })
10437
- })
10438
- });
10439
- };
10440
-
10441
10461
  //#endregion
10442
10462
  //#region src/components/giftCard/index.tsx
10443
10463
  const setCurrencyValue = (value, showCurrencySymbol = true) => {
@@ -11313,7 +11333,7 @@ const SearchBlockButton = ({ className, label, labelOutside, icon, downIcon, onC
11313
11333
  className: "searchBlockButtonLabel",
11314
11334
  children: label
11315
11335
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
11316
- className: (0, clsx.default)(className, "searchBlockButton flex flex-row items-center justify-between gap-2 px-2 py-2"),
11336
+ className: (0, clsx.default)(className, "searchBlockButton flex flex-row items-center justify-between gap-2 px-2 py-2 cursor-pointer border border-transparent hover:border-gray-300 transition-all"),
11317
11337
  onClick,
11318
11338
  ...props,
11319
11339
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -11346,7 +11366,7 @@ const SearchBlockButton = ({ className, label, labelOutside, icon, downIcon, onC
11346
11366
  })]
11347
11367
  })] });
11348
11368
  };
11349
- const SearchBlock = ({ className, searchBlockTitle, searchBlockForm, onClickFn, "data-testid": dataTestId = "book-module",...props }) => {
11369
+ const SearchBlock = ({ className, searchBlockTitle, searchBlockForm, loading, onClickFn, "data-testid": dataTestId = "book-module",...props }) => {
11350
11370
  const brand = useBrand();
11351
11371
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
11352
11372
  "data-component": "book-module",
@@ -11398,7 +11418,7 @@ const SearchBlock = ({ className, searchBlockTitle, searchBlockForm, onClickFn,
11398
11418
  variant: `${brand === "prijsvrij" ? "primaryGlow" : "primary"}`,
11399
11419
  className: `${brand === "dreizen" ? "mt-6" : "mt-2"}`,
11400
11420
  onClick: onClickFn,
11401
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconArrowRight, {}),
11421
+ icon: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconSun, { className: "animate-spin" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconArrowRight, {}),
11402
11422
  iconRight: true,
11403
11423
  children: "Zoek vakanties"
11404
11424
  })
@@ -11670,6 +11690,7 @@ exports.TimeInput = TimeInput;
11670
11690
  exports.Toggle = Toggle;
11671
11691
  exports.TopHeaderMenu = TopHeaderMenu;
11672
11692
  exports.TopMenu = TopMenu;
11693
+ exports.TransportToggle = TransportToggle;
11673
11694
  exports.TruncatedText = TruncatedText;
11674
11695
  exports.UnorderedList = UnorderedList;
11675
11696
  exports.UnorderedListItem = UnorderedListItem;