@lanaco/lnc-react-ui 4.0.123 → 4.0.124

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.
@@ -1 +1 @@
1
- "use strict";const r=require("react/jsx-runtime"),u=require("react"),f=require("./useDetectMobile-zkbzoOGV.cjs"),a=require("./skeleton-DdlE-y3C.cjs"),S=require("./Button.cjs"),b=require("./style-BTTXJFJN.cjs"),_=({limit:o=4,isLoading:n=!1,keyPrefix:s})=>r.jsx(r.Fragment,{children:Array.from({length:o},(i,t)=>r.jsx(a.ShopCardSkeleton,{isLoading:n},`${s}-skeleton-shop-card-${t}`))}),k=({children:o,fallbackComponent:n=r.jsx(r.Fragment,{}),isLoading:s=!1,limit:i,keyPrefix:t})=>r.jsx(u.Suspense,{fallbackComponent:n,children:s===!0?r.jsx(_,{isLoading:s,limit:i,keyPrefix:t}):o}),q=u.memo(a.ShopCard),C=u.forwardRef(({buttonText:o,buttonLink:n,items:s,onButtonAction:i=()=>{},onSelectCard:t=()=>{},isLoading:l=!1,limit:d=4,getImage:p=()=>{},isHighlight:h=!1},w)=>{const m=f.useDetectMobile(),g=u.useMemo(()=>{var c;return(c=s==null?void 0:s.slice(0,4))==null?void 0:c.map((e,j)=>r.jsx(q,{uuid:e==null?void 0:e.uuid,title:e==null?void 0:e.name,subtitle:e==null?void 0:e.shortDescription,rating:e==null?void 0:e.rating,reviewCount:e==null?void 0:e.reviewCount,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid),image:p(e==null?void 0:e.profileImage,e==null?void 0:e.uuid)||null,hideProducts:!0},`shop-card__${j+1}`))},[s]);return r.jsxs(b.Wrapper,{className:h?"highlight":"",children:[r.jsx("div",{className:"wrapper__grid",children:r.jsx(k,{isLoading:l,limit:d,keyPrefix:"blog-section",children:g})}),r.jsx(S,{text:o,borderRadius:"curved",btnType:m?"basic":"outline",color:"neutral",className:"wrapper__action",onClick:()=>i(n)})]})});module.exports=C;
1
+ "use strict";const r=require("react/jsx-runtime"),u=require("react"),f=require("./useDetectMobile-zkbzoOGV.cjs"),a=require("./skeleton-BXY2S7mC.cjs"),S=require("./Button.cjs"),b=require("./style-BTTXJFJN.cjs"),_=({limit:o=4,isLoading:n=!1,keyPrefix:s})=>r.jsx(r.Fragment,{children:Array.from({length:o},(i,t)=>r.jsx(a.ShopCardSkeleton,{isLoading:n},`${s}-skeleton-shop-card-${t}`))}),k=({children:o,fallbackComponent:n=r.jsx(r.Fragment,{}),isLoading:s=!1,limit:i,keyPrefix:t})=>r.jsx(u.Suspense,{fallbackComponent:n,children:s===!0?r.jsx(_,{isLoading:s,limit:i,keyPrefix:t}):o}),q=u.memo(a.ShopCard),C=u.forwardRef(({buttonText:o,buttonLink:n,items:s,onButtonAction:i=()=>{},onSelectCard:t=()=>{},isLoading:l=!1,limit:d=4,getImage:p=()=>{},isHighlight:h=!1},w)=>{const m=f.useDetectMobile(),g=u.useMemo(()=>{var c;return(c=s==null?void 0:s.slice(0,4))==null?void 0:c.map((e,j)=>r.jsx(q,{uuid:e==null?void 0:e.uuid,title:e==null?void 0:e.name,subtitle:e==null?void 0:e.shortDescription,rating:e==null?void 0:e.rating,reviewCount:e==null?void 0:e.reviewCount,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid),image:p(e==null?void 0:e.profileImage,e==null?void 0:e.uuid)||null,hideProducts:!0},`shop-card__${j+1}`))},[s]);return r.jsxs(b.Wrapper,{className:h?"highlight":"",children:[r.jsx("div",{className:"wrapper__grid",children:r.jsx(k,{isLoading:l,limit:d,keyPrefix:"blog-section",children:g})}),r.jsx(S,{text:o,borderRadius:"curved",btnType:m?"basic":"outline",color:"neutral",className:"wrapper__action",onClick:()=>i(n)})]})});module.exports=C;
@@ -1,7 +1,7 @@
1
1
  import { jsx as o, Fragment as u, jsxs as g } from "react/jsx-runtime";
