@wayke-se/components-react 3.5.3 → 3.6.0-beta.1

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 (47) hide show
  1. package/README.md +51 -43
  2. package/dist-node/index.js +692 -128
  3. package/dist-node/index.js.map +1 -1
  4. package/dist-src/components/AccessoryCard/index.js +14 -0
  5. package/dist-src/components/AccessoryCard/wrapper.js +90 -0
  6. package/dist-src/components/DocumentList/wrapper.js +1 -1
  7. package/dist-src/components/Gallery/index.js +7 -4
  8. package/dist-src/components/Gallery/wrapper.js +71 -39
  9. package/dist-src/components/Icon/index.js +2 -0
  10. package/dist-src/components/Image/index.js +5 -0
  11. package/dist-src/components/Link/index.js +28 -0
  12. package/dist-src/components/NavButton/index.js +42 -0
  13. package/dist-src/components/OverflowGrid/index.js +56 -66
  14. package/dist-src/components/OverflowGrid/wrapper.js +144 -0
  15. package/dist-src/components/PriceBox/index.js +6 -0
  16. package/dist-src/components/PriceBox/wrapper.js +34 -0
  17. package/dist-src/layout/theme.js +8 -0
  18. package/dist-src/layouts/searchItem/Accessories/AccessoryModal.js +51 -0
  19. package/dist-src/layouts/searchItem/Accessories/index.js +32 -0
  20. package/dist-src/layouts/searchItem/Related.js +23 -25
  21. package/dist-src/layouts/searchItem/index.js +3 -1
  22. package/dist-src/queries/SEARCH_ITEM_BRANCH_QUERY.js +18 -0
  23. package/dist-src/queries/SEARCH_ITEM_QUERY.js +18 -0
  24. package/dist-types/@types/codegen/types.d.ts +17 -0
  25. package/dist-types/components/AccessoryCard/index.d.ts +16 -0
  26. package/dist-types/components/AccessoryCard/wrapper.d.ts +18 -0
  27. package/dist-types/components/Gallery/wrapper.d.ts +2 -6
  28. package/dist-types/components/Icon/index.d.ts +1 -0
  29. package/dist-types/components/Image/index.d.ts +1 -0
  30. package/dist-types/components/Link/index.d.ts +7 -0
  31. package/dist-types/components/NavButton/index.d.ts +3 -0
  32. package/dist-types/components/OverflowGrid/index.d.ts +12 -3
  33. package/dist-types/components/OverflowGrid/wrapper.d.ts +18 -0
  34. package/dist-types/components/PriceBox/index.d.ts +11 -0
  35. package/dist-types/components/PriceBox/wrapper.d.ts +10 -0
  36. package/dist-types/layout/theme.d.ts +8 -0
  37. package/dist-types/layouts/searchItem/Accessories/AccessoryModal.d.ts +8 -0
  38. package/dist-types/layouts/searchItem/Accessories/index.d.ts +7 -0
  39. package/dist-web/index.js +605 -123
  40. package/dist-web/index.js.map +1 -1
  41. package/package.json +2 -4
  42. package/assets/ajax-loader.gif +0 -0
  43. package/assets/default.css +0 -1
  44. package/assets/fonts/slick.eot +0 -0
  45. package/assets/fonts/slick.svg +0 -14
  46. package/assets/fonts/slick.ttf +0 -0
  47. package/assets/fonts/slick.woff +0 -0
@@ -74,6 +74,14 @@ const theme = {
74
74
  Lg: '@media (min-width: 1200px)',
75
75
  LtLg: '@media (max-width: 1199px)'
76
76
  },
77
+ mask: {
78
+ gradient: {
79
+ toTop: 'linear-gradient(to top, #000, transparent)',
80
+ toBottom: 'linear-gradient(to bottom, #000, transparent)',
81
+ toLeft: 'linear-gradient(to left, #000, transparent)',
82
+ toRight: 'linear-gradient(to right, #000, transparent)'
83
+ }
84
+ },
77
85
  distances: {
78
86
  baseUnit: '8px',
79
87
  inputHeight: '48px',
@@ -782,6 +790,16 @@ const IconExclamationTriangle = ({
782
790
  }, React.createElement("path", {
783
791
  d: "M15.951 19.663c-0.457 0-0.828-0.37-0.828-0.828v-4.357c0-0.457 0.37-0.828 0.828-0.828s0.828 0.37 0.828 0.828v4.357c0 0.457-0.371 0.828-0.828 0.828zM15.952 22.906c-0.305 0-0.606-0.126-0.821-0.341s-0.338-0.514-0.338-0.818 0.122-0.606 0.338-0.821c0.431-0.43 1.209-0.43 1.639 0 0.215 0.215 0.341 0.516 0.341 0.821s-0.126 0.603-0.341 0.818c-0.215 0.215-0.513 0.341-0.818 0.341zM27.049 27.070h-22.196c-0.352 0-0.677-0.186-0.855-0.489s-0.184-0.677-0.014-0.985l11.098-20.105c0.175-0.317 0.508-0.513 0.87-0.513s0.695 0.197 0.87 0.513l11.098 20.105c0.17 0.308 0.165 0.683-0.014 0.985s-0.504 0.489-0.856 0.489zM6.536 25.083h18.83l-9.415-17.056-9.415 17.056z"
784
792
  }));
793
+ const IconImage = ({
794
+ block
795
+ }) => React.createElement(Icon$1, {
796
+ viewBox: "0 0 16 16",
797
+ block: block
798
+ }, React.createElement("path", {
799
+ d: "M14.4 1.6H1.6C.7 1.6 0 2.3 0 3.2v9.6c0 .9.7 1.6 1.6 1.6h12.8c.9 0 1.6-.7 1.6-1.6V3.2c0-.9-.7-1.6-1.6-1.6zm0 11.2H1.6V3.2h12.8v9.6zM3.2 6c0-.7.5-1.2 1.2-1.2s1.2.5 1.2 1.2-.5 1.2-1.2 1.2S3.2 6.7 3.2 6zm.2 4.5l6.2-4.4c.4-.3.9-.2 1.1.2v.1l2.4 4.2c.1.2 0 .4-.1.5-.1 0-.1.1-.2.1H3.7c-.2 0-.4-.2-.4-.4 0-.1 0-.3.1-.3z",
800
+ fillRule: "evenodd",
801
+ clipRule: "evenodd"
802
+ }));
785
803
 
786
804
  const SortSelect = ({
787
805
  value,
@@ -3366,6 +3384,76 @@ const SliderWrapper = styled__default.div`
3366
3384
  bottom: 0;
3367
3385
  left: 0;
3368
3386
  right: 0;
3387
+ user-select: none;
3388
+ touch-action: pan-y;
3389
+ -webkit-tap-highlight-color: transparent;
3390
+
3391
+ .slick-list,
3392
+ .slick-track {
3393
+ transform: translate3d(0, 0, 0);
3394
+ }
3395
+ }
3396
+
3397
+ .slick-list {
3398
+ position: relative;
3399
+ display: block;
3400
+ margin: 0;
3401
+ padding: 0;
3402
+ overflow: hidden;
3403
+
3404
+ &:focus {
3405
+ outline: none;
3406
+ }
3407
+
3408
+ &.dragging {
3409
+ cursor: pointer;
3410
+ cursor: hand;
3411
+ }
3412
+ }
3413
+
3414
+ .slick-track {
3415
+ position: relative;
3416
+ top: 0;
3417
+ left: 0;
3418
+ display: block;
3419
+ margin-left: auto;
3420
+ margin-right: auto;
3421
+
3422
+ &::before,
3423
+ &::after {
3424
+ content: '';
3425
+ display: table;
3426
+ }
3427
+
3428
+ &::after {
3429
+ clear: both;
3430
+ }
3431
+ }
3432
+
3433
+ .slick-slide {
3434
+ display: none;
3435
+ float: left;
3436
+ min-height: 1px;
3437
+ }
3438
+
3439
+ .slick-loading {
3440
+ .slick-track {
3441
+ visibility: hidden;
3442
+ }
3443
+
3444
+ img {
3445
+ display: none;
3446
+ }
3447
+ }
3448
+
3449
+ .slick-initialized {
3450
+ .slick-slide {
3451
+ display: block;
3452
+ }
3453
+ }
3454
+
3455
+ .slick-slide.dragging img {
3456
+ pointer-events: none;
3369
3457
  }
3370
3458
 
3371
3459
  ${props => props.theme.breakpoint.LtMd} {
@@ -3378,7 +3466,6 @@ const SliderWrapper = styled__default.div`
3378
3466
 
3379
3467
  .slick-slide {
3380
3468
  border-right: ${size(1)} solid ${props => props.theme.color.bg};
3381
- //transform: scale(0.95);
3382
3469
  transform-origin: 0 50%;
3383
3470
  transition: transform 150ms ease;
3384
3471
  }
@@ -3416,47 +3503,10 @@ const ImageFull = styled__default.img`
3416
3503
  object-fit: cover;
3417
3504
  `;
3418
3505
  // Arrow Nav
3419
- const Arrow = styled__default(ButtonReset)`
3506
+ const Arrow = styled__default.div`
3420
3507
  position: absolute;
3421
3508
  top: 50%;
3422
3509
  transform: translateY(-50%);
3423
- display: flex;
3424
- align-items: center;
3425
- justify-content: center;
3426
- width: ${size(4)};
3427
- height: ${size(4)};
3428
- border-radius: 50%;
3429
- font-size: 1rem;
3430
- line-height: 1;
3431
- background-color: rgba(255, 255, 255, 0.4);
3432
- backdrop-filter: blur(5px);
3433
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
3434
- color: ${props => props.theme.color.textDark};
3435
- transform-origin: 50% 50%;
3436
- transition: transform 200ms ease;
3437
-
3438
- :before {
3439
- content: '';
3440
- position: absolute;
3441
- top: 0;
3442
- bottom: 0;
3443
- left: 0;
3444
- right: 0;
3445
- border-radius: 50%;
3446
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
3447
- opacity: 0;
3448
- transition: opacity 200ms ease;
3449
- }
3450
-
3451
- :hover {
3452
- :before {
3453
- opacity: 1;
3454
- }
3455
- }
3456
-
3457
- :active {
3458
- transform: translateY(-50%) scale(0.95);
3459
- }
3460
3510
 
3461
3511
  ${props => props.theme.breakpoint.LtSm} {
3462
3512
  display: none;
@@ -3560,6 +3610,46 @@ const EnableNavigationButton = styled__default.div`
3560
3610
  z-index: 1;
3561
3611
  `;
3562
3612
 
3613
+ const NavButton = styled__default(ButtonReset)`
3614
+ position: relative;
3615
+ display: flex;
3616
+ align-items: center;
3617
+ justify-content: center;
3618
+ width: ${size(4)};
3619
+ height: ${size(4)};
3620
+ border-radius: 50%;
3621
+ background-color: ${props => props.theme.color.bg};
3622
+ color: ${props => props.theme.color.textDark};
3623
+ font-size: 0.75rem;
3624
+ box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
3625
+ transition: transform 200ms ease;
3626
+
3627
+ &::before {
3628
+ content: '';
3629
+ position: absolute;
3630
+ top: 0;
3631
+ bottom: 0;
3632
+ left: 0;
3633
+ right: 0;
3634
+ border-radius: 50%;
3635
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
3636
+ opacity: 0;
3637
+ transition: opacity 200ms ease;
3638
+ }
3639
+
3640
+ &:enabled {
3641
+ &:hover {
3642
+ &::before {
3643
+ opacity: 1;
3644
+ }
3645
+ }
3646
+ }
3647
+
3648
+ &:active {
3649
+ transform: scale(0.95);
3650
+ }
3651
+ `;
3652
+
3563
3653
  const Wrapper$h = styled__default.div`
3564
3654
  position: fixed;
3565
3655
  top: 0;
@@ -4769,17 +4859,17 @@ const Gallery = ({
4769
4859
  }))), navigationDisabled && mediaLength > 1 && React__default.createElement(EnableNavigationButton, null, React__default.createElement(ButtonSecondary, {
4770
4860
  onClick: onEnableNavigation,
4771
4861
  title: "St\u00E4ng"
4772
- }, React__default.createElement(ButtonContent, null, "St\u00E4ng")))), !navigationDisabled && mediaLength > 1 && React__default.createElement(React__default.Fragment, null, React__default.createElement(ArrowLeft, {
4862
+ }, React__default.createElement(ButtonContent, null, "St\u00E4ng")))), !navigationDisabled && mediaLength > 1 && React__default.createElement(React__default.Fragment, null, React__default.createElement(ArrowLeft, null, React__default.createElement(NavButton, {
4773
4863
  onClick: prevImage,
4774
4864
  title: "F\u00F6reg\u00E5ende bild"
4775
4865
  }, React__default.createElement(IconChevronLeft, {
4776
4866
  block: true
4777
- })), React__default.createElement(ArrowRight, {
4867
+ }))), React__default.createElement(ArrowRight, null, React__default.createElement(NavButton, {
4778
4868
  onClick: nextImage,
4779
4869
  title: "N\u00E4sta bild"
4780
4870
  }, React__default.createElement(IconChevronRight, {
4781
4871
  block: true
4782
- })))), React__default.createElement(Alt, null, React__default.createElement(QuickNav, {
4872
+ }))))), React__default.createElement(Alt, null, React__default.createElement(QuickNav, {
4783
4873
  ref: quickNavRef
4784
4874
  }, !!(media !== null && media !== void 0 && media.length) ? media.map((m, i) => {
4785
4875
  var _m$files$0$formats$fi2;
@@ -4928,6 +5018,24 @@ const SEARCH_ITEM_QUERY = client.gql`
4928
5018
  phonenumber
4929
5019
  avatar
4930
5020
  }
5021
+ accessories {
5022
+ articleNumber
5023
+ description
5024
+ excerpt
5025
+ id
5026
+ images
5027
+ logotype
5028
+ manufacturer
5029
+ model
5030
+ name
5031
+ price
5032
+ assemblyPrice
5033
+ productPage {
5034
+ title
5035
+ url
5036
+ }
5037
+ salePrice
5038
+ }
4931
5039
  manufacturer {
4932
5040
  description
4933
5041
  logotype
@@ -6784,69 +6892,231 @@ const SectionHeader = ({
6784
6892
  onClick: onClick
6785
6893
  }, React__default.createElement(ButtonContent, null, actionTitle))));
6786
6894
 
6787
- const OverflowGrid = styled__default.div`
6788
- ${props => props.theme.breakpoint.LtMd} {
6789
- ${Wrapper} & {
6790
- margin-left: ${size(-3)};
6791
- margin-right: ${size(-2)};
6792
- }
6895
+ const Wrapper$v = styled__default.div`
6896
+ --container-gutter: ${size(2)};
6897
+ --bg: ${props => props.theme.color.bg};
6898
+
6899
+ ${props => props.theme.breakpoint.Sm} {
6900
+ --container-gutter: ${size(3)};
6793
6901
  }
6794
6902
 
6903
+ position: relative;
6904
+
6905
+ ${({
6906
+ $accentBg
6907
+ }) => $accentBg && styled.css`
6908
+ --bg: ${props => props.theme.color.accent};
6909
+ `}
6910
+ `;
6911
+ const Item$b = styled__default.li`
6912
+ flex: 1 0 auto;
6913
+ width: 100%;
6914
+ max-width: 100%;
6915
+ scroll-snap-align: start;
6916
+
6795
6917
  ${props => props.theme.breakpoint.LtSm} {
6796
- ${Wrapper} & {
6797
- margin-left: ${size(-2)};
6798
- margin-right: ${size(-1)};
6918
+ &:is(:only-child, #important) {
6919
+ width: 100%;
6920
+ max-width: 100%;
6799
6921
  }
6800
6922
  }
6801
6923
  `;
6802
- const OverflowGridList = styled__default.ul`
6924
+ const List$9 = styled__default.ul`
6803
6925
  display: flex;
6804
- align-items: flex-start;
6926
+ align-items: stretch;
6805
6927
  list-style: none;
6806
- padding: 0;
6807
- margin: ${size(-1)};
6928
+ padding: 0 var(--container-gutter);
6929
+ margin: 0;
6930
+ overflow: auto;
6931
+ scroll-snap-type: x mandatory;
6932
+ scroll-padding-left: var(--container-gutter);
6933
+ scrollbar-width: none;
6934
+ -ms-overflow-style: none;
6808
6935
 
6809
- ${props => props.theme.breakpoint.LtMd} {
6810
- ${Wrapper} & {
6811
- overflow: auto;
6812
- -webkit-overflow-scrolling: touch;
6813
- padding: 0 ${size(3)};
6936
+ &::-webkit-scrollbar {
6937
+ display: none;
6938
+ }
6814
6939
 
6815
- :after {
6816
- content: '';
6817
- flex: 0 0 auto;
6818
- height: 1px;
6819
- width: ${size(2)};
6940
+ ${({
6941
+ $columns
6942
+ }) => $columns && styled.css`
6943
+ ${Item$b} {
6944
+ width: ${100 / $columns}%;
6945
+ max-width: ${100 / $columns}%;
6820
6946
  }
6821
- }
6822
- }
6947
+ `}
6823
6948
 
6824
- ${props => props.theme.breakpoint.LtSm} {
6825
- ${Wrapper} & {
6826
- padding: 0 ${size(2)};
6949
+ ${({
6950
+ $columnsSm
6951
+ }) => $columnsSm && styled.css`
6952
+ ${props => props.theme.breakpoint.Sm} {
6953
+ ${Item$b} {
6954
+ width: ${100 / $columnsSm}%;
6955
+ max-width: ${100 / $columnsSm}%;
6956
+ }
6957
+ }
6958
+ `}
6827
6959
 
6828
- :after {
6829
- width: ${size(1)};
6960
+ ${({
6961
+ $columnsMd
6962
+ }) => $columnsMd && styled.css`
6963
+ ${props => props.theme.breakpoint.Md} {
6964
+ ${Item$b} {
6965
+ width: ${100 / $columnsMd}%;
6966
+ max-width: ${100 / $columnsMd}%;
6967
+ }
6830
6968
  }
6831
- }
6832
- }
6969
+ `}
6833
6970
  `;
6834
- const OverflowGridItem = styled__default.li`
6835
- flex: 1 0 auto;
6836
- width: calc(100% - ${size(2)});
6837
- max-width: calc(100% - ${size(2)});
6838
- padding: ${size(1)};
6971
+ const ListWrapper = styled__default.div`
6972
+ position: relative;
6973
+ overflow: hidden;
6974
+ margin: 0 calc(var(--container-gutter) * -1);
6839
6975
 
6840
- ${props => props.theme.breakpoint.Sm} {
6841
- width: calc(50% - ${size(3)});
6842
- max-width: calc(50% - ${size(3)});
6976
+ ${props => props.theme.breakpoint.Md} {
6977
+ &::before,
6978
+ &::after {
6979
+ content: '';
6980
+ position: absolute;
6981
+ top: 0;
6982
+ bottom: 0;
6983
+ width: var(--container-gutter);
6984
+ background-color: var(--bg);
6985
+ z-index: 1;
6986
+ }
6987
+
6988
+ &::before {
6989
+ left: 0;
6990
+
6991
+ ${({
6992
+ $spacing
6993
+ }) => $spacing ? styled.css`
6994
+ mask-image: linear-gradient(to right, #000 ${size($spacing)}, transparent);
6995
+ ` : styled.css`
6996
+ mask-image: ${props => props.theme.mask.gradient.toRight};
6997
+ `}
6998
+ }
6999
+
7000
+ &::after {
7001
+ right: 0;
7002
+
7003
+ ${({
7004
+ $spacing
7005
+ }) => $spacing ? styled.css`
7006
+ mask-image: linear-gradient(to left, #000 ${size($spacing)}, transparent);
7007
+ ` : styled.css`
7008
+ mask-image: ${props => props.theme.mask.gradient.toLeft};
7009
+ `}
7010
+ }
6843
7011
  }
6844
7012
 
6845
- ${props => props.theme.breakpoint.Md} {
6846
- width: 33.333%;
6847
- max-width: 33.333%;
7013
+ ${({
7014
+ $spacing
7015
+ }) => $spacing && styled.css`
7016
+ ${List$9} {
7017
+ margin: 0 -${size($spacing / 2)};
7018
+ }
7019
+
7020
+ ${Item$b} {
7021
+ padding: 0 ${size($spacing / 2)};
7022
+ }
7023
+ `}
7024
+ `;
7025
+ const NavBtn = styled__default.div`
7026
+ position: absolute;
7027
+ top: 50%;
7028
+ z-index: 2;
7029
+
7030
+ ${props => props.theme.breakpoint.LtSm} {
7031
+ display: none;
6848
7032
  }
6849
7033
  `;
7034
+ const PrevBtn = styled__default(NavBtn)`
7035
+ left: 0;
7036
+ transform: translate(-50%, -50%);
7037
+ `;
7038
+ const NextBtn = styled__default(NavBtn)`
7039
+ right: 0;
7040
+ transform: translate(50%, -50%);
7041
+ `;
7042
+
7043
+ const OverflowGrid = ({
7044
+ items,
7045
+ itemKeyBase,
7046
+ spacing,
7047
+ columns,
7048
+ columnsSm,
7049
+ columnsMd,
7050
+ accentBg
7051
+ }) => {
7052
+ const overflowElement = React.useRef(null);
7053
+ const onPrev = React.useCallback(() => {
7054
+ var _overflowElement$curr, _overflowElement$curr2;
7055
+ const itemWidth = ((_overflowElement$curr = overflowElement.current) === null || _overflowElement$curr === void 0 ? void 0 : _overflowElement$curr.children[0].clientWidth) || 0;
7056
+ const scrollLeft = ((_overflowElement$curr2 = overflowElement.current) === null || _overflowElement$curr2 === void 0 ? void 0 : _overflowElement$curr2.scrollLeft) || 0;
7057
+ if (scrollLeft > 0) {
7058
+ var _overflowElement$curr3;
7059
+ (_overflowElement$curr3 = overflowElement.current) === null || _overflowElement$curr3 === void 0 ? void 0 : _overflowElement$curr3.scroll({
7060
+ left: scrollLeft - itemWidth,
7061
+ behavior: 'smooth'
7062
+ });
7063
+ }
7064
+ }, []);
7065
+ const onNext = React.useCallback(() => {
7066
+ var _overflowElement$curr4, _overflowElement$curr5, _overflowElement$curr6, _overflowElement$curr7;
7067
+ const itemWidth = ((_overflowElement$curr4 = overflowElement.current) === null || _overflowElement$curr4 === void 0 ? void 0 : _overflowElement$curr4.children[0].clientWidth) || 0;
7068
+ const scrollWidth = ((_overflowElement$curr5 = overflowElement.current) === null || _overflowElement$curr5 === void 0 ? void 0 : _overflowElement$curr5.scrollWidth) || 0;
7069
+ const scrollLeft = ((_overflowElement$curr6 = overflowElement.current) === null || _overflowElement$curr6 === void 0 ? void 0 : _overflowElement$curr6.scrollLeft) || 0;
7070
+ const overflowElementWidth = ((_overflowElement$curr7 = overflowElement.current) === null || _overflowElement$curr7 === void 0 ? void 0 : _overflowElement$curr7.offsetWidth) || 0;
7071
+ const overflowElementScrollWidth = scrollWidth - overflowElementWidth;
7072
+ if (overflowElementScrollWidth !== scrollLeft) {
7073
+ var _overflowElement$curr8;
7074
+ (_overflowElement$curr8 = overflowElement.current) === null || _overflowElement$curr8 === void 0 ? void 0 : _overflowElement$curr8.scroll({
7075
+ left: scrollLeft + itemWidth,
7076
+ behavior: 'smooth'
7077
+ });
7078
+ }
7079
+ }, []);
7080
+ // Hide navigation buttons depending on scroll position
7081
+ const [hidePrevNav, setHidePrevNav] = React.useState(true);
7082
+ const [hideNextNav, setHideNextNav] = React.useState(true);
7083
+ const onScroll = () => {
7084
+ var _overflowElement$curr9, _overflowElement$curr10, _overflowElement$curr11;
7085
+ const scrollLeft = ((_overflowElement$curr9 = overflowElement.current) === null || _overflowElement$curr9 === void 0 ? void 0 : _overflowElement$curr9.scrollLeft) || 0;
7086
+ const scrollWidth = ((_overflowElement$curr10 = overflowElement.current) === null || _overflowElement$curr10 === void 0 ? void 0 : _overflowElement$curr10.scrollWidth) || 0;
7087
+ const overflowElementWidth = ((_overflowElement$curr11 = overflowElement.current) === null || _overflowElement$curr11 === void 0 ? void 0 : _overflowElement$curr11.offsetWidth) || 0;
7088
+ const overflowElementScrollWidth = scrollWidth - overflowElementWidth;
7089
+ setHidePrevNav(scrollLeft == 0 ? true : false);
7090
+ setHideNextNav(overflowElementScrollWidth == scrollLeft ? true : false);
7091
+ };
7092
+ React.useEffect(() => {
7093
+ var _overflowElement$curr12;
7094
+ onScroll();
7095
+ (_overflowElement$curr12 = overflowElement.current) === null || _overflowElement$curr12 === void 0 ? void 0 : _overflowElement$curr12.addEventListener('scroll', onScroll);
7096
+ return () => {
7097
+ var _overflowElement$curr13;
7098
+ return (_overflowElement$curr13 = overflowElement.current) === null || _overflowElement$curr13 === void 0 ? void 0 : _overflowElement$curr13.removeEventListener('scroll', onScroll);
7099
+ };
7100
+ }, []);
7101
+ return React__default.createElement(Wrapper$v, {
7102
+ "$accentBg": accentBg
7103
+ }, React__default.createElement(ListWrapper, {
7104
+ "$spacing": spacing
7105
+ }, React__default.createElement(List$9, {
7106
+ ref: overflowElement,
7107
+ "$columns": columns,
7108
+ "$columnsSm": columnsSm,
7109
+ "$columnsMd": columnsMd
7110
+ }, items.map((item, i) => React__default.createElement(Item$b, {
7111
+ key: itemKeyBase ? `${itemKeyBase}-${i}` : `overflow-grid-item-${i}`
7112
+ }, item)))), !hidePrevNav && React__default.createElement(PrevBtn, null, React__default.createElement(NavButton, {
7113
+ onClick: onPrev,
7114
+ title: "Previous"
7115
+ }, React__default.createElement(IconChevronLeft, null))), !hideNextNav && React__default.createElement(NextBtn, null, React__default.createElement(NavButton, {
7116
+ onClick: onNext,
7117
+ title: "Next"
7118
+ }, React__default.createElement(IconChevronRight, null))));
7119
+ };
6850
7120
 
6851
7121
  const RelatedSearchContext = React.createContext({
6852
7122
  moreLikeThisUrl: false,
@@ -6920,37 +7190,43 @@ const Related = ({
6920
7190
  actionTitle: "Visa alla"
6921
7191
  }, React__default.createElement(H2, {
6922
7192
  noMargin: true
6923
- }, "Senast inkomna"))), React__default.createElement(Repeat, null, React__default.createElement(OverflowGrid, null, React__default.createElement(OverflowGridList, null, response === null || response === void 0 ? void 0 : response.documentList.documents.map(document => {
6924
- var _document$featuredIma, _document$featuredIma2, _document$featuredIma3, _document$branches, _document$branches$;
6925
- const prefix = pathRoute ? `/${pathRoute}` : '/';
6926
- const r = regexPathGuid();
6927
- const pathRouteUrl = window.location.pathname === '/' ? `${prefix}${document._id}` : r.test(`${pathRoute}${id}`) ? window.location.pathname.replace(r, document._id) : `${window.location.pathname}${prefix}${document._id}`;
6928
- return React__default.createElement(OverflowGridItem, {
6929
- key: document._id
6930
- }, React__default.createElement(ProductCard, {
6931
- id: document._id,
6932
- onClick: onItemClicked,
6933
- title: document.title,
6934
- href: pathRoute ? pathRouteUrl : hashRoute ? `#${document._id}` : undefined,
6935
- image: (_document$featuredIma = document.featuredImage) === null || _document$featuredIma === void 0 ? void 0 : (_document$featuredIma2 = _document$featuredIma.files) === null || _document$featuredIma2 === void 0 ? void 0 : (_document$featuredIma3 = _document$featuredIma2[0]) === null || _document$featuredIma3 === void 0 ? void 0 : _document$featuredIma3.url,
6936
- description: document.shortDescription,
6937
- branchName: displayBranchName ? (_document$branches = document.branches) === null || _document$branches === void 0 ? void 0 : (_document$branches$ = _document$branches[0]) === null || _document$branches$ === void 0 ? void 0 : _document$branches$.name : undefined,
6938
- uspList: [{
6939
- title: document.modelYear
6940
- }, {
6941
- title: `${numberSeparator(document.mileage)} mil`
6942
- }, {
6943
- title: document.gearboxType
6944
- }, {
6945
- title: document.fuelType
6946
- }],
6947
- price: `${numberSeparator(document.price)} kr`,
6948
- oldPrice: document.oldPrice !== undefined && document.price < document.oldPrice ? `${numberSeparator(document.oldPrice)} kr` : undefined,
6949
- leasingPrice: document.leasingPrice !== undefined ? `${numberSeparator(document.leasingPrice)} kr/mån` : undefined,
6950
- businessLeasingPrice: document.businessLeasingPrice !== undefined ? `${numberSeparator(document.businessLeasingPrice)} kr/mån` : undefined,
6951
- pathRoute: pathRoute
6952
- }));
6953
- }))))));
7193
+ }, "Senast inkomna"))), React__default.createElement(Repeat, null, React__default.createElement(OverflowGrid, {
7194
+ accentBg: true,
7195
+ columns: 1.05,
7196
+ columnsSm: 2.1,
7197
+ columnsMd: 3,
7198
+ spacing: 2,
7199
+ items: response === null || response === void 0 ? void 0 : response.documentList.documents.map(document => {
7200
+ var _document$featuredIma, _document$featuredIma2, _document$featuredIma3, _document$branches, _document$branches$;
7201
+ const prefix = pathRoute ? `/${pathRoute}` : '/';
7202
+ const r = regexPathGuid();
7203
+ const pathRouteUrl = window.location.pathname === '/' ? `${prefix}${document._id}` : r.test(`${pathRoute}${id}`) ? window.location.pathname.replace(r, document._id) : `${window.location.pathname}${prefix}${document._id}`;
7204
+ return React__default.createElement(ProductCard, {
7205
+ key: document._id,
7206
+ id: document._id,
7207
+ onClick: onItemClicked,
7208
+ title: document.title,
7209
+ href: pathRoute ? pathRouteUrl : hashRoute ? `#${document._id}` : undefined,
7210
+ image: (_document$featuredIma = document.featuredImage) === null || _document$featuredIma === void 0 ? void 0 : (_document$featuredIma2 = _document$featuredIma.files) === null || _document$featuredIma2 === void 0 ? void 0 : (_document$featuredIma3 = _document$featuredIma2[0]) === null || _document$featuredIma3 === void 0 ? void 0 : _document$featuredIma3.url,
7211
+ description: document.shortDescription,
7212
+ branchName: displayBranchName ? (_document$branches = document.branches) === null || _document$branches === void 0 ? void 0 : (_document$branches$ = _document$branches[0]) === null || _document$branches$ === void 0 ? void 0 : _document$branches$.name : undefined,
7213
+ uspList: [{
7214
+ title: document.modelYear
7215
+ }, {
7216
+ title: `${numberSeparator(document.mileage)} mil`
7217
+ }, {
7218
+ title: document.gearboxType
7219
+ }, {
7220
+ title: document.fuelType
7221
+ }],
7222
+ price: `${numberSeparator(document.price)} kr`,
7223
+ oldPrice: document.oldPrice !== undefined && document.price < document.oldPrice ? `${numberSeparator(document.oldPrice)} kr` : undefined,
7224
+ leasingPrice: document.leasingPrice !== undefined ? `${numberSeparator(document.leasingPrice)} kr/mån` : undefined,
7225
+ businessLeasingPrice: document.businessLeasingPrice !== undefined ? `${numberSeparator(document.businessLeasingPrice)} kr/mån` : undefined,
7226
+ pathRoute: pathRoute
7227
+ });
7228
+ })
7229
+ }))));
6954
7230
  };
6955
7231
 
6956
7232
  const PackageOptions = ({
@@ -7004,7 +7280,7 @@ const getBg = severity => {
7004
7280
  }
7005
7281
  return bg;
7006
7282
  };
7007
- const Wrapper$v = styled__default.div.attrs(() => ({
7283
+ const Wrapper$w = styled__default.div.attrs(() => ({
7008
7284
  className: 'wayke__theme wayke__font--bold'
7009
7285
  }))`
7010
7286
  display: inline-block;
@@ -7019,7 +7295,7 @@ const Wrapper$v = styled__default.div.attrs(() => ({
7019
7295
  const Badge = ({
7020
7296
  label,
7021
7297
  severity
7022
- }) => React__default.createElement(Wrapper$v, {
7298
+ }) => React__default.createElement(Wrapper$w, {
7023
7299
  severity: severity
7024
7300
  }, label);
7025
7301
 
@@ -7119,7 +7395,7 @@ const SettingsContext = React.createContext({});
7119
7395
 
7120
7396
  const useSettings = () => React.useContext(SettingsContext);
7121
7397
 
7122
- const Wrapper$w = styled__default.a`
7398
+ const Wrapper$x = styled__default.a`
7123
7399
  display: block;
7124
7400
  `;
7125
7401
  const Image$3 = styled__default.img`
@@ -7166,7 +7442,7 @@ const StaticMap = ({
7166
7442
  longitude
7167
7443
  } = position;
7168
7444
  if (visible && googleMapsApiKey) {
7169
- return React__default.createElement(Wrapper$w, {
7445
+ return React__default.createElement(Wrapper$x, {
7170
7446
  href: `http://maps.google.com/maps?q=${latitude},${longitude}`,
7171
7447
  title: "Visa p\u00E5 Google Maps",
7172
7448
  target: "_blank",
@@ -7238,6 +7514,24 @@ const SEARCH_ITEM_BRANCH_QUERY = client.gql`
7238
7514
  phonenumber
7239
7515
  avatar
7240
7516
  }
7517
+ accessories {
7518
+ articleNumber
7519
+ description
7520
+ excerpt
7521
+ id
7522
+ images
7523
+ logotype
7524
+ manufacturer
7525
+ model
7526
+ name
7527
+ price
7528
+ assemblyPrice
7529
+ productPage {
7530
+ title
7531
+ url
7532
+ }
7533
+ salePrice
7534
+ }
7241
7535
  branch {
7242
7536
  connections {
7243
7537
  id
@@ -7956,7 +8250,7 @@ const MetadataItem = ({
7956
8250
  })));
7957
8251
  };
7958
8252
 
7959
- const Wrapper$x = styled__default.div`
8253
+ const Wrapper$y = styled__default.div`
7960
8254
  overflow: hidden;
7961
8255
  margin-top: ${size(-1)};
7962
8256
  margin-left: ${size(-1)};
@@ -7967,7 +8261,7 @@ const Wrapper$x = styled__default.div`
7967
8261
  margin-right: ${size(-2)};
7968
8262
  }
7969
8263
  `;
7970
- const List$9 = styled__default.ul`
8264
+ const List$a = styled__default.ul`
7971
8265
  list-style: none;
7972
8266
  padding: 0;
7973
8267
  margin: 0;
@@ -7981,7 +8275,7 @@ const List$9 = styled__default.ul`
7981
8275
  padding-right: ${size(1)};
7982
8276
  }
7983
8277
  `;
7984
- const Item$b = styled__default.li`
8278
+ const Item$c = styled__default.li`
7985
8279
  display: inline-block;
7986
8280
  vertical-align: bottom;
7987
8281
  font-size: 1rem;
@@ -8025,7 +8319,7 @@ const Tabs = ({
8025
8319
  tabs,
8026
8320
  active,
8027
8321
  onClick
8028
- }) => React.createElement(Wrapper$x, null, React.createElement(List$9, null, tabs.map(tab => React.createElement(Item$b, {
8322
+ }) => React.createElement(Wrapper$y, null, React.createElement(List$a, null, tabs.map(tab => React.createElement(Item$c, {
8029
8323
  key: tab.name
8030
8324
  }, React.createElement(Action$8, {
8031
8325
  title: tab.displayName,
@@ -8119,7 +8413,7 @@ const PdfListItem = styled__default.li.attrs(() => ({
8119
8413
  flex: 0 0 100%;
8120
8414
  }
8121
8415
  `;
8122
- const List$a = styled__default.ul`
8416
+ const List$b = styled__default.ul`
8123
8417
  list-style: none;
8124
8418
  padding: 0;
8125
8419
  display: flex;
@@ -8147,7 +8441,7 @@ const PdfSubtitle = styled__default.div`
8147
8441
  color: ${props => props.theme.color.textDarkLighten};
8148
8442
  `;
8149
8443
  const PdfColumn = styled__default.div`
8150
- flex 0 0 auto;
8444
+ flex: 0 0 auto;
8151
8445
  &:first-child {
8152
8446
  flex: 1 1 auto;
8153
8447
  }
@@ -8184,7 +8478,7 @@ const PdfDownloadItem = ({
8184
8478
  };
8185
8479
  const DocumentList = ({
8186
8480
  documents
8187
- }) => React__default.createElement(List$a, null, documents.map((document, i) => React__default.createElement(PdfDownloadItem, {
8481
+ }) => React__default.createElement(List$b, null, documents.map((document, i) => React__default.createElement(PdfDownloadItem, {
8188
8482
  key: `${document.url}-${i}`,
8189
8483
  document: document
8190
8484
  })));
@@ -8228,6 +8522,273 @@ const Documents = ({
8228
8522
  }))));
8229
8523
  };
8230
8524
 
8525
+ const Wrapper$z = styled__default.div`
8526
+ display: flex;
8527
+ flex-direction: column;
8528
+ gap: ${size(2)};
8529
+ height: 100%;
8530
+ `;
8531
+ const imageBaseStyling = styled.css`
8532
+ flex-shrink: 0;
8533
+ aspect-ratio: 16 / 9;
8534
+ border-radius: 3px;
8535
+ `;
8536
+ const Image$4 = styled__default.img`
8537
+ ${imageBaseStyling};
8538
+ display: block;
8539
+ width: 100%;
8540
+ object-fit: cover;
8541
+ `;
8542
+ const ImageaPlaceholder = styled__default.div`
8543
+ ${imageBaseStyling};
8544
+ display: flex;
8545
+ align-items: center;
8546
+ justify-content: center;
8547
+ color: ${props => props.theme.color.textDarkLighten};
8548
+ font-size: 2rem;
8549
+ background-color: ${props => props.theme.color.accent};
8550
+ `;
8551
+ const Body$5 = styled__default.div`
8552
+ flex: 1 1 auto;
8553
+ display: flex;
8554
+ align-items: flex-start;
8555
+ flex-direction: column;
8556
+ gap: ${size(1)};
8557
+ `;
8558
+ const Heading$7 = styled__default.div`
8559
+ display: flex;
8560
+ align-items: center;
8561
+ justify-content: space-between;
8562
+ gap: ${size(2)};
8563
+ `;
8564
+ const Title$2 = styled__default.div.attrs(() => ({
8565
+ className: 'wayke__theme wayke__font--bold'
8566
+ }))`
8567
+ font-size: 1.125rem;
8568
+ `;
8569
+ const Branding = styled__default.img`
8570
+ display: block;
8571
+ `;
8572
+ const Price$2 = styled__default.div.attrs(() => ({
8573
+ className: 'wayke__theme wayke__font--bold'
8574
+ }))``;
8575
+ const Preamble = styled__default.div`
8576
+ --preamble-max-height: ${size(6)};
8577
+ --preamble-gradient-height: calc(var(--preamble-max-height) / 2);
8578
+
8579
+ position: relative;
8580
+ max-height: var(--preamble-max-height);
8581
+ overflow: hidden;
8582
+ display: -webkit-box;
8583
+ -webkit-box-orient: vertical;
8584
+ -webkit-line-clamp: 2;
8585
+ white-space: pre-wrap;
8586
+
8587
+ &::before {
8588
+ content: '';
8589
+ position: absolute;
8590
+ top: var(--preamble-max-height);
8591
+ left: 0;
8592
+ width: 100%;
8593
+ height: var(--preamble-gradient-height);
8594
+ transform: translateY(-100%); // Only visible if Preamble reaches max height
8595
+ color: ${props => props.theme.color.bg};
8596
+ mask-image: ${props => props.theme.mask.gradient.toTop};
8597
+ pointer-events: none;
8598
+ }
8599
+ `;
8600
+ const ReadMoreBtn = styled__default(ButtonReset).attrs(() => ({
8601
+ className: 'wayke__theme wayke__font--bold wayke__color--primary-text'
8602
+ }))`
8603
+ margin-top: auto;
8604
+ display: block;
8605
+ color: ${props => props.theme.color.link};
8606
+ font-size: 0.875rem;
8607
+
8608
+ &:hover {
8609
+ text-decoration: underline;
8610
+ }
8611
+ `;
8612
+
8613
+ const AccessoryCard = ({
8614
+ title,
8615
+ image,
8616
+ branding,
8617
+ price,
8618
+ preamble,
8619
+ readMoreCta
8620
+ }) => React__default.createElement(Wrapper$z, null, image ? React__default.createElement(Image$4, {
8621
+ src: image.src,
8622
+ srcSet: image.srcSet,
8623
+ alt: image.alt
8624
+ }) : React__default.createElement(ImageaPlaceholder, null, React__default.createElement(IconImage, null)), React__default.createElement(Body$5, null, React__default.createElement(Heading$7, null, React__default.createElement(Title$2, null, title), branding && React__default.createElement(Branding, {
8625
+ src: branding.src,
8626
+ srcSet: branding.srcSet,
8627
+ alt: branding.alt
8628
+ })), price && React__default.createElement(Price$2, null, price), preamble && React__default.createElement(Preamble, null, preamble), readMoreCta && React__default.createElement(ReadMoreBtn, {
8629
+ onClick: readMoreCta
8630
+ }, "L\u00E4s mer")));
8631
+
8632
+ const Image$5 = styled__default.img`
8633
+ display: block;
8634
+ width: 100%;
8635
+ `;
8636
+
8637
+ const Link$1 = styled__default.a.attrs(() => ({
8638
+ className: 'wayke__theme wayke__color--primary-text'
8639
+ }))`
8640
+ text-decoration: none;
8641
+ cursor: pointer;
8642
+ text-decoration: underline;
8643
+
8644
+ :not(:hover) {
8645
+ color: ${props => props.theme.color.textDark};
8646
+ }
8647
+
8648
+ &:hover {
8649
+ text-decoration: underline;
8650
+ }
8651
+
8652
+ ${({
8653
+ $hoverGhost
8654
+ }) => $hoverGhost && styled.css`
8655
+ &:before {
8656
+ content: '';
8657
+ position: absolute;
8658
+ top: 0;
8659
+ left: 0;
8660
+ width: 100%;
8661
+ height: 100%;
8662
+ }
8663
+ `}
8664
+ `;
8665
+
8666
+ const Wrapper$A = styled__default.ul`
8667
+ --price-box-gutter: ${size(2)};
8668
+
8669
+ list-style: none;
8670
+ padding: var(--price-box-gutter);
8671
+ margin: 0;
8672
+ border: 1px solid ${props => props.theme.color.border};
8673
+ `;
8674
+ const Row = styled__default.li`
8675
+ display: flex;
8676
+ align-items: center;
8677
+ justify-content: space-between;
8678
+ gap: var(--price-box-gutter);
8679
+
8680
+ & + & {
8681
+ margin-top: calc(var(--price-box-gutter) / 4);
8682
+ }
8683
+
8684
+ ${({
8685
+ $oldPrice
8686
+ }) => $oldPrice && styled.css`
8687
+ --price-text-decoration: line-through;
8688
+
8689
+ color: ${props => props.theme.color.textDarkLighten};
8690
+ font-size: 0.875rem;
8691
+ `}
8692
+ `;
8693
+ const Label$a = styled__default.div``;
8694
+ const Price$3 = styled__default.div.attrs(() => ({
8695
+ className: 'wayke__theme wayke__font--bold'
8696
+ }))`
8697
+ text-decoration: var(--price-text-decoration);
8698
+ `;
8699
+
8700
+ const PriceBox = ({
8701
+ prices
8702
+ }) => React__default.createElement(Wrapper$A, null, prices === null || prices === void 0 ? void 0 : prices.map((item, i) => React__default.createElement(Row, {
8703
+ key: `${item.label}-${i}`,
8704
+ "$oldPrice": item.oldPrice
8705
+ }, React__default.createElement(Label$a, null, item.label), React__default.createElement(Price$3, null, item.price))));
8706
+
8707
+ const AccesoryModal = ({
8708
+ accessory,
8709
+ onClose
8710
+ }) => {
8711
+ var _accessory$images;
8712
+ const priceList = [{
8713
+ label: 'Kontantpris',
8714
+ price: `${numberSeparator(accessory.price)} kr`,
8715
+ oldPrice: false
8716
+ }];
8717
+ if (accessory.salePrice) {
8718
+ priceList.push({
8719
+ label: 'Tidigare pris',
8720
+ price: `${numberSeparator(accessory.salePrice)} kr`,
8721
+ oldPrice: true
8722
+ });
8723
+ }
8724
+ if (accessory.assemblyPrice) {
8725
+ priceList.push({
8726
+ label: 'Monteringskostnad',
8727
+ price: `${numberSeparator(accessory.assemblyPrice)} kr`,
8728
+ oldPrice: false
8729
+ });
8730
+ }
8731
+ return React__default.createElement(Modal, {
8732
+ title: accessory.name,
8733
+ onClose: onClose
8734
+ }, ((_accessory$images = accessory.images) === null || _accessory$images === void 0 ? void 0 : _accessory$images[0]) && React__default.createElement(Repeat, null, React__default.createElement(Image$5, {
8735
+ src: `${accessory.images[0]}?w=632`,
8736
+ alt: `${accessory.name}`
8737
+ })), accessory.logotype && React__default.createElement(Repeat, null, React__default.createElement(LogoBox, {
8738
+ logo: `${accessory.logotype}?w=160`,
8739
+ logo2x: `${accessory.logotype}?w=320`,
8740
+ alt: accessory.manufacturer || 'Logotyp',
8741
+ wide: true
8742
+ })), React__default.createElement(Repeat, null, React__default.createElement(PriceBox, {
8743
+ prices: priceList
8744
+ })), React__default.createElement(Repeat, null, React__default.createElement(Content$2, {
8745
+ dangerouslySetInnerHTML: {
8746
+ __html: marked.marked(accessory.description)
8747
+ }
8748
+ })), accessory.articleNumber && React__default.createElement(Repeat, null, React__default.createElement(UtilityTextBold, {
8749
+ as: "div"
8750
+ }, "Art. nr."), React__default.createElement("div", null, accessory.articleNumber)), accessory.productPage && accessory.productPage.url && React__default.createElement(Repeat, null, React__default.createElement(Link$1, {
8751
+ href: accessory.productPage.url,
8752
+ title: `Mer information om ${accessory.name}`,
8753
+ target: "_blank",
8754
+ rel: "noopener noreferrer nofollow"
8755
+ }, accessory.productPage.title || 'Läs mer', " (\u00F6ppnas i ny flik)")));
8756
+ };
8757
+
8758
+ const AccessoriesSection = ({
8759
+ accessories
8760
+ }) => {
8761
+ const [modal, setModal] = React.useState();
8762
+ const onOpenModal = accessory => setModal(accessory);
8763
+ const onCloseModal = () => setModal(undefined);
8764
+ if (!(accessories !== null && accessories !== void 0 && accessories.length)) return null;
8765
+ return React__default.createElement(React__default.Fragment, null, modal && React__default.createElement(AccesoryModal, {
8766
+ accessory: modal,
8767
+ onClose: onCloseModal
8768
+ }), React__default.createElement(ProductPageMainSection, null, React__default.createElement(Repeat, null, React__default.createElement(H2, {
8769
+ noMargin: true
8770
+ }, "Tillbeh\u00F6r")), React__default.createElement(Repeat, null, React__default.createElement(Content$2, null, React__default.createElement("p", null, "Tillbeh\u00F6r som passar till detta fordon."))), React__default.createElement(Repeat, null, React__default.createElement(OverflowGrid, {
8771
+ columns: 1.05,
8772
+ columnsSm: 2.1,
8773
+ columnsMd: 2,
8774
+ spacing: 2,
8775
+ items: accessories.map(accessory => {
8776
+ var _accessory$images, _accessory$images2;
8777
+ return React__default.createElement(AccessoryCard, {
8778
+ key: accessory.id,
8779
+ title: accessory.name,
8780
+ image: (_accessory$images = accessory.images) !== null && _accessory$images !== void 0 && _accessory$images[0] ? {
8781
+ src: `${(_accessory$images2 = accessory.images) === null || _accessory$images2 === void 0 ? void 0 : _accessory$images2[0]}?w=539&h=303`,
8782
+ alt: accessory.name
8783
+ } : undefined,
8784
+ price: `${numberSeparator(accessory.price)} kr`,
8785
+ preamble: accessory.excerpt,
8786
+ readMoreCta: () => onOpenModal(accessory)
8787
+ });
8788
+ })
8789
+ }))));
8790
+ };
8791
+
8231
8792
  const WaykeSearchItem = ({
8232
8793
  id,
8233
8794
  hashRoute,
@@ -8313,6 +8874,7 @@ const WaykeSearchItem = ({
8313
8874
  const branch = centralStorageVehicle === null || centralStorageVehicle === void 0 ? void 0 : centralStorageVehicle.branch;
8314
8875
  const {
8315
8876
  title,
8877
+ accessories,
8316
8878
  shortDescription,
8317
8879
  media,
8318
8880
  description,
@@ -8437,7 +8999,9 @@ const WaykeSearchItem = ({
8437
8999
  var _ecomContext$current2;
8438
9000
  return (_ecomContext$current2 = ecomContext.current) === null || _ecomContext$current2 === void 0 ? void 0 : _ecomContext$current2.start();
8439
9001
  }
8440
- }, "K\u00F6p bilen online"))), React__default.createElement(PackageOptions, {
9002
+ }, "K\u00F6p bilen online"))), React__default.createElement(AccessoriesSection, {
9003
+ accessories: accessories
9004
+ }), React__default.createElement(PackageOptions, {
8441
9005
  packageOptions: packageOptions
8442
9006
  }), React__default.createElement(ManufacturerPackageOption, {
8443
9007
  packageOption: manufacturer === null || manufacturer === void 0 ? void 0 : manufacturer.packageOption