@lanaco/lnc-react-ui 4.0.95 → 4.0.96

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 (42) hide show
  1. package/dist/DecimalInput.cjs +1 -1
  2. package/dist/DecimalInput.js +1 -1
  3. package/dist/DecimalInputV2.cjs +1 -1
  4. package/dist/DecimalInputV2.js +20 -20
  5. package/dist/DetailedProductsSection.cjs +4 -4
  6. package/dist/DetailedProductsSection.js +16 -14
  7. package/dist/DragAndDropFile.cjs +1 -1
  8. package/dist/DragAndDropFile.js +1 -1
  9. package/dist/Dropdown.cjs +1 -1
  10. package/dist/Dropdown.js +18 -18
  11. package/dist/DropdownLookup.cjs +1 -1
  12. package/dist/DropdownLookup.js +14 -14
  13. package/dist/Icon.cjs +1 -1
  14. package/dist/Icon.js +8 -8
  15. package/dist/MultiSelectDropdown.cjs +1 -1
  16. package/dist/MultiSelectDropdown.js +6 -6
  17. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  18. package/dist/MultiSelectDropdownLookup.js +6 -6
  19. package/dist/NumberInput.cjs +1 -1
  20. package/dist/NumberInput.js +1 -1
  21. package/dist/PasswordInput.cjs +1 -1
  22. package/dist/PasswordInput.js +1 -1
  23. package/dist/ProgressBar.cjs +1 -1
  24. package/dist/ProgressBar.js +1 -1
  25. package/dist/RadioGroup.cjs +3 -3
  26. package/dist/RadioGroup.js +22 -22
  27. package/dist/RadioInput.cjs +1 -1
  28. package/dist/RadioInput.js +13 -13
  29. package/dist/Table.cjs +1 -1
  30. package/dist/Table.js +1 -1
  31. package/dist/TextAreaInput.cjs +1 -1
  32. package/dist/TextAreaInput.js +1 -1
  33. package/dist/TextInput.cjs +17 -17
  34. package/dist/TextInput.js +1 -1
  35. package/dist/TimeInput.cjs +1 -1
  36. package/dist/TimeInput.js +1 -1
  37. package/dist/UrgentSaleProductsSection.cjs +1 -1
  38. package/dist/UrgentSaleProductsSection.js +1 -1
  39. package/dist/{suspense-product-card-detailed-Z0emIstD.js → suspense-product-card-detailed-Bez9UFMR.js} +61 -49
  40. package/dist/suspense-product-card-detailed-Yjo62f1v.cjs +124 -0
  41. package/package.json +1 -1
  42. package/dist/suspense-product-card-detailed-EXZJLtNh.cjs +0 -114
@@ -1,10 +1,10 @@
1
- import { jsxs as t, jsx as e, Fragment as h } from "react/jsx-runtime";
2
- import { forwardRef as c, Suspense as $ } from "react";
3
- import { p as y, t as g, o as s, l as S, q as P, G as C } from "./utils-WHYrEnYF.js";
4
- import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { P as z } from "./index-DQyZFR-C.js";
6
- import { M as D } from "./consts-BuFChS64.js";
7
- const u = f.div`
1
+ import { jsxs as i, jsx as e, Fragment as w } from "react/jsx-runtime";
2
+ import { forwardRef as p, Suspense as P } from "react";
3
+ import { p as z, t as h, o as s, l as C, q as f, G as u } from "./utils-WHYrEnYF.js";
4
+ import { s as x } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
+ import { P as D } from "./index-DQyZFR-C.js";
6
+ import { M as j } from "./consts-BuFChS64.js";
7
+ const v = x.div`
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  gap: 0.5rem;
@@ -32,20 +32,30 @@ const u = f.div`
32
32
  & .card-title {
33
33
  font-size: 0.875rem;
34
34
  font-weight: 600;
35
- ${y(2)}
35
+ ${z(2)}
36
36
  }
37
37
 
38
38
  & .price-text {
39
39
  font-size: 1rem;
40
40
  font-weight: 600;
41
- ${g()}
41
+ ${h()}
42
+ display: flex;
43
+ align-items: end;
44
+ gap: 0.5rem;
45
+ & .full-price {
46
+ text-decoration: line-through;
47
+ font-size: 0.75rem;
48
+ font-weight: 400;
49
+ padding-bottom: 0.125rem;
50
+ color: var(--gray-600, #676e79);
51
+ }
42
52
  }
43
53
 
44
54
  & .location-text {
45
55
  font-size: 0.75rem;
46
56
  font-weight: 400;
47
57
  color: var(--gray-600, #676e79);
48
- ${g()}
58
+ ${h()}
49
59
  }
50
60
 
51
61
  & .tags-wrapper {
@@ -89,7 +99,7 @@ const u = f.div`
89
99
  height: 1rem;
