@lanaco/lnc-react-ui 4.0.170 → 4.0.171

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 (173) hide show
  1. package/dist/Accordion.js +1 -1
  2. package/dist/AccordionSummary.js +1 -1
  3. package/dist/ActionsToolbar.js +1 -1
  4. package/dist/Alert.js +1 -1
  5. package/dist/Avatar.js +1 -1
  6. package/dist/Badge.js +1 -1
  7. package/dist/BannerSectionCarousel.cjs +9 -48
  8. package/dist/BannerSectionCarousel.js +208 -249
  9. package/dist/BannerSectionSimple.js +1 -1
  10. package/dist/BannerSectionWithList.js +1 -1
  11. package/dist/BlogCardsSponsoredSection.cjs +8 -8
  12. package/dist/BlogCardsSponsoredSection.js +67 -68
  13. package/dist/BlogCategoryCardsSection.cjs +1 -1
  14. package/dist/BlogCategoryCardsSection.js +22 -30
  15. package/dist/BlogExploreSection.js +9 -9
  16. package/dist/BlogListSection.cjs +11 -5
  17. package/dist/BlogListSection.js +187 -123
  18. package/dist/BlogProductCardsSection.cjs +1 -1
  19. package/dist/BlogProductCardsSection.js +28 -37
  20. package/dist/BlogShopCardsSection.cjs +1 -1
  21. package/dist/BlogShopCardsSection.js +40 -67
  22. package/dist/BlogSingleSection.cjs +16 -1
  23. package/dist/BlogSingleSection.js +47 -45
  24. package/dist/BlogsSectionDetailed.cjs +8 -27
  25. package/dist/BlogsSectionDetailed.js +111 -159
  26. package/dist/BlogsSectionLarge.cjs +19 -4
  27. package/dist/BlogsSectionLarge.js +73 -37
  28. package/dist/BlogsSectionSimple.cjs +9 -9
  29. package/dist/BlogsSectionSimple.js +81 -107
  30. package/dist/BlogsSectionSimpleCentered.cjs +25 -23
  31. package/dist/BlogsSectionSimpleCentered.js +103 -96
  32. package/dist/BlogsSectionWithFilters.cjs +31 -29
  33. package/dist/BlogsSectionWithFilters.js +173 -134
  34. package/dist/BrandHitsSection.cjs +10 -14
  35. package/dist/BrandHitsSection.js +93 -45
  36. package/dist/Breadcrumbs.js +1 -1
  37. package/dist/Button.js +1 -1
  38. package/dist/ButtonGroup.js +1 -1
  39. package/dist/CalorieCalculatorSection.js +1 -1
  40. package/dist/CategorySimpleCard-Qe5QStrs.cjs +47 -0
  41. package/dist/CategorySimpleCard-laAY-RUT.js +70 -0
  42. package/dist/CheckBoxInput.js +1 -1
  43. package/dist/Chip.js +1 -1
  44. package/dist/ColorInput.js +1 -1
  45. package/dist/ConfirmationForm.js +1 -1
  46. package/dist/CustomLoanMapSection.js +1 -1
  47. package/dist/{CustomStyles-SyQRnjuy.js → CustomStyles-ArAVZsIj.js} +1 -1
  48. package/dist/DateInput.js +1 -1
  49. package/dist/DecimalInput.js +1 -1
  50. package/dist/DecimalInputV2.js +1 -1
  51. package/dist/DetailedProductsInfinitiveSection.cjs +3 -3
  52. package/dist/DetailedProductsInfinitiveSection.js +35 -36
  53. package/dist/DetailedProductsSection.cjs +4 -4
  54. package/dist/DetailedProductsSection.js +62 -63
  55. package/dist/DetailsView.js +1 -1
  56. package/dist/DoubleRangeSlider.js +1 -1
  57. package/dist/DragAndDropFile.js +1 -1
  58. package/dist/DragDropFiles.js +1 -1
  59. package/dist/Drawer.js +1 -1
  60. package/dist/Dropdown.js +2 -2
  61. package/dist/DropdownItem.js +1 -1
  62. package/dist/DropdownLookup.js +1 -1
  63. package/dist/DropdownMenu.js +1 -1
  64. package/dist/EditableTable.js +1 -1
  65. package/dist/FeedbackSection.js +1 -1
  66. package/dist/FieldOfInterestsMasonrySection.cjs +20 -25
  67. package/dist/FieldOfInterestsMasonrySection.js +228 -154
  68. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +33 -24
  69. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +178 -113
  70. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +6 -16
  71. package/dist/FieldOfInterestsWithTagsCardsSection.js +89 -93
  72. package/dist/FileInput.js +1 -1
  73. package/dist/FlexGridItem.js +1 -1
  74. package/dist/FormField.js +1 -1
  75. package/dist/FormView.js +1 -1
  76. package/dist/GeneralWithTagsCardsSection.cjs +11 -27
  77. package/dist/GeneralWithTagsCardsSection.js +87 -99
  78. package/dist/GiftCardsSection.cjs +18 -23
  79. package/dist/GiftCardsSection.js +146 -77
  80. package/dist/Icon.js +1 -1
  81. package/dist/IconButton.js +1 -1
  82. package/dist/Kanban.js +1 -1
  83. package/dist/KanbanActionsToolbar.js +1 -1
  84. package/dist/KanbanView.js +1 -1
  85. package/dist/Link.js +1 -1
  86. package/dist/LoanCalculatorSection.js +1 -1
  87. package/dist/LocationFinderSection.js +1 -1
  88. package/dist/LocationSearchSection.js +1 -1
  89. package/dist/MasonryGeneralCardsSection.cjs +33 -19
  90. package/dist/MasonryGeneralCardsSection.js +114 -68
  91. package/dist/MenuItem.js +1 -1
  92. package/dist/Modal.js +1 -1
  93. package/dist/MultiSelectDropdown.js +1 -1
  94. package/dist/MultiSelectDropdownLookup.js +1 -1
  95. package/dist/NestedDropdownItem.js +1 -1
  96. package/dist/NestedMenuItem.js +1 -1
  97. package/dist/NotificationContainer.js +1 -1
  98. package/dist/NotificationMessage.js +1 -1
  99. package/dist/NumberInput.js +1 -1
  100. package/dist/OverlayGeneralCardsSection.cjs +5 -5
  101. package/dist/OverlayGeneralCardsSection.js +54 -40
  102. package/dist/PasswordInput.js +1 -1
  103. package/dist/PopoverContent.js +1 -1
  104. package/dist/ProductsWithBannerSection.cjs +15 -20
  105. package/dist/ProductsWithBannerSection.js +176 -104
  106. package/dist/ProgressBar.js +1 -1
  107. package/dist/QuattroCardsSection.cjs +6 -6
  108. package/dist/QuattroCardsSection.js +42 -34
  109. package/dist/QuizSection.js +1 -1
  110. package/dist/RadioInput.js +1 -1
  111. package/dist/RangeSlider.js +1 -1
  112. package/dist/ReviewsSection.cjs +24 -30
  113. package/dist/ReviewsSection.js +170 -137
  114. package/dist/SalesCampaignsSection.cjs +46 -130
  115. package/dist/SalesCampaignsSection.js +354 -433
  116. package/dist/Separator.js +1 -1
  117. package/dist/ShopCardsSection.cjs +18 -5
  118. package/dist/ShopCardsSection.js +145 -88
  119. package/dist/Sidebar.js +1 -1
  120. package/dist/SimpleCategoriesSection.cjs +10 -4
  121. package/dist/SimpleCategoriesSection.js +79 -51
  122. package/dist/SimpleProductsSection.cjs +16 -3
  123. package/dist/SimpleProductsSection.js +172 -70
  124. package/dist/Spinner.js +1 -1
  125. package/dist/StatsSection.js +4 -4
  126. package/dist/Surface.js +1 -1
  127. package/dist/SwipeableDrawer.js +1 -1
  128. package/dist/TabItem.js +1 -1
  129. package/dist/Table.js +1 -1
  130. package/dist/TableView.js +1 -1
  131. package/dist/TextAreaInput.js +1 -1
  132. package/dist/TextInput.js +1 -1
  133. package/dist/ThemeProvider.js +1 -1
  134. package/dist/TimeInput.js +1 -1
  135. package/dist/Toggle.js +1 -1
  136. package/dist/TreeMenuSeparator.js +1 -1
  137. package/dist/UploadedFile.js +1 -1
  138. package/dist/UrgentSaleProductsSection.cjs +2 -2
  139. package/dist/UrgentSaleProductsSection.js +62 -61
  140. package/dist/index-BAJkosVg.cjs +11 -0
  141. package/dist/{index-dXWRbvgi.js → index-BMOLVn8O.js} +1 -1
  142. package/dist/{skeleton-5mO22c5S.js → index-BPntOicE.js} +55 -107
  143. package/dist/index-BSpdEGFd.js +42 -0
  144. package/dist/{index-CF3HhgvN.js → index-BbltNcou.js} +1 -1
  145. package/dist/index-BhBRZf4M.js +742 -0
  146. package/dist/index-BovNbKxB.js +54 -0
  147. package/dist/{skeleton-Ccd6EDeB.cjs → index-C5r__0lD.cjs} +4 -47
  148. package/dist/{index-DicTpiG0.cjs → index-CfT9e5O9.cjs} +2 -10
  149. package/dist/index-D-3I_Ppj.cjs +16 -0
  150. package/dist/index-D0IYt1s3.cjs +20 -0
  151. package/dist/{skeleton-CQPwIEP0.js → index-D69SKc-n.cjs} +7 -37
  152. package/dist/{index-C0SKNFzP.js → index-D8KPbcUf.js} +1 -1
  153. package/dist/index-DFdPWO4O.js +133 -0
  154. package/dist/index-DFyV_EK2.cjs +305 -0
  155. package/dist/index-DxwIu0Wn.js +84 -0
  156. package/dist/{index-y6sKgrZC.js → index-XYs5Cuh5.js} +21 -30
  157. package/dist/index.js +1 -1
  158. package/dist/style-BAcV7F53.cjs +64 -0
  159. package/dist/style-CXMUA6cI.js +74 -0
  160. package/dist/{style-DKAOBWn3.js → style-D3pIrH3v.js} +1 -1
  161. package/dist/{utils-BdsZgOUE.js → utils-DHfRApMf.js} +6 -6
  162. package/package.json +1 -1
  163. package/dist/index-1Dm1i6WK.js +0 -52
  164. package/dist/index-BGTtoLxz.cjs +0 -1
  165. package/dist/skeleton-BdbB-LdT.cjs +0 -97
  166. package/dist/suspense-categories-card-simple-BGj475Ca.js +0 -101
  167. package/dist/suspense-categories-card-simple-CjGtzfzp.cjs +0 -55
  168. package/dist/suspense-large-BMO7JH52.js +0 -26
  169. package/dist/suspense-large-CFmcSzX-.cjs +0 -1
  170. package/dist/suspense-product-card-detailed-BU6DPCvJ.js +0 -652
  171. package/dist/suspense-product-card-detailed-BbvQuPOP.cjs +0 -329
  172. package/dist/suspense-product-card-simple-DJ8UYolb.cjs +0 -1
  173. package/dist/suspense-product-card-simple-ziy0XcLp.js +0 -26
@@ -2,7 +2,7 @@ import { jsxs as N, jsx as t, Fragment as W } from "react/jsx-runtime";
2
2
  import { s as x } from "./emotion-styled.browser.esm-BNN1dTl3.js";
3
3
  import { P as n } from "./index-CblbdqjE.js";
4
4
  import { forwardRef as X, useRef as q, useState as v, useCallback as A, useEffect as M } from "react";
5
- import { a as D, b as o, c as G, d as H } from "./utils-BdsZgOUE.js";
5
+ import { a as D, b as o, c as G, d as H } from "./utils-DHfRApMf.js";
6
6
  import { u as J } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
7
7
  import { u as K } from "./useUpdateEffect-CuYWz7EA.js";
8
8
  const Q = ({ theme: e, size: i }) => {
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),d=require("react"),c=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./consts-goSZX3xP.cjs"),$=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./utils-Dl9xPH4c.cjs"),N=require("./ThemeProvider.cjs"),a=require("./index-BpbMKBf_.cjs"),P=require("./index-BueKsXT8.cjs"),C=c.styled.div`
1
+ "use strict";const e=require("react/jsx-runtime"),m=require("react"),l=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),u=require("./utils-Dl9xPH4c.cjs"),k=require("./ThemeProvider.cjs"),s=require("./index-BpbMKBf_.cjs"),R=require("./index-BueKsXT8.cjs"),i=require("./style-BAcV7F53.cjs"),P=l.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  color: var(--darkest-950);
@@ -8,18 +8,18 @@
8
8
  font-weight: 600;
9
9
  font-size: 1.5rem;
10
10
  }
11
- `,R=c.styled.div`
11
+ `,$=l.styled.div`
12
12
  display: grid;
13
13
  grid-template-columns: ${t=>`repeat(${t.limit}, minmax(0, 1fr))`};
14
14
  gap: 1.25rem;
15
15
 
16
- @media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
16
+ @media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
17
17
  grid-template-columns: repeat(1, 1fr);
18
18
  }
19
- `,y=c.styled.div`
19
+ `,C=l.styled.div`
20
20
  padding-top: 5rem;
21
21
  overflow: hidden;
22
- `,v=c.styled.div`
22
+ `,L=l.styled.div`
23
23
  position: relative;
24
24
  cursor: pointer;
25
25
  display: flex;
@@ -51,11 +51,11 @@
51
51
  font-size: 1.375rem;
52
52
  font-weight: 600;
53
53
  color: var(--gray-950, #14161a);
54
- ${g.truncateText()}
54
+ ${u.truncateText()}
55
55
  }
56
56
 
57
57
  & .cont-text {
58
- ${g.truncateTextInRows(2)}
58
+ ${u.truncateTextInRows(2)}
59
59
  }
60
60
  }
61
61
 
@@ -75,25 +75,7 @@
75
75
  box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1),
76
76
  0px 4px 6px -2px rgba(0, 0, 0, 0.05);
77
77
  }
78
-
79
- & .skeleton-img {
80
- position: absolute;
81
- top: -3.125rem;
82
- left: 1.25rem;
83
- min-width: 6.25rem;
84
- max-width: 6.25rem;
85
- min-height: 6.25rem;
86
- max-height: 6.25rem;
87
- border-radius: 0.75rem;
88
- border: 1px solid var(--gray-95008);
89
-
90
- /* drop-shadow-lg */
91
- box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1),
92
- 0px 4px 6px -2px rgba(0, 0, 0, 0.05);
93
-
94
- ${g.linearGradientAnimation("-90deg")}
95
- }
96
- `,x=(t,o)=>g.getComponentPropValue(t.theme,"StarRating",t.color,t.disabled===!0?"disabled":"enabled",o),k=c.styled.div`
78
+ `,x=(t,n)=>u.getComponentPropValue(t.theme,"StarRating",t.color,t.disabled===!0?"disabled":"enabled",n),N=l.styled.div`
97
79
  font-size: ${t=>x(t,"fontSize")};
98
80
  line-height: ${t=>x(t,"lineHeight")};
99
81
  line-height: 1.5rem;
@@ -114,7 +96,7 @@
114
96
  line-height: 1.5rem;
115
97
  color: ${t=>t.color};
116
98
  }
117
- `,T=c.styled.span`
99
+ `,q=l.styled.span`
118
100
  position: absolute;
119
101
  z-index: 1;
120
102
  display: block;
@@ -123,10 +105,22 @@
123
105
  overflow: hidden;
124
106
  width: ${t=>t.width}%;
125
107
 
126
- color: ${t=>g.getColorRgbaValue(t.theme,"StarRating",t.color,t.disabled===!0?"disabled":"enabled","filledColor")};
127
- `,z=c.styled.span`
108
+ color: ${t=>u.getColorRgbaValue(t.theme,"StarRating",t.color,t.disabled===!0?"disabled":"enabled","filledColor")};
109
+ `,T=l.styled.span`
128
110
  padding: 0;
129
111
  display: block;
130
112
  z-index: 0;
131
113
  color: ${t=>t.color};
132
- `,w=d.forwardRef((t,o)=>{const{rating:s=0,reviewCount:i=null,disabled:n=!1,tabIndex:l=0,className:m="",style:h={},color:u="primary",size:e="large"}=t,{theme:p}=N.useTheme(),f={theme:p,color:u,size:e,style:h,disabled:n},j=s/5*100;return r.jsxs(k,{ref:o,tabIndex:l,...f,className:`star-rating ${m}`,children:[r.jsxs("div",{className:"rating",children:[r.jsx(T,{className:"filled-stars",...f,width:j,children:"★★★★★"}),r.jsx(z,{...f,children:"★★★★★"})]}),!isNaN(i)&&Number.isFinite(i)&&r.jsx("div",{className:"review-count",children:`(${i.toLocaleString()})`})]})});w.propTypes={rating:a.PropTypes.number,reviewCount:a.PropTypes.any,disabled:a.PropTypes.bool,tabIndex:a.PropTypes.number,style:a.PropTypes.object,className:a.PropTypes.string,color:a.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:a.PropTypes.oneOf(["small","medium","large"])};const q=d.forwardRef((t,o)=>{const{image:s,text:i,title:n,onSelectCard:l=()=>{},rating:m}=t;return r.jsx(y,{ref:o,className:"review-card",onClick:l,children:r.jsxs(v,{children:[r.jsx(P.ProductImageWrapper,{src:s}),r.jsxs("div",{className:"cont",children:[r.jsx("span",{className:"cont-title",children:n}),r.jsx("div",{className:"cont-text",children:i})]}),r.jsx(w,{color:"warning",rating:m})]})})}),M=d.forwardRef(({},t)=>r.jsx(y,{className:"review-card",children:r.jsxs(v,{children:[r.jsx("div",{className:"skeleton-img"}),r.jsx("div",{className:"cont"}),r.jsx(w,{color:"warning",rating:0})]})})),I=({limit:t=3,isLoading:o=!1,keyPrefix:s})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,n)=>r.jsx(M,{isLoading:o},`${s}-skeleton-review-card-${n}`))}),E=({children:t,fallbackComponent:o=r.jsx(r.Fragment,{}),isLoading:s=!1,limit:i,keyPrefix:n})=>r.jsx(d.Suspense,{fallbackComponent:o,children:s===!0?r.jsx(I,{isLoading:s,limit:i,keyPrefix:n}):t}),b=d.memo(q),F=d.forwardRef((t,o)=>{const{title:s="Electronics reviews",items:i,limit:n=3,onSelectCard:l=()=>{},isLoading:m=!1}=t,h=$.useDetectMobile(),u=d.useMemo(()=>r.jsx(r.Fragment,{children:h===!0?i==null?void 0:i.map((e,p)=>r.jsx(b,{text:e==null?void 0:e.text,title:e==null?void 0:e.title,image:e==null?void 0:e.image,link:e==null?void 0:e.link,rating:e==null?void 0:e.ratingArithmeticMean,onSelectCard:()=>l(e)},p)):i==null?void 0:i.slice(0,n).map((e,p)=>r.jsx(b,{text:e==null?void 0:e.text,title:e==null?void 0:e.title,image:e==null?void 0:e.image,link:e==null?void 0:e.link,rating:e==null?void 0:e.ratingArithmeticMean,onSelectCard:()=>l(e)},p))}),[i,h,l,n]);return r.jsxs(C,{ref:o,children:[r.jsx("div",{className:"container-title",children:s}),r.jsx(R,{limit:n,children:r.jsx(E,{isLoading:m,limit:n,keyPrefix:"explore-landing",children:u})})]})});module.exports=F;
114
+ `,S=m.forwardRef((t,n)=>{const{rating:a=0,reviewCount:o=null,disabled:d=!1,tabIndex:c=0,className:h="",style:g={},color:b="primary",size:r="large"}=t,{theme:p}=k.useTheme(),w={theme:p,color:b,size:r,style:g,disabled:d},y=a/5*100;return e.jsxs(N,{ref:n,tabIndex:c,...w,className:`star-rating ${h}`,children:[e.jsxs("div",{className:"rating",children:[e.jsx(q,{className:"filled-stars",...w,width:y,children:"★★★★★"}),e.jsx(T,{...w,children:"★★★★★"})]}),!isNaN(o)&&Number.isFinite(o)&&e.jsx("div",{className:"review-count",children:`(${o.toLocaleString()})`})]})});S.propTypes={rating:s.PropTypes.number,reviewCount:s.PropTypes.any,disabled:s.PropTypes.bool,tabIndex:s.PropTypes.number,style:s.PropTypes.object,className:s.PropTypes.string,color:s.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:s.PropTypes.oneOf(["small","medium","large"])};const z=m.forwardRef((t,n)=>{const{image:a,text:o,title:d,onSelectCard:c=()=>{},rating:h}=t;return e.jsx(C,{ref:n,className:"review-card",onClick:c,children:e.jsxs(L,{children:[e.jsx(R.ProductImageWrapper,{src:a}),e.jsxs("div",{className:"cont",children:[e.jsx("span",{className:"cont-title",children:d}),e.jsx("div",{className:"cont-text",children:o})]}),e.jsx(S,{color:"warning",rating:h})]})})}),M=l.styled(i.SkeletonRowWrapper)`
115
+ @media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
116
+ flex-direction: column;
117
+
118
+ & > div {
119
+ flex-direction: column;
120
+
121
+ & > div {
122
+ ${i.skeletonGradientBackground}
123
+ }
124
+ }
125
+ }
126
+ `,I=({keyPrefix:t})=>e.jsxs(M,{children:[e.jsxs(i.SkeletonColumnWrapper,{children:[e.jsx(i.SkeletonSquarePlaceholder,{height:"6.25rem",width:"6.25rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem",width:"6rem"})]},`${t}-1`),e.jsxs(i.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(i.SkeletonSquarePlaceholder,{height:"6.25rem",width:"6.25rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem",width:"6rem"})]},`${t}-2`),e.jsxs(i.SkeletonColumnWrapper,{noGradient:!0,children:[e.jsx(i.SkeletonSquarePlaceholder,{height:"6.25rem",width:"6.25rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsx(i.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem",width:"6rem"})]},`${t}-3`)]}),W=({keyPrefix:t,isLoading:n=!1,fallbackComponent:a=e.jsx(e.Fragment,{}),children:o})=>e.jsx(m.Suspense,{fallbackComponent:a,children:n===!0?e.jsx(I,{keyPrefix:t}):o}),j=m.memo(z),E=m.forwardRef((t,n)=>{const{title:a="Electronics reviews",items:o,limit:d=3,onSelectCard:c=()=>{},isLoading:h=!1}=t,g=v.useDetectMobile(),b=m.useMemo(()=>e.jsx(e.Fragment,{children:g===!0?o==null?void 0:o.map((r,p)=>e.jsx(j,{text:r==null?void 0:r.text,title:r==null?void 0:r.title,image:r==null?void 0:r.image,link:r==null?void 0:r.link,rating:r==null?void 0:r.ratingArithmeticMean,onSelectCard:()=>c(r)},p)):o==null?void 0:o.slice(0,d).map((r,p)=>e.jsx(j,{text:r==null?void 0:r.text,title:r==null?void 0:r.title,image:r==null?void 0:r.image,link:r==null?void 0:r.link,rating:r==null?void 0:r.ratingArithmeticMean,onSelectCard:()=>c(r)},p))}),[o,g,c,d]);return e.jsxs(P,{ref:n,children:[e.jsx("div",{className:"container-title",children:a}),e.jsx(W,{isLoading:h,keyPrefix:"reviews-skeleton",children:e.jsx($,{limit:d,children:b})})]})});module.exports=E;
@@ -1,13 +1,14 @@
1
- import { jsxs as c, jsx as t, Fragment as w } from "react/jsx-runtime";
2
- import { forwardRef as h, Suspense as C, memo as k, useMemo as x } from "react";
3
- import { s as d } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as z } from "./consts-BuFChS64.js";
5
- import { u as P } from "./useDetectMobile-Bkvj0VMa.js";
6
- import { t as R, p as M, o as I, b as j, g as E } from "./utils-BdsZgOUE.js";
1
+ import { jsxs as n, jsx as r, Fragment as y } from "react/jsx-runtime";
2
+ import { forwardRef as v, Suspense as N, memo as z, useMemo as P } from "react";
3
+ import { s } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as $ } from "./consts-BuFChS64.js";
5
+ import { u as M } from "./useDetectMobile-Bkvj0VMa.js";
6
+ import { t as I, o as W, b as j, g as E } from "./utils-DHfRApMf.js";
7
7
  import { useTheme as T } from "./ThemeProvider.js";
8
- import { P as l } from "./index-CblbdqjE.js";
9
- import { P as A } from "./index-CF3HhgvN.js";
10
- const W = d.div`
8
+ import { P as d } from "./index-CblbdqjE.js";
9
+ import { P as x } from "./index-BbltNcou.js";
10
+ import { s as G, a as L, S as f, c as w, b as o } from "./style-CXMUA6cI.js";
11
+ const F = s.div`
11
12
  display: flex;
12
13
  flex-direction: column;
13
14
  color: var(--darkest-950);
@@ -17,18 +18,18 @@ const W = d.div`
17
18
  font-weight: 600;
