@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.js CHANGED
@@ -156,11 +156,18 @@ var globals_default = {};
156
156
  * This prevents global style conflicts when the UI package is imported.
157
157
  */
158
158
  function withPvUi(Component) {
159
- const WrappedComponent = forwardRef((props, ref) => /* @__PURE__ */ jsx(Component, {
160
- ...props,
161
- ref,
162
- "data-pv-ui": true
163
- }));
159
+ const WrappedComponent = forwardRef((props, ref) => {
160
+ const scopedProps = {
161
+ ...props,
162
+ ref,
163
+ "data-pv-ui": true
164
+ };
165
+ return /* @__PURE__ */ jsx("div", {
166
+ "data-pv-ui": true,
167
+ style: { display: "contents" },
168
+ children: /* @__PURE__ */ jsx(Component, { ...scopedProps })
169
+ });
170
+ });
164
171
  WrappedComponent.displayName = `withPvUi(${Component.displayName || Component.name || "Component"})`;
165
172
  return WrappedComponent;
166
173
  }
@@ -259,12 +266,12 @@ const Button = forwardRef(function Button$1({ type = "button", variant = "primar
259
266
  ...props,
260
267
  children: [
261
268
  !iconRight && formattedIcon && /* @__PURE__ */ jsx("span", {
262
- className: "w-4 h-4",
269
+ className: "w-4 h-4 justify-center flex items-center",
263
270
  children: formattedIcon
264
271
  }),
265
272
  children,
266
273
  iconRight && formattedIcon && /* @__PURE__ */ jsx("span", {
267
- className: "w-4 h-4",
274
+ className: "w-4 h-4 justify-center flex items-center",
268
275
  children: formattedIcon
269
276
  })
270
277
  ]
@@ -4323,9 +4330,9 @@ const TransportToggle = withPvUi(({ options, selectedValue, onSelect, disabled =
4323
4330
  children: /* @__PURE__ */ jsxs("span", {
4324
4331
  className: "flex flex-col items-center",
4325
4332
  children: [/* @__PURE__ */ jsxs("span", {
4326
- className: "whitespace-nowrap uppercase flex flex-row items-center",
4333
+ className: "whitespace-nowrap uppercase flex flex-row items-center gap-2",
4327
4334
  children: [/* @__PURE__ */ jsx("div", {
4328
- className: "flex items-center justify-center w-8 h-4 mb-1",
4335
+ className: "flex items-center justify-center w-auto h-4",
4329
4336
  children: (() => {
4330
4337
  const IconComponent = iconMap[option.icon];
4331
4338
  if (!IconComponent) return null;
@@ -4344,7 +4351,7 @@ const TransportToggle = withPvUi(({ options, selectedValue, onSelect, disabled =
4344
4351
  })
4345
4352
  });
4346
4353
  });
4347
- const Toggle = withPvUi(TransportToggle);
4354
+ const Toggle = TransportToggle;
4348
4355
 
4349
4356
  //#endregion
4350
4357
  //#region src/components/topHeaderMenu/index.tsx
@@ -4945,7 +4952,7 @@ const Stepper = ({ className, steps,...props }) => {
4945
4952
 
4946
4953
  //#endregion
4947
4954
  //#region src/components/resultPageFilterBox/index.tsx
4948
- const ResultPageFilterBox = ({ className, filters,...props }) => {
4955
+ const ResultPageFilterBox = ({ className, filters, clickFunction,...props }) => {
4949
4956
  const departureDateData = filters.find((filter) => filter.Name === "Vertrekdatum");
4950
4957
  const durationData = filters.find((filter) => filter.Name === "Reisduur");
4951
4958
  const boardBasisData = filters.find((filter) => filter.Name === "Verzorging");
@@ -4968,19 +4975,22 @@ const ResultPageFilterBox = ({ className, filters,...props }) => {
4968
4975
  "YYYY-MM-DD"
4969
4976
  ]).locale("nl").format("D MMMM [']YY") : "Geen voorkeur",
4970
4977
  icon: /* @__PURE__ */ jsx(IconCalendar, { className: "size-5" }),
4971
- disabled: Boolean(departureDateData?.Items && departureDateData?.Items.length <= 1)
4978
+ disabled: Boolean(departureDateData?.Items && departureDateData?.Items.length <= 1),
4979
+ isCancellable: true
4972
4980
  },
4973
4981
  {
4974
4982
  name: travelParty?.Name,
4975
4983
  value: travelParty?.Value,
4976
4984
  icon: travelParty?.icon,
4977
- disabled: false
4985
+ disabled: false,
4986
+ isCancellable: true
4978
4987
  },
4979
4988
  {
4980
4989
  name: durationData?.Name,
4981
4990
  value: durationData?.Items?.find((item) => item.Active)?.Name || "Geen voorkeur",
4982
4991
  icon: /* @__PURE__ */ jsx(IconClock, { className: "size-5" }),
4983
- disabled: Boolean(durationData?.Items && durationData?.Items.length <= 1)
4992
+ disabled: Boolean(durationData?.Items && durationData?.Items.length <= 1),
4993
+ isCancellable: true
4984
4994
  },
4985
4995
  {
4986
4996
  name: boardBasisData?.Name,
@@ -5020,21 +5030,28 @@ const ResultPageFilterBox = ({ className, filters,...props }) => {
5020
5030
  className: clsx("bg-white", className),
5021
5031
  ...props,
5022
5032
  children: /* @__PURE__ */ jsx("div", {
5023
- 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",
5033
+ 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]",
5024
5034
  children: filtersData.map((filter, index) => /* @__PURE__ */ jsxs("button", {
5025
- 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" : ""}`,
5026
- children: [/* @__PURE__ */ jsx("span", {
5027
- className: "whitespace-nowrap p-1.5",
5028
- children: filter.icon
5029
- }), /* @__PURE__ */ jsxs("div", {
5030
- className: "flex flex-col gap-0 items-start",
5035
+ onClick: () => {},
5036
+ 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" : ""}`,
5037
+ children: [/* @__PURE__ */ jsxs("div", {
5038
+ className: "flex flex-row",
5031
5039
  children: [/* @__PURE__ */ jsx("span", {
5032
- className: "font-bold text-xs",
5033
- children: filter.name
5034
- }), /* @__PURE__ */ jsx("span", {
5035
- className: "text-base",
5036
- children: filter.value
5040
+ className: "whitespace-nowrap p-1.5",
5041
+ children: filter.icon
5042
+ }), /* @__PURE__ */ jsxs("div", {
5043
+ className: "flex flex-col gap-0 items-start",
5044
+ children: [/* @__PURE__ */ jsx("span", {
5045
+ className: "font-bold text-xs text-[#666666]",
5046
+ children: filter.name
5047
+ }), /* @__PURE__ */ jsx("span", {
5048
+ className: "text-sm",
5049
+ children: filter.value
5050
+ })]
5037
5051
  })]
5052
+ }), filter.isCancellable && /* @__PURE__ */ jsx("div", {
5053
+ className: "flex items-center mr-2 bg-gray-200 rounded-full p-1",
5054
+ children: /* @__PURE__ */ jsx(IconCancel, { className: "size-3 text-white" })
5038
5055
  })]
5039
5056
  }, index))
5040
5057
  })
@@ -9339,23 +9356,23 @@ const MatrixTable = ({ className, startDuration, endDuration, startDate, endDate
9339
9356
  onClick: loadPrevious,
9340
9357
  variant: "icon",
9341
9358
  iconRight: true,
9342
- className: "flex flex-row items-center justify-start text-xs",
9359
+ className: "flex flex-row font-medium items-center justify-start text-xs",
9343
9360
  icon: false,
9344
9361
  children: [/* @__PURE__ */ jsx(IconArrowLeft, {
9345
9362
  className: "text-primary",
9346
- width: 16,
9347
- height: 16
9363
+ width: 20,
9364
+ height: 20
9348
9365
  }), " eerder"]
9349
9366
  }) : null, index === dates.length - 1 && loadNext ? /* @__PURE__ */ jsxs(Button, {
9350
9367
  onClick: loadNext,
9351
9368
  variant: "icon",
9352
- className: "flex flex-row items-center justify-start text-xs",
9369
+ className: "flex flex-row font-medium items-center justify-start text-xs",
9353
9370
  iconRight: true,
9354
9371
  icon: false,
9355
9372
  children: ["later", /* @__PURE__ */ jsx(IconArrowRight, {
9356
9373
  className: "text-primary",
9357
- width: 16,
9358
- height: 16
9374
+ width: 20,
9375
+ height: 20
9359
9376
  })]
9360
9377
  }) : null]
9361
9378
  }, date);
@@ -9914,20 +9931,58 @@ const WarningText = ({ className, warningText, onClick, type,...props }) => /* @
9914
9931
  })]
9915
9932
  });
9916
9933
 
9934
+ //#endregion
9935
+ //#region src/components/reviewSmall/index.tsx
9936
+ const ReviewSmall = ({ className, rating, showArrow = true, "data-testid": dataTestId = "review",...props }) => {
9937
+ const formatRating$1 = (rating$1) => {
9938
+ return rating$1.toFixed(1);
9939
+ };
9940
+ const ratingProcessed = formatRating$1(rating);
9941
+ const RatingNumber = ({ className: className$1, showArrow: showArrow$1 }) => /* @__PURE__ */ jsxs("div", {
9942
+ className: "relative",
9943
+ children: [/* @__PURE__ */ jsx("span", {
9944
+ className: cn("review-small-color review-small-number-color", className$1),
9945
+ children: ratingProcessed
9946
+ }), showArrow$1 && /* @__PURE__ */ jsx("div", {
9947
+ className: "absolute left-1/2 -translate-x-1/2 -bottom-[6px]",
9948
+ children: /* @__PURE__ */ 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" })
9949
+ })]
9950
+ });
9951
+ return /* @__PURE__ */ jsx("div", {
9952
+ "data-component": "review",
9953
+ "data-testid": dataTestId,
9954
+ className: clsx(className, "flex flex-col w-fit"),
9955
+ ...props,
9956
+ children: /* @__PURE__ */ jsx("div", {
9957
+ className: "flex flex-row gap-2 review-small rounded-sm",
9958
+ children: /* @__PURE__ */ jsx("div", {
9959
+ className: "flex content-center items-center font-bold",
9960
+ children: /* @__PURE__ */ jsx(RatingNumber, {
9961
+ className: "px-1 rounded-xs",
9962
+ showArrow
9963
+ })
9964
+ })
9965
+ })
9966
+ });
9967
+ };
9968
+
9917
9969
  //#endregion
9918
9970
  //#region src/components/hero/index.tsx
9919
9971
  const Hero = ({ className, sliderImages, topRightImage, bottomLeftImage, bottomRightImage, bottomRightOverlay, hotel, priceBoxPosition = "end",...props }) => /* @__PURE__ */ jsx("div", {
9920
9972
  "data-component": "hero",
9921
- className: clsx(className, "bg-white p-1 rounded-lg"),
9973
+ className: clsx(className, "bg-white p-1 rounded-lg hero-shadow"),
9922
9974
  ...props,
9923
9975
  children: /* @__PURE__ */ jsxs("div", {
9924
9976
  className: "flex flex-col md:flex-row",
9925
9977
  children: [/* @__PURE__ */ jsxs("div", {
9926
9978
  className: clsx("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"),
9927
9979
  children: [
9928
- /* @__PURE__ */ jsx("div", {
9929
- className: "md:col-span-2 md:row-span-2 overflow-hidden rounded-l-lg",
9930
- children: /* @__PURE__ */ jsx(Slider, {
9980
+ /* @__PURE__ */ jsxs("div", {
9981
+ className: "md:col-span-2 md:row-span-2 overflow-hidden rounded-l-lg relative",
9982
+ children: [/* @__PURE__ */ jsx(ReviewSmall, {
9983
+ className: "absolute right-4 top-4 z-50",
9984
+ rating: 9.3
9985
+ }), /* @__PURE__ */ jsx(Slider, {
9931
9986
  className: "h-full max-h-[340px] md:h-full rounded-l-lg",
9932
9987
  slides: sliderImages.map((src, index) => /* @__PURE__ */ jsx("img", {
9933
9988
  src,
@@ -9938,7 +9993,7 @@ const Hero = ({ className, sliderImages, topRightImage, bottomLeftImage, bottomR
9938
9993
  dotsPlacement: "inside",
9939
9994
  options: { loop: true },
9940
9995
  lazyLoad: true
9941
- })
9996
+ })]
9942
9997
  }),
9943
9998
  /* @__PURE__ */ jsx("div", {
9944
9999
  className: "hidden md:flex col-span-1 row-span-1 overflow-hidden",
@@ -10381,41 +10436,6 @@ const FlightSwitch = ({ className, leg, direction, onClassSelect,...props }) =>
10381
10436
  });
10382
10437
  };
10383
10438
 
10384
- //#endregion
10385
- //#region src/components/reviewSmall/index.tsx
10386
- const ReviewSmall = ({ className, rating, showArrow = true, "data-testid": dataTestId = "review",...props }) => {
10387
- const formatRating$1 = (rating$1) => {
10388
- return rating$1.toFixed(1);
10389
- };
10390
- const ratingProcessed = formatRating$1(rating);
10391
- const RatingNumber = ({ className: className$1, showArrow: showArrow$1 }) => /* @__PURE__ */ jsxs("div", {
10392
- className: "relative",
10393
- children: [/* @__PURE__ */ jsx("span", {
10394
- className: cn("review-small-color review-small-number-color", className$1),
10395
- children: ratingProcessed
10396
- }), showArrow$1 && /* @__PURE__ */ jsx("div", {
10397
- className: "absolute left-1/2 -translate-x-1/2 -bottom-[6px]",
10398
- children: /* @__PURE__ */ 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" })
10399
- })]
10400
- });
10401
- return /* @__PURE__ */ jsx("div", {
10402
- "data-component": "review",
10403
- "data-testid": dataTestId,
10404
- className: clsx(className, "flex flex-col w-fit"),
10405
- ...props,
10406
- children: /* @__PURE__ */ jsx("div", {
10407
- className: "flex flex-row gap-2 review-small rounded-sm",
10408
- children: /* @__PURE__ */ jsx("div", {
10409
- className: "flex content-center items-center font-bold",
10410
- children: /* @__PURE__ */ jsx(RatingNumber, {
10411
- className: "px-1 rounded-xs",
10412
- showArrow
10413
- })
10414
- })
10415
- })
10416
- });
10417
- };
10418
-
10419
10439
  //#endregion
10420
10440
  //#region src/components/giftCard/index.tsx
10421
10441
  const setCurrencyValue = (value, showCurrencySymbol = true) => {
@@ -11291,7 +11311,7 @@ const SearchBlockButton = ({ className, label, labelOutside, icon, downIcon, onC
11291
11311
  className: "searchBlockButtonLabel",
11292
11312
  children: label
11293
11313
  }), /* @__PURE__ */ jsxs("button", {
11294
- className: clsx(className, "searchBlockButton flex flex-row items-center justify-between gap-2 px-2 py-2"),
11314
+ className: clsx(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"),
11295
11315
  onClick,
11296
11316
  ...props,
11297
11317
  children: [/* @__PURE__ */ jsxs("div", {
@@ -11324,7 +11344,7 @@ const SearchBlockButton = ({ className, label, labelOutside, icon, downIcon, onC
11324
11344
  })]
11325
11345
  })] });
11326
11346
  };
11327
- const SearchBlock = ({ className, searchBlockTitle, searchBlockForm, onClickFn, "data-testid": dataTestId = "book-module",...props }) => {
11347
+ const SearchBlock = ({ className, searchBlockTitle, searchBlockForm, loading, onClickFn, "data-testid": dataTestId = "book-module",...props }) => {
11328
11348
  const brand = useBrand();
11329
11349
  return /* @__PURE__ */ jsx("div", {
11330
11350
  "data-component": "book-module",
@@ -11376,7 +11396,7 @@ const SearchBlock = ({ className, searchBlockTitle, searchBlockForm, onClickFn,
11376
11396
  variant: `${brand === "prijsvrij" ? "primaryGlow" : "primary"}`,
11377
11397
  className: `${brand === "dreizen" ? "mt-6" : "mt-2"}`,
11378
11398
  onClick: onClickFn,
11379
- icon: /* @__PURE__ */ jsx(IconArrowRight, {}),
11399
+ icon: loading ? /* @__PURE__ */ jsx(IconSun, { className: "animate-spin" }) : /* @__PURE__ */ jsx(IconArrowRight, {}),
11380
11400
  iconRight: true,
11381
11401
  children: "Zoek vakanties"
11382
11402
  })
@@ -11484,5 +11504,5 @@ const RangeSlider = forwardRef(function RangeSlider$1({ className, min = 0, max
11484
11504
  RangeSlider.displayName = "RangeSlider";
11485
11505
 
11486
11506
  //#endregion
11487
- export { Accordion, ActionIcon, Alert, AutoCompleteInput, Avatar, AvatarIndicator, Badge, BigBadge, BlogWidget, BrandProvider, BrandTopMenu, BreadCrumb, Button, CSS_VARIABLE_KEYS, Calendar, CategoryFilter, Chatbot, Checkbox, Collection, CounterIcon, Coupon, DatePickerInput, Divider, Dropdown, FavouriteButton, FilterButton, Filters, FlightSwitch, Footer, GiftCard, HR, HamburgerMenuButton, Header, Hero, HotelAccomodationResults, HotelWidget, IconAlert, IconArrival, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconBeach, IconBed, IconBlog, IconBus, IconCalendar, IconCancel, IconCar, IconCarSun, IconCheck, IconChevronRight, IconCity, IconClock, IconCocktail, IconDelete, IconDeparture, IconDollar, IconEdit, IconExpand, IconFacebook, IconFavorite, IconFilter, IconFood, IconHeart, IconHeartFilled, IconHot, IconHotel, IconHouse, IconIce, IconInfo, IconInstagram, IconLuggage, IconMail, IconMap, IconMinus, IconParty, IconPhone, IconPhoto, IconPinterest, IconPlane, IconPlus, IconPresent, IconQuestion, IconRating, IconSearch, IconSeat, IconShare, IconSplash, IconStar, IconSuccess, IconSun, IconSupport, IconTemperature, IconTiktok, IconTransfer, IconTree, IconTwitter, IconUser, IconView, IconWarning, IconWatched, IconWhatsapp, IconWinterSport, IconWinterSun, Island, Label, LinkBox, Loading, Logo, Map, MatrixTable, Menu, MiddleNavigation, Modal, Nominations, NumberField, PageNavigation, PageRating, PasswordInput, PhoneNumberInput, PhotoCardsRotated, Popover, PriceBox, PriceCheck, ProfileMenu, ProgressBar, PvPopup, QuantityButtons, RadioButton, RangeSlider, Rating, RegionSelector, ResultPageFilterBox, Review, ReviewSmall, Reviews, ScrollToTop, SearchBlock, SearchBox, SearchBoxResults, SearchInput, Select, Skeleton, SkillPill, Slider, Spotlights, Stepper, StickyFooter, StickyMobileButtonWrapper, Table, TableCell, TableHeader, TableHeaderItem, TableHeaderRow, TableRow, TabsBadge, TabsWrapper, TextInput, Textarea, TimeInput, Toggle, TopHeaderMenu, TopMenu, TruncatedText, UnorderedList, UnorderedListItem, UnstyledButton, Usp, ViewedAccomodations, WarningText, Weather, buttonVariants, getCSSVariable, setCSSVariable, useBrand, withPvUi };
11507
+ export { Accordion, ActionIcon, Alert, AutoCompleteInput, Avatar, AvatarIndicator, Badge, BigBadge, BlogWidget, BrandProvider, BrandTopMenu, BreadCrumb, Button, CSS_VARIABLE_KEYS, Calendar, CategoryFilter, Chatbot, Checkbox, Collection, CounterIcon, Coupon, DatePickerInput, Divider, Dropdown, FavouriteButton, FilterButton, Filters, FlightSwitch, Footer, GiftCard, HR, HamburgerMenuButton, Header, Hero, HotelAccomodationResults, HotelWidget, IconAlert, IconArrival, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconBeach, IconBed, IconBlog, IconBus, IconCalendar, IconCancel, IconCar, IconCarSun, IconCheck, IconChevronRight, IconCity, IconClock, IconCocktail, IconDelete, IconDeparture, IconDollar, IconEdit, IconExpand, IconFacebook, IconFavorite, IconFilter, IconFood, IconHeart, IconHeartFilled, IconHot, IconHotel, IconHouse, IconIce, IconInfo, IconInstagram, IconLuggage, IconMail, IconMap, IconMinus, IconParty, IconPhone, IconPhoto, IconPinterest, IconPlane, IconPlus, IconPresent, IconQuestion, IconRating, IconSearch, IconSeat, IconShare, IconSplash, IconStar, IconSuccess, IconSun, IconSupport, IconTemperature, IconTiktok, IconTransfer, IconTree, IconTwitter, IconUser, IconView, IconWarning, IconWatched, IconWhatsapp, IconWinterSport, IconWinterSun, Island, Label, LinkBox, Loading, Logo, Map, MatrixTable, Menu, MiddleNavigation, Modal, Nominations, NumberField, PageNavigation, PageRating, PasswordInput, PhoneNumberInput, PhotoCardsRotated, Popover, PriceBox, PriceCheck, ProfileMenu, ProgressBar, PvPopup, QuantityButtons, RadioButton, RangeSlider, Rating, RegionSelector, ResultPageFilterBox, Review, ReviewSmall, Reviews, ScrollToTop, SearchBlock, SearchBox, SearchBoxResults, SearchInput, Select, Skeleton, SkillPill, Slider, Spotlights, Stepper, StickyFooter, StickyMobileButtonWrapper, Table, TableCell, TableHeader, TableHeaderItem, TableHeaderRow, TableRow, TabsBadge, TabsWrapper, TextInput, Textarea, TimeInput, Toggle, TopHeaderMenu, TopMenu, TransportToggle, TruncatedText, UnorderedList, UnorderedListItem, UnstyledButton, Usp, ViewedAccomodations, WarningText, Weather, buttonVariants, getCSSVariable, setCSSVariable, useBrand, withPvUi };
11488
11508
  //# sourceMappingURL=index.js.map