2
2
  import { Suspense as S, memo as b, forwardRef as _, useMemo as C } from "react";
3
3
  import { u as k } from "./useDetectMobile-Bkvj0VMa.js";
4
- import { a as w, S as v } from "./skeleton-CkTNgaA3.js";
4
+ import { a as w, S as v } from "./skeleton-C_gJZRTs.js";
5
5
  import M from "./Button.js";
6
6
  import { W as y } from "./style-tw6KjI2J.js";
7
7
  const N = ({ limit: s = 4, isLoading: a = !1, keyPrefix: r }) => /* @__PURE__ */ o(u, { children: Array.from({ length: s }, (i, t) => /* @__PURE__ */ o(
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),y=require("react"),c=require("./Button.cjs"),p=require("./skeleton-DdlE-y3C.cjs"),v=require("./utils-CZynEOC_.cjs"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),b=require("./consts-goSZX3xP.cjs"),C=j.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("react"),v=require("./Button.cjs"),p=require("./skeleton-BXY2S7mC.cjs"),j=require("./utils-CZynEOC_.cjs"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),d=b.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: flex-start;
@@ -67,7 +67,7 @@
67
67
  width: 100%;
68
68
  }
69
69
 
70
- @media (max-width: ${b.MOBILE_SIZE_PX+"px"}) {
70
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
71
71
  & .wrapper__heading {
72
72
  & .wrapper__title {
73
73
  & .title__action {
@@ -88,4 +88,4 @@
88
88
  gap: 1rem;
89
89
  }
90
90
  }
91
- `,d=y.forwardRef(({title:i,subtitle:s,items:n,limit:m=4,limitForMobile:_=2,buttonText:u="Show More",onSelectCard:g=()=>{},onButtonAction:l=()=>{},icon:o,getImage:x=()=>{},getProductImage:h=()=>{},hideProducts:f=!1},w)=>{var a;return t.jsxs(C,{ref:w,limitCards:m,limitCardsForMobile:_,children:[t.jsxs("div",{className:"wrapper__heading",children:[t.jsxs("div",{className:"wrapper__title",children:[i&&t.jsxs("div",{className:"title__text",children:[v.isDefinedNotEmptyString(o)&&t.jsx("i",{className:o}),t.jsx("span",{children:i})]}),l&&t.jsx(c,{text:u,color:"neutral",borderRadius:"curved",btnType:"tinted",className:"title__action",onClick:l})]}),s&&t.jsx("div",{className:"wrapper__subtitle",children:s})]}),t.jsx("div",{className:"wrapper__cards",children:n&&(n==null?void 0:n.length)>0?n==null?void 0:n.map((e,r)=>t.jsx(p.ShopCard,{uuid:e==null?void 0:e.uuid,title:e==null?void 0:e.name,subtitle:e==null?void 0:e.shortDescription,rating:e==null?void 0:e.ratingArithmeticMean,reviewCount:e==null?void 0:e.reviewCount,products:e==null?void 0:e.products,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>g(e==null?void 0:e.uuid),image:x(e==null?void 0:e.profileImage,e==null?void 0:e.uuid)||null,getProductImage:h,canAcceptPayments:e==null?void 0:e.canAcceptPayments,hideProducts:f},`shop-card__${r+1}`)):(a=Array.from("1234"))==null?void 0:a.map((e,r)=>t.jsx(p.ShopCardSkeleton,{},`shop-card-skeleton__${r+1}`))})]})});module.exports=d;
91
+ `,S=c.forwardRef(({title:i,subtitle:s,items:n,limit:m=4,limitForMobile:u=2,buttonText:_="Show More",onSelectCard:g=()=>{},onButtonAction:l=()=>{},icon:o,getImage:x=()=>{},getProductImage:h=()=>{},hideProducts:f=!1,showRating:w=!0},y)=>{var a;return t.jsxs(d,{ref:y,limitCards:m,limitCardsForMobile:u,children:[t.jsxs("div",{className:"wrapper__heading",children:[t.jsxs("div",{className:"wrapper__title",children:[i&&t.jsxs("div",{className:"title__text",children:[j.isDefinedNotEmptyString(o)&&t.jsx("i",{className:o}),t.jsx("span",{children:i})]}),l&&t.jsx(v,{text:_,color:"neutral",borderRadius:"curved",btnType:"tinted",className:"title__action",onClick:l})]}),s&&t.jsx("div",{className:"wrapper__subtitle",children:s})]}),t.jsx("div",{className:"wrapper__cards",children:n&&(n==null?void 0:n.length)>0?n==null?void 0:n.map((e,r)=>t.jsx(p.ShopCard,{showRating:w,uuid:e==null?void 0:e.uuid,title:e==null?void 0:e.name,subtitle:e==null?void 0:e.shortDescription,rating:e==null?void 0:e.ratingArithmeticMean,reviewCount:e==null?void 0:e.reviewCount,products:e==null?void 0:e.products,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>g(e==null?void 0:e.uuid),image:x(e==null?void 0:e.profileImage,e==null?void 0:e.uuid)||null,getProductImage:h,canAcceptPayments:e==null?void 0:e.canAcceptPayments,hideProducts:f},`shop-card__${r+1}`)):(a=Array.from("1234"))==null?void 0:a.map((e,r)=>t.jsx(p.ShopCardSkeleton,{},`shop-card-skeleton__${r+1}`))})]})});module.exports=S;
@@ -1,11 +1,11 @@
1
1
  import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as y } from "react";
3
- import v from "./Button.js";
4
- import { S as C, a as b } from "./skeleton-CkTNgaA3.js";
5
- import { k as d } from "./utils-BbgAIA9N.js";
6
- import { s as S } from "./emotion-styled.browser.esm-BNN1dTl3.js";
7
- import { M as N } from "./consts-BuFChS64.js";
8
- const c = S.div`
2
+ import { forwardRef as v } from "react";
3
+ import C from "./Button.js";
4
+ import { S as b, a as d } from "./skeleton-C_gJZRTs.js";
5
+ import { k as S } from "./utils-BbgAIA9N.js";
6
+ import { s as N } from "./emotion-styled.browser.esm-BNN1dTl3.js";
7
+ import { M as c } from "./consts-BuFChS64.js";
8
+ const $ = N.div`
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  align-items: flex-start;
@@ -74,7 +74,7 @@ const c = S.div`
74
74
  width: 100%;
75
75
  }
76
76
 
77
- @media (max-width: ${N + "px"}) {
77
+ @media (max-width: ${c + "px"}) {
78
78
  & .wrapper__heading {
79
79
  & .wrapper__title {
80
80
  & .title__action {
@@ -95,7 +95,7 @@ const c = S.div`
95
95
  gap: 1rem;
96
96
  }
97
97
  }
98
- `, I = y(
98
+ `, P = v(
99
99
  ({
100
100
  title: t,
101
101
  subtitle: o,
@@ -112,24 +112,25 @@ const c = S.div`
112
112
  },
113
113
  getProductImage: h = () => {
114
114
  },
115
- hideProducts: w = !1
116
- }, x) => {
115
+ hideProducts: w = !1,
116
+ showRating: x = !0
117
+ }, y) => {
117
118
  var s;
118
119
  return /* @__PURE__ */ n(
119
- c,
120
+ $,
120
121
  {
121
- ref: x,
122
+ ref: y,
122
123
  limitCards: m,
123
124
  limitCardsForMobile: _,
124
125
  children: [
125
126
  /* @__PURE__ */ n("div", { className: "wrapper__heading", children: [
126
127
  /* @__PURE__ */ n("div", { className: "wrapper__title", children: [
127
128
  t && /* @__PURE__ */ n("div", { className: "title__text", children: [
128
- d(p) && /* @__PURE__ */ r("i", { className: p }),
129
+ S(p) && /* @__PURE__ */ r("i", { className: p }),
129
130
  /* @__PURE__ */ r("span", { children: t })
130
131
  ] }),
131
132
  a && /* @__PURE__ */ r(
132
- v,
133
+ C,
133
134
  {
134
135
  text: g,
135
136
  color: "neutral",
@@ -143,8 +144,9 @@ const c = S.div`
143
144
  o && /* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: o })
144
145
  ] }),
145
146
  /* @__PURE__ */ r("div", { className: "wrapper__cards", children: i && (i == null ? void 0 : i.length) > 0 ? i == null ? void 0 : i.map((e, l) => /* @__PURE__ */ r(
146
- C,
147
+ b,
147
148
  {
149
+ showRating: x,
148
150
  uuid: e == null ? void 0 : e.uuid,
149
151
  title: e == null ? void 0 : e.name,
150
152
  subtitle: e == null ? void 0 : e.shortDescription,
@@ -159,12 +161,12 @@ const c = S.div`
159
161
  hideProducts: w
160
162
  },
161
163
  `shop-card__${l + 1}`
162
- )) : (s = Array.from("1234")) == null ? void 0 : s.map((e, l) => /* @__PURE__ */ r(b, {}, `shop-card-skeleton__${l + 1}`)) })
164
+ )) : (s = Array.from("1234")) == null ? void 0 : s.map((e, l) => /* @__PURE__ */ r(d, {}, `shop-card-skeleton__${l + 1}`)) })
163
165
  ]
164
166
  }
165
167
  );
166
168
  }
167
169
  );
168
170
  export {
169
- I as default
171
+ P as default
170
172
  };
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),t=require("react"),p=require("./Icon.cjs"),n=require("./utils-CZynEOC_.cjs"),N=require("./index-BvSNRLNa.cjs"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),u=_.styled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),t=require("react"),p=require("./Icon.cjs"),n=require("./utils-CZynEOC_.cjs"),u=require("./index-BvSNRLNa.cjs"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=_.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -122,7 +122,7 @@
122
122
  }
123
123
  }
124
124
  }
125
- `,S=_.styled.div`
125
+ `,k=_.styled.div`
126
126
  display: flex;
127
127
  flex-direction: column;
128
128
  align-items: center;
@@ -165,4 +165,4 @@
165
165
  width: 100%;
166
166
  }
167
167
  }
168
- `,g="data:image/svg+xml,%3csvg%20width='80'%20height='80'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40%200C62.0914%200%2080%2017.9086%2080%2040C80%2062.0914%2062.0914%2080%2040%2080C17.9086%2080%200%2062.0914%200%2040C0%2017.9086%2017.9086%200%2040%200ZM29.7148%2020C29.1939%2019.9981%2028.5387%2019.9954%2027.9199%2020.1973C27.3848%2020.3719%2026.8918%2020.6581%2026.4746%2021.0361C25.9923%2021.4732%2025.6689%2022.0429%2025.4121%2022.4961C25.3881%2022.5384%2025.3647%2022.58%2025.3418%2022.6201L18.2637%2035.0078C17.91%2035.6268%2017.9127%2036.3873%2018.2705%2037.0039C18.6284%2037.6204%2019.2871%2038%2020%2038H22V53.2725C22%2054.0504%2022.0003%2054.7505%2022.0479%2055.333C22.0988%2055.9568%2022.214%2056.6198%2022.5449%2057.2695C23.0243%2058.2103%2023.7897%2058.9757%2024.7305%2059.4551C25.3802%2059.786%2026.0432%2059.9012%2026.667%2059.9521C27.2495%2059.9997%2027.9496%2060%2028.7275%2060H39.2725C40.0504%2060%2040.7505%2059.9997%2041.333%2059.9521C41.9568%2059.9012%2042.6198%2059.786%2043.2695%2059.4551C44.2103%2058.9757%2044.9757%2058.2103%2045.4551%2057.2695C45.786%2056.6198%2045.9012%2055.9568%2045.9521%2055.333C45.9997%2054.7505%2046%2054.0504%2046%2053.2725V38H54V58C54%2059.1046%2054.8954%2060%2056%2060C57.1046%2060%2058%2059.1046%2058%2058V38H60C60.7129%2038%2061.3716%2037.6204%2061.7295%2037.0039C62.0873%2036.3873%2062.09%2035.6268%2061.7363%2035.0078L54.6582%2022.6201C54.6353%2022.58%2054.6119%2022.5384%2054.5879%2022.4961C54.3311%2022.0429%2054.0077%2021.4732%2053.5254%2021.0361C53.1082%2020.6581%2052.6152%2020.3719%2052.0801%2020.1973C51.4613%2019.9954%2050.8061%2019.9981%2050.2852%2020H29.7148ZM42%2038V48H26V38H42Z'%20fill='%2387C6FA'/%3e%3c/svg%3e",k=t.forwardRef(({uuid:c,image:m,imageComponent:d,title:x,subtitle:h,badges:w,rating:f,reviewCount:o,products:l,onSelectCard:v=()=>{},getProductImage:C=()=>{},canAcceptPayments:j,hideProducts:b=!1},y)=>{const i=t.useRef();return t.useEffect(()=>{var s;const e=a=>{a.target.src=g,a.onerror=null};return(s=i==null?void 0:i.current)==null||s.addEventListener("error",e),()=>{var a;(a=i==null?void 0:i.current)==null||a.removeEventListener("error",e)}},[]),r.jsxs(u,{ref:y,onClick:v,children:[r.jsxs("div",{className:"wrapper__content",children:[n.isDefined(d)?d:m?r.jsx("img",{ref:i,src:m,className:"wrapper__image"}):r.jsx("img",{src:g}),r.jsxs("div",{className:"wrapper__info",children:[r.jsxs("div",{className:"wrapper__title",children:[x," ",j&&r.jsx(p,{color:"secondary",icon:"credit-card",className:"card"})]}),r.jsx("div",{className:"wrapper__subtitle",children:h}),w&&r.jsx("div",{className:"wrapper__badges"}),r.jsxs("div",{className:"wrapper__rating",children:[r.jsx("div",{className:"wrapper_stars",children:[...Array(5).keys()].map((e,s)=>r.jsx(p,{icon:" mng-lnc-star--filled",className:`wrapper__star ${e>=f?"gold-star":""}`},`shop-card-rating-star__${s+1}`))}),r.jsxs("div",{className:"wrapper__review-count",children:["(",o==null?void 0:o.toLocaleString(),")"]})]})]})]}),b!==!0&&r.jsx("div",{className:"wrapper__products",children:l&&(l==null?void 0:l.map((e,s)=>r.jsx(t.Fragment,{children:r.jsx("div",{className:"wrapper__product",onClick:()=>{var a;return(a=e==null?void 0:e.onSelectProduct)==null?void 0:a.call(e,e==null?void 0:e.uuid)},children:n.isDefined(e==null?void 0:e.imageComponent)?e==null?void 0:e.imageComponent:r.jsx(N.ProductImageWrapper,{src:C(e==null?void 0:e.image,e==null?void 0:e.uuid,c),className:"product__image"})})},s)))})]})}),H=t.forwardRef(({},c)=>r.jsx(S,{children:r.jsxs("div",{className:"wrapper__content",children:[r.jsx("div",{className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__info",children:[r.jsx("div",{className:"wrapper__info-item"}),r.jsx("div",{className:"wrapper__info-item"}),r.jsx("div",{className:"wrapper__info-item"}),r.jsx("div",{className:"wrapper__info-item"})]})]})}));exports.ShopCard=k;exports.ShopCardSkeleton=H;
168
+ `,g="data:image/svg+xml,%3csvg%20width='80'%20height='80'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40%200C62.0914%200%2080%2017.9086%2080%2040C80%2062.0914%2062.0914%2080%2040%2080C17.9086%2080%200%2062.0914%200%2040C0%2017.9086%2017.9086%200%2040%200ZM29.7148%2020C29.1939%2019.9981%2028.5387%2019.9954%2027.9199%2020.1973C27.3848%2020.3719%2026.8918%2020.6581%2026.4746%2021.0361C25.9923%2021.4732%2025.6689%2022.0429%2025.4121%2022.4961C25.3881%2022.5384%2025.3647%2022.58%2025.3418%2022.6201L18.2637%2035.0078C17.91%2035.6268%2017.9127%2036.3873%2018.2705%2037.0039C18.6284%2037.6204%2019.2871%2038%2020%2038H22V53.2725C22%2054.0504%2022.0003%2054.7505%2022.0479%2055.333C22.0988%2055.9568%2022.214%2056.6198%2022.5449%2057.2695C23.0243%2058.2103%2023.7897%2058.9757%2024.7305%2059.4551C25.3802%2059.786%2026.0432%2059.9012%2026.667%2059.9521C27.2495%2059.9997%2027.9496%2060%2028.7275%2060H39.2725C40.0504%2060%2040.7505%2059.9997%2041.333%2059.9521C41.9568%2059.9012%2042.6198%2059.786%2043.2695%2059.4551C44.2103%2058.9757%2044.9757%2058.2103%2045.4551%2057.2695C45.786%2056.6198%2045.9012%2055.9568%2045.9521%2055.333C45.9997%2054.7505%2046%2054.0504%2046%2053.2725V38H54V58C54%2059.1046%2054.8954%2060%2056%2060C57.1046%2060%2058%2059.1046%2058%2058V38H60C60.7129%2038%2061.3716%2037.6204%2061.7295%2037.0039C62.0873%2036.3873%2062.09%2035.6268%2061.7363%2035.0078L54.6582%2022.6201C54.6353%2022.58%2054.6119%2022.5384%2054.5879%2022.4961C54.3311%2022.0429%2054.0077%2021.4732%2053.5254%2021.0361C53.1082%2020.6581%2052.6152%2020.3719%2052.0801%2020.1973C51.4613%2019.9954%2050.8061%2019.9981%2050.2852%2020H29.7148ZM42%2038V48H26V38H42Z'%20fill='%2387C6FA'/%3e%3c/svg%3e",H=t.forwardRef(({uuid:c,image:m,imageComponent:d,title:x,subtitle:h,badges:w,rating:f,reviewCount:o,products:l,onSelectCard:v=()=>{},getProductImage:C=()=>{},canAcceptPayments:j,hideProducts:b=!1,showRating:y=!0},N)=>{const i=t.useRef();return t.useEffect(()=>{var s;const e=a=>{a.target.src=g,a.onerror=null};return(s=i==null?void 0:i.current)==null||s.addEventListener("error",e),()=>{var a;(a=i==null?void 0:i.current)==null||a.removeEventListener("error",e)}},[]),r.jsxs(S,{ref:N,onClick:v,children:[r.jsxs("div",{className:"wrapper__content",children:[n.isDefined(d)?d:m?r.jsx("img",{ref:i,src:m,className:"wrapper__image"}):r.jsx("img",{src:g}),r.jsxs("div",{className:"wrapper__info",children:[r.jsxs("div",{className:"wrapper__title",children:[x," ",j&&r.jsx(p,{color:"secondary",icon:"credit-card",className:"card"})]}),r.jsx("div",{className:"wrapper__subtitle",children:h}),w&&r.jsx("div",{className:"wrapper__badges"}),y&&r.jsxs("div",{className:"wrapper__rating",children:[r.jsx("div",{className:"wrapper_stars",children:[...Array(5).keys()].map((e,s)=>r.jsx(p,{icon:" mng-lnc-star--filled",className:`wrapper__star ${e>=f?"gold-star":""}`},`shop-card-rating-star__${s+1}`))}),r.jsxs("div",{className:"wrapper__review-count",children:["(",o==null?void 0:o.toLocaleString(),")"]})]})]})]}),b!==!0&&r.jsx("div",{className:"wrapper__products",children:l&&(l==null?void 0:l.map((e,s)=>r.jsx(t.Fragment,{children:r.jsx("div",{className:"wrapper__product",onClick:()=>{var a;return(a=e==null?void 0:e.onSelectProduct)==null?void 0:a.call(e,e==null?void 0:e.uuid)},children:n.isDefined(e==null?void 0:e.imageComponent)?e==null?void 0:e.imageComponent:r.jsx(u.ProductImageWrapper,{src:C(e==null?void 0:e.image,e==null?void 0:e.uuid,c),className:"product__image"})})},s)))})]})}),L=t.forwardRef(({},c)=>r.jsx(k,{children:r.jsxs("div",{className:"wrapper__content",children:[r.jsx("div",{className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__info",children:[r.jsx("div",{className:"wrapper__info-item"}),r.jsx("div",{className:"wrapper__info-item"}),r.jsx("div",{className:"wrapper__info-item"}),r.jsx("div",{className:"wrapper__info-item"})]})]})}));exports.ShopCard=H;exports.ShopCardSkeleton=L;
@@ -1,10 +1,10 @@
1
1
  import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as h, useRef as H, useEffect as L, Fragment as V } from "react";
2
+ import { forwardRef as h, useRef as L, useEffect as V, Fragment as $ } from "react";
3
3
  import p from "./Icon.js";
4
4
  import { p as d, o as g, l as _ } from "./utils-BbgAIA9N.js";
5
- import { P as $ } from "./index-YGcWbzeb.js";
5
+ import { P as j } from "./index-YGcWbzeb.js";
6
6
  import { s as w } from "./emotion-styled.browser.esm-BNN1dTl3.js";
7
- const j = w.div`
7
+ const E = w.div`
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  align-items: center;
@@ -128,7 +128,7 @@ const j = w.div`
128
128
  }
129
129
  }
130
130
  }
131
- `, E = w.div`
131
+ `, z = w.div`
132
132
  display: flex;
133
133
  flex-direction: column;
134
134
  align-items: center;
@@ -171,7 +171,7 @@ const j = w.div`
171
171
  width: 100%;
172
172
  }
173
173
  }
174
- `, f = "data:image/svg+xml,%3csvg%20width='80'%20height='80'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40%200C62.0914%200%2080%2017.9086%2080%2040C80%2062.0914%2062.0914%2080%2040%2080C17.9086%2080%200%2062.0914%200%2040C0%2017.9086%2017.9086%200%2040%200ZM29.7148%2020C29.1939%2019.9981%2028.5387%2019.9954%2027.9199%2020.1973C27.3848%2020.3719%2026.8918%2020.6581%2026.4746%2021.0361C25.9923%2021.4732%2025.6689%2022.0429%2025.4121%2022.4961C25.3881%2022.5384%2025.3647%2022.58%2025.3418%2022.6201L18.2637%2035.0078C17.91%2035.6268%2017.9127%2036.3873%2018.2705%2037.0039C18.6284%2037.6204%2019.2871%2038%2020%2038H22V53.2725C22%2054.0504%2022.0003%2054.7505%2022.0479%2055.333C22.0988%2055.9568%2022.214%2056.6198%2022.5449%2057.2695C23.0243%2058.2103%2023.7897%2058.9757%2024.7305%2059.4551C25.3802%2059.786%2026.0432%2059.9012%2026.667%2059.9521C27.2495%2059.9997%2027.9496%2060%2028.7275%2060H39.2725C40.0504%2060%2040.7505%2059.9997%2041.333%2059.9521C41.9568%2059.9012%2042.6198%2059.786%2043.2695%2059.4551C44.2103%2058.9757%2044.9757%2058.2103%2045.4551%2057.2695C45.786%2056.6198%2045.9012%2055.9568%2045.9521%2055.333C45.9997%2054.7505%2046%2054.0504%2046%2053.2725V38H54V58C54%2059.1046%2054.8954%2060%2056%2060C57.1046%2060%2058%2059.1046%2058%2058V38H60C60.7129%2038%2061.3716%2037.6204%2061.7295%2037.0039C62.0873%2036.3873%2062.09%2035.6268%2061.7363%2035.0078L54.6582%2022.6201C54.6353%2022.58%2054.6119%2022.5384%2054.5879%2022.4961C54.3311%2022.0429%2054.0077%2021.4732%2053.5254%2021.0361C53.1082%2020.6581%2052.6152%2020.3719%2052.0801%2020.1973C51.4613%2019.9954%2050.8061%2019.9981%2050.2852%2020H29.7148ZM42%2038V48H26V38H42Z'%20fill='%2387C6FA'/%3e%3c/svg%3e", Z = h(
174
+ `, f = "data:image/svg+xml,%3csvg%20width='80'%20height='80'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40%200C62.0914%200%2080%2017.9086%2080%2040C80%2062.0914%2062.0914%2080%2040%2080C17.9086%2080%200%2062.0914%200%2040C0%2017.9086%2017.9086%200%2040%200ZM29.7148%2020C29.1939%2019.9981%2028.5387%2019.9954%2027.9199%2020.1973C27.3848%2020.3719%2026.8918%2020.6581%2026.4746%2021.0361C25.9923%2021.4732%2025.6689%2022.0429%2025.4121%2022.4961C25.3881%2022.5384%2025.3647%2022.58%2025.3418%2022.6201L18.2637%2035.0078C17.91%2035.6268%2017.9127%2036.3873%2018.2705%2037.0039C18.6284%2037.6204%2019.2871%2038%2020%2038H22V53.2725C22%2054.0504%2022.0003%2054.7505%2022.0479%2055.333C22.0988%2055.9568%2022.214%2056.6198%2022.5449%2057.2695C23.0243%2058.2103%2023.7897%2058.9757%2024.7305%2059.4551C25.3802%2059.786%2026.0432%2059.9012%2026.667%2059.9521C27.2495%2059.9997%2027.9496%2060%2028.7275%2060H39.2725C40.0504%2060%2040.7505%2059.9997%2041.333%2059.9521C41.9568%2059.9012%2042.6198%2059.786%2043.2695%2059.4551C44.2103%2058.9757%2044.9757%2058.2103%2045.4551%2057.2695C45.786%2056.6198%2045.9012%2055.9568%2045.9521%2055.333C45.9997%2054.7505%2046%2054.0504%2046%2053.2725V38H54V58C54%2059.1046%2054.8954%2060%2056%2060C57.1046%2060%2058%2059.1046%2058%2058V38H60C60.7129%2038%2061.3716%2037.6204%2061.7295%2037.0039C62.0873%2036.3873%2062.09%2035.6268%2061.7363%2035.0078L54.6582%2022.6201C54.6353%2022.58%2054.6119%2022.5384%2054.5879%2022.4961C54.3311%2022.0429%2054.0077%2021.4732%2053.5254%2021.0361C53.1082%2020.6581%2052.6152%2020.3719%2052.0801%2020.1973C51.4613%2019.9954%2050.8061%2019.9981%2050.2852%2020H29.7148ZM42%2038V48H26V38H42Z'%20fill='%2387C6FA'/%3e%3c/svg%3e", D = h(
175
175
  ({
176
176
  uuid: o,
177
177
  image: m,
@@ -187,10 +187,11 @@ const j = w.div`
187
187
  getProductImage: N = () => {
188
188
  },
189
189
  canAcceptPayments: k,
190
- hideProducts: S = !1
191
- }, u) => {
192
- const n = H();
193
- return L(() => {
190
+ hideProducts: u = !1,
191
+ showRating: S = !0
192
+ }, H) => {
193
+ const n = L();
194
+ return V(() => {
194
195
  var l;
195
196
  const e = (a) => {
196
197
  a.target.src = f, a.onerror = null;
@@ -199,7 +200,7 @@ const j = w.div`
199
200
  var a;
200
201
  (a = n == null ? void 0 : n.current) == null || a.removeEventListener("error", e);
201
202
  };
202
- }, []), /* @__PURE__ */ i(j, { ref: u, onClick: y, children: [
203
+ }, []), /* @__PURE__ */ i(E, { ref: H, onClick: y, children: [
203
204
  /* @__PURE__ */ i("div", { className: "wrapper__content", children: [
204
205
  _(c) ? c : m ? /* @__PURE__ */ r("img", { ref: n, src: m, className: "wrapper__image" }) : /* @__PURE__ */ r("img", { src: f }),
205
206
  /* @__PURE__ */ i("div", { className: "wrapper__info", children: [
@@ -210,7 +211,7 @@ const j = w.div`
210
211
  ] }),
211
212
  /* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: v }),
212
213
  C && /* @__PURE__ */ r("div", { className: "wrapper__badges" }),
213
- /* @__PURE__ */ i("div", { className: "wrapper__rating", children: [
214
+ S && /* @__PURE__ */ i("div", { className: "wrapper__rating", children: [
214
215
  /* @__PURE__ */ r("div", { className: "wrapper_stars", children: [...Array(5).keys()].map((e, l) => /* @__PURE__ */ r(
215
216
  p,
216
217
  {
@@ -227,7 +228,7 @@ const j = w.div`
227
228
  ] })
228
229
  ] })
229
230
  ] }),
230
- S !== !0 && /* @__PURE__ */ r("div", { className: "wrapper__products", children: s && (s == null ? void 0 : s.map((e, l) => /* @__PURE__ */ r(V, { children: /* @__PURE__ */ r(
231
+ u !== !0 && /* @__PURE__ */ r("div", { className: "wrapper__products", children: s && (s == null ? void 0 : s.map((e, l) => /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(
231
232
  "div",
232
233
  {
233
234
  className: "wrapper__product",
@@ -236,7 +237,7 @@ const j = w.div`
236
237
  return (a = e == null ? void 0 : e.onSelectProduct) == null ? void 0 : a.call(e, e == null ? void 0 : e.uuid);
237
238
  },
238
239
  children: _(e == null ? void 0 : e.imageComponent) ? e == null ? void 0 : e.imageComponent : /* @__PURE__ */ r(
239
- $,
240
+ j,
240
241
  {
241
242
  src: N(
242
243
  e == null ? void 0 : e.image,
@@ -250,7 +251,7 @@ const j = w.div`
250
251
  ) }, l))) })
251
252
  ] });
252
253
  }
253
- ), D = h(({}, o) => /* @__PURE__ */ r(E, { children: /* @__PURE__ */ i("div", { className: "wrapper__content", children: [
254
+ ), F = h(({}, o) => /* @__PURE__ */ r(z, { children: /* @__PURE__ */ i("div", { className: "wrapper__content", children: [
254
255
  /* @__PURE__ */ r("div", { className: "wrapper__image" }),
255
256
  /* @__PURE__ */ i("div", { className: "wrapper__info", children: [
256
257
  /* @__PURE__ */ r("div", { className: "wrapper__info-item" }),
@@ -260,6 +261,6 @@ const j = w.div`
260
261
  ] })
261
262
  ] }) }));
262
263
  export {
263
- Z as S,
264
- D as a
264
+ D as S,
265
+ F as a
265
266
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.123",
3
+ "version": "4.0.124",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [