@lanaco/lnc-react-ui 4.0.130 → 4.0.132

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,118 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),d=require("react"),r=require("./utils-DmMdPm9O.cjs"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./index-DiIeF_76.cjs"),N=require("./consts-goSZX3xP.cjs"),u=g.styled.div`
2
- display: flex;
3
- flex-direction: column;
4
- gap: 0.5rem;
5
- cursor: pointer;
6
-
7
- & .wrapper-card-1 {
8
- display: flex;
9
- flex-direction: column;
10
- gap: 0.38rem;
11
- }
12
-
13
- & .wrapper-card-2 {
14
- display: flex;
15
- flex-direction: column;
16
- gap: 0;
17
- }
18
-
19
- & img {
20
- width: 100%;
21
- aspect-ratio: 1 / 1; /* defining the aspect ratio of the image */
22
- object-fit: cover; /* making sure the image isn't distorted */
23
- border-radius: 0.75rem;
24
- }
25
-
26
- & .card-title {
27
- font-size: 0.875rem;
28
- font-weight: 600;
29
- ${r.truncateTextInRows(2)}
30
- }
31
-
32
- & .price-text {
33
- font-size: 1rem;
34
- font-weight: 600;
35
- ${r.truncateText()}
36
- display: flex;
37
- align-items: end;
38
- gap: 0.5rem;
39
- & .full-price {
40
- text-decoration: line-through;
41
- font-size: 0.75rem;
42
- font-weight: 400;
43
- padding-bottom: 0.125rem;
44
- color: var(--gray-600, #676e79);
45
- }
46
- }
47
-
48
- & .location-text {
49
- font-size: 0.75rem;
50
- font-weight: 400;
51
- color: var(--gray-600, #676e79);
52
- ${r.truncateText()}
53
- }
54
-
55
- & .tags-wrapper {
56
- display: flex;
57
- gap: 0.5rem;
58
- }
59
-
60
- & .skeleton-img {
61
- background-color: ${r.linearGradientAnimation("-90deg")};
62
- border-radius: 0.75rem;
63
- border: 1px solid white;
64
- }
65
-
66
- & .skeleton-title {
67
- background-color: ${r.linearGradientAnimation("-90deg")};
68
- width: 100%;
69
- height: 2.5rem;
70
- }
71
-
72
- & .skeleton-tags {
73
- background-color: ${r.linearGradientAnimation("-90deg")};
74
- width: 80%;
75
- height: 1.5rem;
76
- }
77
-
78
- & .skeleton-price {
79
- background-color: ${r.linearGradientAnimation("-90deg")};
80
- width: 50%;
81
- height: 2.5rem;
82
- }
83
-
84
- & .skeleton-sponsored {
85
- background-color: ${r.linearGradientAnimation("-90deg")};
86
- width: 50%;
87
- height: 1rem;
88
- }
89
-
90
- @media (max-width: ${N.MOBILE_SIZE_PX+"px"}) {
91
- & img {
92
- width: 8.875rem;
93
- height: 8.875rem;
94
- min-width: 8.875rem;
95
- min-height: 8.875rem;
96
- min-width: 8.875rem;
97
- min-height: 8.875rem;
98
- object-fit: cover;
99
- }
100
-
101
- & .price-text {
102
- font-size: 0.875rem;
103
- font-weight: 600;
104
- }
105
- }
106
- `,y=g.styled.div`
107
- display: flex;
108
- align-items: center;
109
- gap: 0.25rem;
110
- color: var(--gray-500);
111
- font-size: 0.75rem;
112
- font-weight: 500;
113
-
114
- & i {
115
- font-size: 1rem;
116
- color: var(--warning-500, #F59E0B);
117
- }
118
- `,b=d.forwardRef(({sponsoredText:t="Sponsored"},s)=>e.jsxs(y,{ref:s,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:t})]})),$=d.forwardRef((t,s)=>{const{uuid:a,title:n,price:i=0,sellingPrice:o,currency:c,isNegotiable:l,isFree:m,imageUrl:h,sellerUuid:z,location:x,isSponsored:f,imageComponent:p,onSelectCard:w=()=>{},freeText:j="Free",negotiableText:v="Negotiable"}=t;return e.jsxs(u,{className:"product-card",onClick:w,children:[r.isDefined(p)?p:e.jsx(k.ProductImageWrapper,{src:h}),e.jsx("div",{className:"wrapper-card-1",children:e.jsx("div",{className:"card-title",children:n})}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:"price-text",children:[o>0&&c&&l!==!0&&m!==!0&&e.jsx("div",{children:`${r.formatPrice(o)} ${r.GetCurrencySymbol(c)}`}),i>0&&c&&l!==!0&&m!==!0&&i!==o&&e.jsx("div",{className:`${o>0?"full-price":""}`,children:`${r.formatPrice(i)} ${r.GetCurrencySymbol(c)}`}),l&&v,m&&j]}),e.jsx("div",{className:"location-text",children:x})]}),f===!0&&e.jsx(b,{})]})}),S=d.forwardRef(({},t)=>e.jsxs(u,{className:"product-card",children:[e.jsx("img",{className:"skeleton-img"}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-title"}),e.jsx("div",{className:"skeleton-tags"})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-price"}),e.jsx("div",{className:"skeleton-sponsored"})]})]})),P=({limit:t=5,isLoading:s=!1,keyPrefix:a})=>e.jsx(e.Fragment,{children:Array.from({length:t},(n,i)=>e.jsx(S,{isLoading:s},`${a}-skeleton-product-card-${i}`))}),C=({children:t,fallbackComponent:s=e.jsx(e.Fragment,{}),isLoading:a=!1,limit:n,keyPrefix:i})=>e.jsx(d.Suspense,{fallbackComponent:s,children:a===!0?e.jsx(P,{isLoading:a,limit:n,keyPrefix:i}):t});exports.DetailedProductCard=$;exports.SuspenseDetailedProductCard=C;