18
19
  font-size: 1.5rem;
19
20
  }
20
- `, F = d.div`
21
+ `, O = s.div`
21
22
  display: grid;
22
- grid-template-columns: ${(r) => `repeat(${r.limit}, minmax(0, 1fr))`};
23
+ grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
23
24
  gap: 1.25rem;
24
25
 
25
- @media (max-width: ${z + "px"}) {
26
+ @media (max-width: ${$ + "px"}) {
26
27
  grid-template-columns: repeat(1, 1fr);
27
28
  }
28
- `, N = d.div`
29
+ `, A = s.div`
29
30
  padding-top: 5rem;
30
31
  overflow: hidden;
31
- `, S = d.div`
32
+ `, B = s.div`
32
33
  position: relative;
33
34
  cursor: pointer;
34
35
  display: flex;
@@ -60,11 +61,11 @@ const W = d.div`
60
61
  font-size: 1.375rem;
61
62
  font-weight: 600;
62
63
  color: var(--gray-950, #14161a);
63
- ${R()}
64
+ ${I()}
64
65
  }
65
66
 
66
67
  & .cont-text {
67
- ${M(2)}
68
+ ${W(2)}
68
69
  }
69
70
  }
70
71
 
@@ -84,33 +85,15 @@ const W = d.div`
84
85
  box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1),