90
100
  }
91
101
 
92
- @media (max-width: ${D + "px"}) {
102
+ @media (max-width: ${j + "px"}) {
93
103
  & img {
94
104
  width: 8.875rem;
95
105
  height: 8.875rem;
@@ -105,7 +115,7 @@ const u = f.div`
105
115
  font-weight: 600;
106
116
  }
107
117
  }
108
- `, j = f.div`
118
+ `, F = x.div`
109
119
  display: flex;
110
120
  align-items: center;
111
121
  gap: 0.25rem;
@@ -117,74 +127,76 @@ const u = f.div`
117
127
  font-size: 1rem;
118
128
  color: var(--warning-500, #F59E0B);
119
129
  }
120
- `, F = c(({ sponsoredText: r = "Sponsored" }, i) => /* @__PURE__ */ t(j, { ref: i, className: "sponsored-line", children: [
130
+ `, I = p(({ sponsoredText: r = "Sponsored" }, a) => /* @__PURE__ */ i(F, { ref: a, className: "sponsored-line", children: [
121
131
  /* @__PURE__ */ e("i", { className: "mng-lnc-paw2" }),
122
132
  /* @__PURE__ */ e("span", { children: r })
123
- ] })), R = c((r, i) => {
133
+ ] })), U = p((r, a) => {
124
134
  const {
125
135
  uuid: o,
126
136
  title: n,
127
- price: a = 0,
128
- currency: d,
129
- isNegotiable: l,
137
+ price: t = 0,
138
+ sellingPrice: c,
139
+ currency: l,
140
+ isNegotiable: d,
130
141
  isFree: m,
131
- imageUrl: w,
132
- sellerUuid: E,
133
- location: x,
134
- isSponsored: k,
135
- imageComponent: p,
136
- onSelectCard: v = () => {
142
+ imageUrl: k,
143
+ sellerUuid: G,
144
+ location: N,
145
+ isSponsored: $,
146
+ imageComponent: g,
147
+ onSelectCard: b = () => {
137
148
  },
138
- freeText: N = "Free",
139
- negotiableText: b = "Negotiable"
149
+ freeText: y = "Free",
150
+ negotiableText: S = "Negotiable"
140
151
  } = r;
141
152
  return (
142
153
  // <LandingPageProductCardSkeleton />
143
- /* @__PURE__ */ t(u, { className: "product-card", onClick: v, children: [
144
- S(p) ? p : /* @__PURE__ */ e(z, { src: w }),
154
+ /* @__PURE__ */ i(v, { className: "product-card", onClick: b, children: [
155
+ C(g) ? g : /* @__PURE__ */ e(D, { src: k }),
145
156
  /* @__PURE__ */ e("div", { className: "wrapper-card-1", children: /* @__PURE__ */ e("div", { className: "card-title", children: n }) }),
146
- /* @__PURE__ */ t("div", { className: "wrapper-card-2", children: [
147
- /* @__PURE__ */ t("div", { className: "price-text", children: [
148
- a > 0 && d && l !== !0 && m !== !0 && `${P(a)} ${C(d)}`,
149
- l && b,
150
- m && N
157
+ /* @__PURE__ */ i("div", { className: "wrapper-card-2", children: [
158
+ /* @__PURE__ */ i("div", { className: "price-text", children: [
159
+ c > 0 && l && d !== !0 && m !== !0 && /* @__PURE__ */ e("div", { children: `${f(c)} ${u(l)}` }),
160
+ t > 0 && l && d !== !0 && m !== !0 && t !== c && /* @__PURE__ */ e("div", { className: `${c > 0 ? "full-price" : ""}`, children: `${f(t)} ${u(l)}` }),
161
+ d && S,
162
+ m && y
151
163
  ] }),
152
- /* @__PURE__ */ e("div", { className: "location-text", children: x })
164
+ /* @__PURE__ */ e("div", { className: "location-text", children: N })
153
165
  ] }),
154
- k === !0 && /* @__PURE__ */ e(F, {})
166
+ $ === !0 && /* @__PURE__ */ e(I, {})
155
167
  ] })
156
168
  );
157
- }), I = c(({}, r) => /* @__PURE__ */ t(u, { className: "product-card", children: [
169
+ }), T = p(({}, r) => /* @__PURE__ */ i(v, { className: "product-card", children: [
158
170
  /* @__PURE__ */ e("img", { className: "skeleton-img" }),
159
- /* @__PURE__ */ t("div", { className: "wrapper-card-1", children: [
171
+ /* @__PURE__ */ i("div", { className: "wrapper-card-1", children: [
160
172
  /* @__PURE__ */ e("div", { className: "skeleton-title" }),
161
173
  /* @__PURE__ */ e("div", { className: "skeleton-tags" })
162
174
  ] }),
163
- /* @__PURE__ */ t("div", { className: "wrapper-card-1", children: [
175
+ /* @__PURE__ */ i("div", { className: "wrapper-card-1", children: [
164
176
  /* @__PURE__ */ e("div", { className: "skeleton-price" }),
165
177
  /* @__PURE__ */ e("div", { className: "skeleton-sponsored" })
166
178
  ] })
167
- ] })), T = ({ limit: r = 5, isLoading: i = !1, keyPrefix: o }) => /* @__PURE__ */ e(h, { children: Array.from({ length: r }, (n, a) => /* @__PURE__ */ e(
168
- I,
179
+ ] })), E = ({ limit: r = 5, isLoading: a = !1, keyPrefix: o }) => /* @__PURE__ */ e(w, { children: Array.from({ length: r }, (n, t) => /* @__PURE__ */ e(
180
+ T,
169
181
  {
170
- isLoading: i
182
+ isLoading: a
171
183
  },
172
- `${o}-skeleton-product-card-${a}`
173
- )) }), U = ({
184
+ `${o}-skeleton-product-card-${t}`
185
+ )) }), q = ({
174
186
  children: r,
175
- fallbackComponent: i = /* @__PURE__ */ e(h, {}),
187
+ fallbackComponent: a = /* @__PURE__ */ e(w, {}),
176
188
  isLoading: o = !1,
177
189
  limit: n,
178
- keyPrefix: a
179
- }) => /* @__PURE__ */ e($, { fallbackComponent: i, children: o === !0 ? /* @__PURE__ */ e(
180
- T,
190
+ keyPrefix: t
191
+ }) => /* @__PURE__ */ e(P, { fallbackComponent: a, children: o === !0 ? /* @__PURE__ */ e(
192
+ E,
181
193
  {
182
194
  isLoading: o,
183
195
  limit: n,
184
- keyPrefix: a
196
+ keyPrefix: t
185
197
  }
186
198
  ) : r });
187
199
  export {
188
- R as D,
189
- U as S
200
+ U as D,
201
+ q as S
190
202
  };
@@ -0,0 +1,124 @@
1
+ "use strict";const e=require("react/jsx-runtime"),d=require("react"),r=require("./utils-BOtq2mcF.cjs"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./index-XrPpEvxt.cjs"),y=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
+ &:hover {
61
+ & .card-title {
62
+ color: var(--primary-500, #f59e0b);
63
+ }
64
+ }
65
+
66
+ & .skeleton-img {
67
+ background-color: ${r.linearGradientAnimation("-90deg")};
68
+ border-radius: 0.75rem;
69
+ border: 1px solid white;
70
+ }
71
+
72
+ & .skeleton-title {
73
+ background-color: ${r.linearGradientAnimation("-90deg")};
74
+ width: 100%;
75
+ height: 2.5rem;
76
+ }
77
+
78
+ & .skeleton-tags {
79
+ background-color: ${r.linearGradientAnimation("-90deg")};
80
+ width: 80%;
81
+ height: 1.5rem;
82
+ }
83
+
84
+ & .skeleton-price {
85
+ background-color: ${r.linearGradientAnimation("-90deg")};
86
+ width: 50%;
87
+ height: 2.5rem;
88
+ }
89
+
90
+ & .skeleton-sponsored {
91
+ background-color: ${r.linearGradientAnimation("-90deg")};
92
+ width: 50%;
93
+ height: 1rem;
94
+ }
95
+
96
+ @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
97
+ & img {
98
+ width: 8.875rem;
99
+ height: 8.875rem;
100
+ min-width: 8.875rem;
101
+ min-height: 8.875rem;
102
+ min-width: 8.875rem;
103
+ min-height: 8.875rem;
104
+ object-fit: cover;
105
+ }
106
+
107
+ & .price-text {
108
+ font-size: 0.875rem;
109
+ font-weight: 600;
110
+ }
111
+ }
112
+ `,N=g.styled.div`
113
+ display: flex;
114
+ align-items: center;
115
+ gap: 0.25rem;
116
+ color: var(--gray-500);
117
+ font-size: 0.75rem;
118
+ font-weight: 500;
119
+
120
+ & i {
121
+ font-size: 1rem;
122
+ color: var(--warning-500, #F59E0B);
123
+ }
124
+ `,b=d.forwardRef(({sponsoredText:t="Sponsored"},s)=>e.jsxs(N,{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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.95",
3
+ "version": "4.0.96",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -1,114 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),o=require("react"),r=require("./utils-BOtq2mcF.cjs"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./index-XrPpEvxt.cjs"),v=require("./consts-goSZX3xP.cjs"),g=p.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
- }
37
-
38
- & .location-text {
39
- font-size: 0.75rem;
40
- font-weight: 400;
41
- color: var(--gray-600, #676e79);
42
- ${r.truncateText()}
43
- }
44
-
45
- & .tags-wrapper {
46
- display: flex;
47
- gap: 0.5rem;
48
- }
49
-
50
- &:hover {
51
- & .card-title {
52
- color: var(--primary-500, #f59e0b);
53
- }
54
- }
55
-
56
- & .skeleton-img {
57
- background-color: ${r.linearGradientAnimation("-90deg")};
58
- border-radius: 0.75rem;
59
- border: 1px solid white;
60
- }
61
-
62
- & .skeleton-title {
63
- background-color: ${r.linearGradientAnimation("-90deg")};
64
- width: 100%;
65
- height: 2.5rem;
66
- }
67
-
68
- & .skeleton-tags {
69
- background-color: ${r.linearGradientAnimation("-90deg")};
70
- width: 80%;
71
- height: 1.5rem;
72
- }
73
-
74
- & .skeleton-price {
75
- background-color: ${r.linearGradientAnimation("-90deg")};
76
- width: 50%;
77
- height: 2.5rem;
78
- }
79
-
80
- & .skeleton-sponsored {
81
- background-color: ${r.linearGradientAnimation("-90deg")};
82
- width: 50%;
83
- height: 1rem;
84
- }
85
-
86
- @media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
87
- & img {
88
- width: 8.875rem;
89
- height: 8.875rem;
90
- min-width: 8.875rem;
91
- min-height: 8.875rem;
92
- min-width: 8.875rem;
93
- min-height: 8.875rem;
94
- object-fit: cover;
95
- }
96
-
97
- & .price-text {
98
- font-size: 0.875rem;
99
- font-weight: 600;
100
- }
101
- }
102
- `,N=p.styled.div`
103
- display: flex;
104
- align-items: center;
105
- gap: 0.25rem;
106
- color: var(--gray-500);
107
- font-size: 0.75rem;
108
- font-weight: 500;
109
-
110
- & i {
111
- font-size: 1rem;
112
- color: var(--warning-500, #F59E0B);
113
- }
114
- `,b=o.forwardRef(({sponsoredText:t="Sponsored"},i)=>e.jsxs(N,{ref:i,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:t})]})),y=o.forwardRef((t,i)=>{const{uuid:a,title:n,price:s=0,currency:c,isNegotiable:d,isFree:l,imageUrl:u,sellerUuid:P,location:h,isSponsored:x,imageComponent:m,onSelectCard:f=()=>{},freeText:w="Free",negotiableText:j="Negotiable"}=t;return e.jsxs(g,{className:"product-card",onClick:f,children:[r.isDefined(m)?m:e.jsx(k.ProductImageWrapper,{src:u}),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:[s>0&&c&&d!==!0&&l!==!0&&`${r.formatPrice(s)} ${r.GetCurrencySymbol(c)}`,d&&j,l&&w]}),e.jsx("div",{className:"location-text",children:h})]}),x===!0&&e.jsx(b,{})]})}),$=o.forwardRef(({},t)=>e.jsxs(g,{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"})]})]})),S=({limit:t=5,isLoading:i=!1,keyPrefix:a})=>e.jsx(e.Fragment,{children:Array.from({length:t},(n,s)=>e.jsx($,{isLoading:i},`${a}-skeleton-product-card-${s}`))}),C=({children:t,fallbackComponent:i=e.jsx(e.Fragment,{}),isLoading:a=!1,limit:n,keyPrefix:s})=>e.jsx(o.Suspense,{fallbackComponent:i,children:a===!0?e.jsx(S,{isLoading:a,limit:n,keyPrefix:s}):t});exports.DetailedProductCard=y;exports.SuspenseDetailedProductCard=C;