85
86
  0px 4px 6px -2px rgba(0, 0, 0, 0.05);
86
87
  }
87
-
88
- & .skeleton-img {
89
- position: absolute;
90
- top: -3.125rem;
91
- left: 1.25rem;
92
- min-width: 6.25rem;
93
- max-width: 6.25rem;
94
- min-height: 6.25rem;
95
- max-height: 6.25rem;
96
- border-radius: 0.75rem;
97
- border: 1px solid var(--gray-95008);
98
-
99
- /* drop-shadow-lg */
100
- box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1),
101
- 0px 4px 6px -2px rgba(0, 0, 0, 0.05);
102
-
103
- ${I("-90deg")}
104
- }
105
- `, v = (r, o) => E(
106
- r.theme,
88
+ `, R = (t, a) => E(
89
+ t.theme,
107
90
  "StarRating",
108
- r.color,
109
- r.disabled === !0 ? "disabled" : "enabled",
110
- o
111
- ), O = d.div`
112
- font-size: ${(r) => v(r, "fontSize")};
113
- line-height: ${(r) => v(r, "lineHeight")};
91
+ t.color,
92
+ t.disabled === !0 ? "disabled" : "enabled",
93
+ a
94
+ ), V = s.div`
95
+ font-size: ${(t) => R(t, "fontSize")};
96
+ line-height: ${(t) => R(t, "lineHeight")};
114
97
  line-height: 1.5rem;
115
98
  width: fit-content;
116
99
  display: flex;
@@ -127,79 +110,79 @@ const W = d.div`
127
110
  font-weight: 400;
128
111
  font-size: 0.75rem;
129
112
  line-height: 1.5rem;
130
- color: ${(r) => r.color};
113
+ color: ${(t) => t.color};
131
114
  }
132
- `, _ = d.span`
115
+ `, _ = s.span`
133
116
  position: absolute;
134
117
  z-index: 1;
135
118
  display: block;
136
119
  top: 0;
137
120
  left: 0;
138
121
  overflow: hidden;
139
- width: ${(r) => r.width}%;
122
+ width: ${(t) => t.width}%;
140
123
 
141
- color: ${(r) => j(
142
- r.theme,
124
+ color: ${(t) => j(
125
+ t.theme,
143
126
  "StarRating",
144
- r.color,
145
- r.disabled === !0 ? "disabled" : "enabled",
127
+ t.color,
128
+ t.disabled === !0 ? "disabled" : "enabled",
146
129
  "filledColor"
147
130
  )};
148
- `, G = d.span`
131
+ `, q = s.span`
149
132
  padding: 0;
150
133
  display: block;
151
134
  z-index: 0;
152
- color: ${(r) => r.color};
153
- `, b = h((r, o) => {
135
+ color: ${(t) => t.color};
136
+ `, k = v((t, a) => {
154
137
  const {
155
- rating: n = 0,
138
+ rating: l = 0,
156
139
  reviewCount: i = null,
157
- disabled: a = !1,
158
- tabIndex: s = 0,
159
- className: m = "",
140
+ disabled: m = !1,
141
+ tabIndex: c = 0,
142
+ className: h = "",
160
143
  style: g = {},
161
- color: f = "primary",
144
+ color: u = "primary",
162
145
  size: e = "large"
163
- } = r, { theme: p } = T(), u = {
146
+ } = t, { theme: p } = T(), b = {
164
147
  theme: p,
165
- color: f,
148
+ color: u,
166
149
  size: e,
167
150
  style: g,
168
- disabled: a
169
- }, $ = n / 5 * 100;
170
- return /* @__PURE__ */ c(
171
- O,
151
+ disabled: m
152
+ }, C = l / 5 * 100;
153
+ return /* @__PURE__ */ n(
154
+ V,
172
155
  {
173
- ref: o,
174
- tabIndex: s,
175
- ...u,
176
- className: `star-rating ${m}`,
156
+ ref: a,
157
+ tabIndex: c,
158
+ ...b,
159
+ className: `star-rating ${h}`,
177
160
  children: [
178
- /* @__PURE__ */ c("div", { className: "rating", children: [
179
- /* @__PURE__ */ t(
161
+ /* @__PURE__ */ n("div", { className: "rating", children: [
162
+ /* @__PURE__ */ r(
180
163
  _,
181
164
  {
182
165
  className: "filled-stars",
183
- ...u,
184
- width: $,
166
+ ...b,
167
+ width: C,
185
168
  children: "★★★★★"
186
169
  }
187
170
  ),
188
- /* @__PURE__ */ t(G, { ...u, children: "★★★★★" })
171
+ /* @__PURE__ */ r(q, { ...b, children: "★★★★★" })
189
172
  ] }),
190
- !isNaN(i) && Number.isFinite(i) && /* @__PURE__ */ t("div", { className: "review-count", children: `(${i.toLocaleString()})` })
173
+ !isNaN(i) && Number.isFinite(i) && /* @__PURE__ */ r("div", { className: "review-count", children: `(${i.toLocaleString()})` })
191
174
  ]
192
175
  }
193
176
  );
194
177
  });
195
- b.propTypes = {
196
- rating: l.number,
197
- reviewCount: l.any,
198
- disabled: l.bool,
199
- tabIndex: l.number,
200
- style: l.object,
201
- className: l.string,
202
- color: l.oneOf([
178
+ k.propTypes = {
179
+ rating: d.number,
180
+ reviewCount: d.any,
181
+ disabled: d.bool,
182
+ tabIndex: d.number,
183
+ style: d.object,
184
+ className: d.string,
185
+ color: d.oneOf([
203
186
  "primary",
204
187
  "secondary",
205
188
  "success",
@@ -208,86 +191,136 @@ b.propTypes = {
208
191
  "information",
209
192
  "neutral"
210
193
  ]),
211
- size: l.oneOf(["small", "medium", "large"])
194
+ size: d.oneOf(["small", "medium", "large"])
212
195
  };
213
- const L = h((r, o) => {
214
- const { image: n, text: i, title: a, onSelectCard: s = () => {
215
- }, rating: m } = r;
216
- return /* @__PURE__ */ t(N, { ref: o, className: "review-card", onClick: s, children: /* @__PURE__ */ c(S, { children: [
217
- /* @__PURE__ */ t(A, { src: n }),
218
- /* @__PURE__ */ c("div", { className: "cont", children: [
219
- /* @__PURE__ */ t("span", { className: "cont-title", children: a }),
220
- /* @__PURE__ */ t("div", { className: "cont-text", children: i })
196
+ const D = v((t, a) => {
197
+ const { image: l, text: i, title: m, onSelectCard: c = () => {
198
+ }, rating: h } = t;
199
+ return /* @__PURE__ */ r(A, { ref: a, className: "review-card", onClick: c, children: /* @__PURE__ */ n(B, { children: [
200
+ /* @__PURE__ */ r(x, { src: l }),
201
+ /* @__PURE__ */ n("div", { className: "cont", children: [
202
+ /* @__PURE__ */ r("span", { className: "cont-title", children: m }),
203
+ /* @__PURE__ */ r("div", { className: "cont-text", children: i })
221
204
  ] }),
222
- /* @__PURE__ */ t(b, { color: "warning", rating: m })
205
+ /* @__PURE__ */ r(k, { color: "warning", rating: h })
223
206
  ] }) });
224
- }), V = h(({}, r) => /* @__PURE__ */ t(N, { className: "review-card", children: /* @__PURE__ */ c(S, { children: [
225
- /* @__PURE__ */ t("div", { className: "skeleton-img" }),
226
- /* @__PURE__ */ t("div", { className: "cont" }),
227
- /* @__PURE__ */ t(b, { color: "warning", rating: 0 })
228
- ] }) })), B = ({ limit: r = 3, isLoading: o = !1, keyPrefix: n }) => /* @__PURE__ */ t(w, { children: Array.from({ length: r }, (i, a) => /* @__PURE__ */ t(
229
- V,
230
- {
231
- isLoading: o
232
- },
233
- `${n}-skeleton-review-card-${a}`
234
- )) }), D = ({
235
- children: r,
236
- fallbackComponent: o = /* @__PURE__ */ t(w, {}),
237
- isLoading: n = !1,
238
- limit: i,
239
- keyPrefix: a
240
- }) => /* @__PURE__ */ t(C, { fallbackComponent: o, children: n === !0 ? /* @__PURE__ */ t(
241
- B,
242
- {
243
- isLoading: n,
244
- limit: i,
245
- keyPrefix: a
207
+ }), H = s(L)`
208
+ @media (max-width: ${$ + "px"}) {
209
+ flex-direction: column;
210
+
211
+ & > div {
212
+ flex-direction: column;
213
+
214
+ & > div {
215
+ ${G}
216
+ }
217
+ }
246
218
  }
247
- ) : r }), y = k(L), ee = h((r, o) => {
219
+ `, X = ({ keyPrefix: t }) => /* @__PURE__ */ n(H, { children: [
220
+ /* @__PURE__ */ n(f, { children: [
221
+ /* @__PURE__ */ r(
222
+ w,
223
+ {
224
+ height: "6.25rem",
225
+ width: "6.25rem",
226
+ borderRadius: "0.75rem"
227
+ }
228
+ ),
229
+ /* @__PURE__ */ r(o, { height: "2rem", borderRadius: "0.75rem" }),
230
+ /* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
231
+ /* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
232
+ /* @__PURE__ */ r(
233
+ o,
234
+ {
235
+ height: "1rem",
236
+ borderRadius: "0.75rem",
237
+ width: "6rem"
238
+ }
239
+ )
240
+ ] }, `${t}-1`),
241
+ /* @__PURE__ */ n(f, { noGradient: !0, children: [
242
+ /* @__PURE__ */ r(
243
+ w,
244
+ {
245
+ height: "6.25rem",
246
+ width: "6.25rem",
247
+ borderRadius: "0.75rem"
248
+ }
249
+ ),
250
+ /* @__PURE__ */ r(o, { height: "2rem", borderRadius: "0.75rem" }),
251
+ /* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
252
+ /* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
253
+ /* @__PURE__ */ r(
254
+ o,
255
+ {
256
+ height: "1rem",
257
+ borderRadius: "0.75rem",
258
+ width: "6rem"
259
+ }
260
+ )
261
+ ] }, `${t}-2`),
262
+ /* @__PURE__ */ n(f, { noGradient: !0, children: [
263
+ /* @__PURE__ */ r(
264
+ w,
265
+ {
266
+ height: "6.25rem",
267
+ width: "6.25rem",
268
+ borderRadius: "0.75rem"
269
+ }
270
+ ),
271
+ /* @__PURE__ */ r(o, { height: "2rem", borderRadius: "0.75rem" }),
272
+ /* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
273
+ /* @__PURE__ */ r(o, { height: "1rem", borderRadius: "0.75rem" }),
274
+ /* @__PURE__ */ r(
275
+ o,
276
+ {
277
+ height: "1rem",
278
+ borderRadius: "0.75rem",
279
+ width: "6rem"
280
+ }
281
+ )
282
+ ] }, `${t}-3`)
283
+ ] }), Z = ({
284
+ keyPrefix: t,
285
+ isLoading: a = !1,
286
+ fallbackComponent: l = /* @__PURE__ */ r(y, {}),
287
+ children: i
288
+ }) => /* @__PURE__ */ r(N, { fallbackComponent: l, children: a === !0 ? /* @__PURE__ */ r(X, { keyPrefix: t }) : i }), S = z(D), ae = v((t, a) => {
248
289
  const {
249
- title: n = "Electronics reviews",
290
+ title: l = "Electronics reviews",
250
291
  items: i,
251
- limit: a = 3,
252
- onSelectCard: s = () => {
292
+ limit: m = 3,
293
+ onSelectCard: c = () => {
253
294
  },
254
- isLoading: m = !1
255
- } = r, g = P(), f = x(() => /* @__PURE__ */ t(w, { children: g === !0 ? i == null ? void 0 : i.map((e, p) => /* @__PURE__ */ t(
256
- y,
295
+ isLoading: h = !1
296
+ } = t, g = M(), u = P(() => /* @__PURE__ */ r(y, { children: g === !0 ? i == null ? void 0 : i.map((e, p) => /* @__PURE__ */ r(
297
+ S,
257
298
  {
258
299
  text: e == null ? void 0 : e.text,
259
300
  title: e == null ? void 0 : e.title,
260
301
  image: e == null ? void 0 : e.image,
261
302
  link: e == null ? void 0 : e.link,
262
303
  rating: e == null ? void 0 : e.ratingArithmeticMean,
263
- onSelectCard: () => s(e)
304
+ onSelectCard: () => c(e)
264
305
  },
265
306
  p
266
- )) : i == null ? void 0 : i.slice(0, a).map((e, p) => /* @__PURE__ */ t(
267
- y,
307
+ )) : i == null ? void 0 : i.slice(0, m).map((e, p) => /* @__PURE__ */ r(
308
+ S,
268
309
  {
269
310
  text: e == null ? void 0 : e.text,
270
311
  title: e == null ? void 0 : e.title,
271
312
  image: e == null ? void 0 : e.image,
272
313
  link: e == null ? void 0 : e.link,
273
314
  rating: e == null ? void 0 : e.ratingArithmeticMean,
274
- onSelectCard: () => s(e)
315
+ onSelectCard: () => c(e)
275
316
  },
276
317
  p
277
- )) }), [i, g, s, a]);
278
- return /* @__PURE__ */ c(W, { ref: o, children: [
279
- /* @__PURE__ */ t("div", { className: "container-title", children: n }),
280
- /* @__PURE__ */ t(F, { limit: a, children: /* @__PURE__ */ t(
281
- D,
282
- {
283
- isLoading: m,
284
- limit: a,
285
- keyPrefix: "explore-landing",
286
- children: f
287
- }
288
- ) })
318
+ )) }), [i, g, c, m]);
319
+ return /* @__PURE__ */ n(F, { ref: a, children: [
320
+ /* @__PURE__ */ r("div", { className: "container-title", children: l }),
321
+ /* @__PURE__ */ r(Z, { isLoading: h, keyPrefix: "reviews-skeleton", children: /* @__PURE__ */ r(O, { limit: m, children: u }) })
289
322
  ] });
290
323
  });
291
324
  export {
292
- ee as default
325
+ ae as default
293
326
  };