@lanaco/lnc-react-ui 4.0.25 → 4.0.26

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.
package/dist/index10.cjs CHANGED
@@ -1,78 +1,49 @@
1
- "use strict";const i=require("react/jsx-runtime"),w=require("react"),g=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),y=require("./consts-dNz9tpt4.cjs"),v=require("./useDetectMobile-rBe0FiP2.cjs"),c=require("./utils-CE6bljYe.cjs"),k=require("./index-C2M7QHPq.cjs"),j=g.newStyled.div`
2
- display: grid;
3
- grid-template-columns: repeat(6, 1fr);
4
- gap: 1.25rem;
1
+ "use strict";const i=require("react/jsx-runtime"),p=require("react"),c=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),g=require("./consts-dNz9tpt4.cjs"),b=require("./useDetectMobile-rBe0FiP2.cjs"),f=require("./style-C3OB0uad.cjs"),a=require("./utils-CE6bljYe.cjs"),j=c.newStyled.div`
2
+ width: 100%;
3
+ height: 22.5rem;
4
+ min-height: 22.5rem;
5
+ max-height: 22.5rem;
6
+ overflow: hidden;
7
+ box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
8
+ 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
9
+ border: 1px solid var(--gray-95008, #14161a14);
10
+ border-radius: 0.75rem;
11
+ margin-bottom: 0.5rem;
5
12
 
6
- & .text-block-v1 {
7
- grid-column: 1 / 4;
8
- max-width: 27rem;
9
- margin: auto;
13
+ & img {
14
+ width: 100%;
15
+ height: 100%;
16
+ object-fit: cover;
10
17
  }
18
+ `,v=c.newStyled.div`
19
+ display: grid;
20
+ grid-template-columns: ${o=>`repeat(${o.limit}, minmax(0, 1fr))`};
21
+ gap: 1.25rem;
11
22
 
12
- @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
13
- grid-template-columns: repeat(2, 1fr);
14
-
15
- & .text-block-v1 {
16
- grid-column: 1 / 3;
17
- max-width: unset;
18
- margin: unset;
19
- }
23
+ @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
24
+ display: flex;
25
+ gap: 1rem;
26
+ overflow-x: auto;
20
27
 
21
- & .simple-product-card {
22
- max-width: unset;
23
- min-width: unset;
24
- width: unset;
28
+ -webkit-overflow-scrolling: touch;
29
+ ::-webkit-scrollbar {
30
+ -webkit-appearance: none;
25
31
  }
32
+ -ms-overflow-style: none;
33
+ /* Internet Explorer 10+ */
34
+ scrollbar-width: none;
35
+ /* Firefox */
26
36
 
27
- & .img-wrapper {
28
-
37
+ &::-webkit-scrollbar {
38
+ display: none;
39
+ /* Safari and Chrome */
29
40
  }
30
41
  }
31
- `;g.newStyled.div`
32
- background-color: var(--gray-200, #dddfe4);
33
- border-radius: 0.75rem;
34
- min-width: 11.625rem;
35
- min-height: 11.625rem;
36
- max-width: 11.625rem;
37
- max-height: 11.625rem;
38
- ${c.linearGradientAnimation("-90deg")}
39
- `;const S=g.newStyled.div`
42
+ `,y=c.newStyled.div`
40
43
  display: flex;
41
44
  flex-direction: column;
42
- justify-content: end;
43
- position: relative;
44
- border-radius: 0.75rem;
45
- overflow: hidden;
45
+ gap: 0.5rem;
46
46
  cursor: pointer;
47
- background: linear-gradient(
48
- 178deg,
49
- rgba(0, 0, 0, 0) 1.5%,
50
- rgba(0, 0, 0, 0.16) 8.95%,
51
- #000 98.39%
52
- );
53
-
54
- & .text-block {
55
- padding: 0.75rem;
56
- z-index: 1;
57
- display: flex;
58
- flex-direction: column;
59
- gap: 0.5rem;
60
- position: absolute;
61
- bottom: 0rem;
62
- left: 0rem;
63
- }
64
- & .img-wrapper {
65
- position: absolute;
66
- top: 0;
67
- left: 0;
68
- z-index: 0;
69
- background: linear-gradient(
70
- 178deg,
71
- rgba(0, 0, 0, 0) 1.5%,
72
- rgba(0, 0, 0, 0.16) 8.95%,
73
- #000 98.39%
74
- );
75
- }
76
47
 
77
48
  & img {
78
49
  width: 100%;
@@ -81,37 +52,39 @@
81
52
  border-radius: 0.75rem;
82
53
  }
83
54
 
84
- & .fallback-image {
85
- mix-blend-mode: multiply;
55
+ & .card-title {
56
+ font-size: 0.875rem;
57
+ font-weight: 600;
58
+ ${a.truncateTextInRows(2)}
86
59
  }
87
60
 
88
- font-size: 0.875rem;
89
- font-weight: 500;
90
- & .price-chip {
91
- font-size: 0.75rem;
92
- font-weight: 500;
93
- padding: 0 0.38rem;
94
- min-height: 1.25rem;
95
- max-height: 1.25rem;
96
- width: fit-content;
97
- display: flex;
98
- align-items: center;
99
- justify-content: center;
100
- border-radius: 62.4375rem;
101
- z-index: 1;
102
- background-color: var(--white, #fff);
103
- color: var(--gray-950, #14161A);
61
+ &:hover {
62
+ & .card-title {
63
+ color: var(--primary-500, #F59E0B);
64
+ }
104
65
  }
105
- & .title-simple-product-card {
106
- z-index: 1;
107
- color: var(--white, #fff);
108
- transition: all 0.2s ease;
66
+
67
+ & .skeleton-img {
68
+ background-color: ${a.linearGradientAnimation("-90deg")};
69
+ border-radius: 0.75rem;
70
+ border: 1px solid white;
109
71
  }
110
72
 
111
- &:hover {
112
- & .title-simple-product-card {
113
- z-index: 1;
114
- color: var(--primary-500, #F59E0B);
73
+ & .skeleton-title {
74
+ background-color: ${a.linearGradientAnimation("-90deg")};
75
+ width: 100%;
76
+ height: 1.25rem;
77
+ }
78
+
79
+ @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
80
+ & img {
81
+ width: 8.875rem;
82
+ height: 8.875rem;
83
+ min-width: 8.875rem;
84
+ min-height: 8.875rem;
85
+ min-width: 8.875rem;
86
+ min-height: 8.875rem;
87
+ object-fit: cover;
115
88
  }
116
89
  }
117
- `,h=w.forwardRef((s,f)=>{const{uuid:b,title:l,price:d,currency:a,isNegotiable:m,isFree:r,image:u,sellerUuid:t,onSelectCard:p=()=>{},imageComponent:n,negotiableText:e="Negotiable",freeText:o="Free"}=s;return i.jsxs(S,{className:"simple-product-card",onClick:p,children:[c.isDefined(n)?n:i.jsx("img",{src:u}),i.jsxs("div",{className:"text-block",children:[i.jsx("div",{className:"title-simple-product-card",children:l}),i.jsxs("div",{className:"price-chip",children:[d&&a&&`${c.formatPrice(d)} ${c.GetCurrencySymbol(a)}`,m&&e,r&&o]})]})]})}),q=w.forwardRef((s,f)=>{var n;const{title:b,subtitle:l,description:d,buttonText:a,buttonLink:m,items:r,onButtonAction:u=()=>{},onSelectCard:t=()=>{}}=s,p=v.useDetectMobile();return i.jsxs(j,{ref:f,limit:6,children:[i.jsx(k.TextBlockV1,{subtitle:l,title:b,description:d,buttonText:a,buttonLink:m,onButtonAction:u,className:"text-block-v1"}),p===!0?(n=r==null?void 0:r.slice(0,4))==null?void 0:n.map((e,o)=>i.jsx(h,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid)},o)):r==null?void 0:r.map((e,o)=>i.jsx(h,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid)},o))]})});module.exports=q;
90
+ `,h=p.forwardRef((o,m)=>{const{uuid:d,title:r,image:n,sellerUuid:u,onSelectCard:t=()=>{},imageComponent:s}=o;return i.jsxs(y,{className:"product-card",onClick:t,children:[a.isDefined(s)?s:i.jsx("img",{src:n}),i.jsx("div",{className:"card-title",children:r})]})}),S=p.forwardRef((o,m)=>{const{icon:d,items:r,limit:n=4,bannerImage:u,onSelectCard:t=()=>{},title:s="Season inspiration"}=o,w=b.useDetectMobile();return i.jsxs(f.RegulatTitleSectionWrapper,{ref:m,children:[i.jsx("div",{className:"regular-title",children:i.jsxs("div",{className:"regular-title-text",children:[a.isDefinedNotEmptyString(d)&&i.jsx("i",{className:d}),i.jsx("span",{children:s})]})}),i.jsx(j,{className:"products-banner",children:i.jsx("img",{src:u})}),i.jsx(v,{limit:n,children:w===!0?r==null?void 0:r.map((e,l)=>i.jsx(h,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid)},l)):r==null?void 0:r.slice(0,n).map((e,l)=>i.jsx(h,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid)},l))})]})});module.exports=S;
package/dist/index10.js CHANGED
@@ -1,87 +1,56 @@
1
- import { jsxs as l, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as w } from "react";
3
- import { n as g } from "./emotion-styled.browser.esm-BiK8DcgW.js";
4
- import { M as v } from "./consts-DNVz1x1I.js";
5
- import { u as y } from "./useDetectMobile-BookNOsk.js";
6
- import { m as k, l as z, n as N, G as S } from "./utils-DtEdJZWa.js";
7
- import { T as j } from "./index-DcYg32le.js";
8
- const T = g.div`
9
- display: grid;
10
- grid-template-columns: repeat(6, 1fr);
11
- gap: 1.25rem;
1
+ import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as g } from "react";
3
+ import { n as s } from "./emotion-styled.browser.esm-BiK8DcgW.js";
4
+ import { M as f } from "./consts-DNVz1x1I.js";
5
+ import { u as w } from "./useDetectMobile-BookNOsk.js";
6
+ import { R as v } from "./style-Ch-xOasu.js";
7
+ import { t as k, m as h, l as y, k as N } from "./utils-DtEdJZWa.js";
8
+ const S = s.div`
9
+ width: 100%;
10
+ height: 22.5rem;
11
+ min-height: 22.5rem;
12
+ max-height: 22.5rem;
13
+ overflow: hidden;
14
+ box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
15
+ 0px 1px 2px 0px rgba(0, 0, 0, 0.06);
16
+ border: 1px solid var(--gray-95008, #14161a14);
17
+ border-radius: 0.75rem;
18
+ margin-bottom: 0.5rem;
12
19
 
13
- & .text-block-v1 {
14
- grid-column: 1 / 4;
15
- max-width: 27rem;
16
- margin: auto;
20
+ & img {
21
+ width: 100%;
22
+ height: 100%;
23
+ object-fit: cover;
17
24
  }
25
+ `, $ = s.div`
26
+ display: grid;
27
+ grid-template-columns: ${(a) => `repeat(${a.limit}, minmax(0, 1fr))`};
28
+ gap: 1.25rem;
18
29
 
19
- @media (max-width: ${v + "px"}) {
20
- grid-template-columns: repeat(2, 1fr);
21
-
22
- & .text-block-v1 {
23
- grid-column: 1 / 3;
24
- max-width: unset;
25
- margin: unset;
26
- }
30
+ @media (max-width: ${f + "px"}) {
31
+ display: flex;
32
+ gap: 1rem;
33
+ overflow-x: auto;
27
34
 
28
- & .simple-product-card {
29
- max-width: unset;
30
- min-width: unset;
31
- width: unset;
35
+ -webkit-overflow-scrolling: touch;
36
+ ::-webkit-scrollbar {
37
+ -webkit-appearance: none;
32
38
  }
39
+ -ms-overflow-style: none;
40
+ /* Internet Explorer 10+ */
41
+ scrollbar-width: none;
42
+ /* Firefox */
33
43
 
34
- & .img-wrapper {
35
-
44
+ &::-webkit-scrollbar {
45
+ display: none;
46
+ /* Safari and Chrome */
36
47
  }
37
48
  }
38
- `;
39
- g.div`
40
- background-color: var(--gray-200, #dddfe4);
41
- border-radius: 0.75rem;
42
- min-width: 11.625rem;
43
- min-height: 11.625rem;
44
- max-width: 11.625rem;
45
- max-height: 11.625rem;
46
- ${k("-90deg")}
47
- `;
48
- const U = g.div`
49
+ `, j = s.div`
49
50
  display: flex;
50
51
  flex-direction: column;
51
- justify-content: end;
52
- position: relative;
53
- border-radius: 0.75rem;
54
- overflow: hidden;
52
+ gap: 0.5rem;
55
53
  cursor: pointer;
56
- background: linear-gradient(
57
- 178deg,
58
- rgba(0, 0, 0, 0) 1.5%,
59
- rgba(0, 0, 0, 0.16) 8.95%,
60
- #000 98.39%
61
- );
62
-
63
- & .text-block {
64
- padding: 0.75rem;
65
- z-index: 1;
66
- display: flex;
67
- flex-direction: column;
68
- gap: 0.5rem;
69
- position: absolute;
70
- bottom: 0rem;
71
- left: 0rem;
72
- }
73
- & .img-wrapper {
74
- position: absolute;
75
- top: 0;
76
- left: 0;
77
- z-index: 0;
78
- background: linear-gradient(
79
- 178deg,
80
- rgba(0, 0, 0, 0) 1.5%,
81
- rgba(0, 0, 0, 0.16) 8.95%,
82
- #000 98.39%
83
- );
84
- }
85
54
 
86
55
  & img {
87
56
  width: 100%;
@@ -90,120 +59,94 @@ const U = g.div`
90
59
  border-radius: 0.75rem;
91
60
  }
92
61
 
93
- & .fallback-image {
94
- mix-blend-mode: multiply;
62
+ & .card-title {
63
+ font-size: 0.875rem;
64
+ font-weight: 600;
65
+ ${k(2)}
95
66
  }
96
67
 
97
- font-size: 0.875rem;
98
- font-weight: 500;
99
- & .price-chip {
100
- font-size: 0.75rem;
101
- font-weight: 500;
102
- padding: 0 0.38rem;
103
- min-height: 1.25rem;
104
- max-height: 1.25rem;
105
- width: fit-content;
106
- display: flex;
107
- align-items: center;
108
- justify-content: center;
109
- border-radius: 62.4375rem;
110
- z-index: 1;
111
- background-color: var(--white, #fff);
112
- color: var(--gray-950, #14161A);
68
+ &:hover {
69
+ & .card-title {
70
+ color: var(--primary-500, #F59E0B);
71
+ }
72
+ }
73
+
74
+ & .skeleton-img {
75
+ background-color: ${h("-90deg")};
76
+ border-radius: 0.75rem;
77
+ border: 1px solid white;
113
78
  }
114
- & .title-simple-product-card {
115
- z-index: 1;
116
- color: var(--white, #fff);
117
- transition: all 0.2s ease;
79
+
80
+ & .skeleton-title {
81
+ background-color: ${h("-90deg")};
82
+ width: 100%;
83
+ height: 1.25rem;
118
84
  }
119
85
 
120
- &:hover {
121
- & .title-simple-product-card {
122
- z-index: 1;
123
- color: var(--primary-500, #F59E0B);
86
+ @media (max-width: ${f + "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;
124
95
  }
125
96
  }
126
- `, b = w((m, f) => {
97
+ `, u = g((a, c) => {
127
98
  const {
128
- uuid: h,
129
- title: c,
130
- price: d,
131
- currency: n,
132
- isNegotiable: s,
133
- isFree: i,
134
- image: u,
135
- sellerUuid: r,
136
- onSelectCard: p = () => {
99
+ uuid: l,
100
+ title: i,
101
+ image: o,
102
+ sellerUuid: p,
103
+ onSelectCard: t = () => {
137
104
  },
138
- imageComponent: t,
139
- negotiableText: e = "Negotiable",
140
- freeText: o = "Free"
141
- } = m;
142
- return /* @__PURE__ */ l(U, { className: "simple-product-card", onClick: p, children: [
143
- z(t) ? t : /* @__PURE__ */ a("img", { src: u }),
144
- /* @__PURE__ */ l("div", { className: "text-block", children: [
145
- /* @__PURE__ */ a("div", { className: "title-simple-product-card", children: c }),
146
- /* @__PURE__ */ l("div", { className: "price-chip", children: [
147
- d && n && `${N(d)} ${S(n)}`,
148
- s && e,
149
- i && o
150
- ] })
151
- ] })
105
+ imageComponent: d
106
+ } = a;
107
+ return /* @__PURE__ */ m(j, { className: "product-card", onClick: t, children: [
108
+ y(d) ? d : /* @__PURE__ */ r("img", { src: o }),
109
+ /* @__PURE__ */ r("div", { className: "card-title", children: i })
152
110
  ] });
153
- }), E = w((m, f) => {
154
- var t;
111
+ }), P = g((a, c) => {
155
112
  const {
156
- title: h,
157
- subtitle: c,
158
- description: d,
159
- buttonText: n,
160
- buttonLink: s,
113
+ icon: l,
161
114
  items: i,
162
- onButtonAction: u = () => {
115
+ limit: o = 4,
116
+ bannerImage: p,
117
+ onSelectCard: t = () => {
163
118
  },
164
- onSelectCard: r = () => {
165
- }
166
- } = m, p = y();
167
- return /* @__PURE__ */ l(T, { ref: f, limit: 6, children: [
168
- /* @__PURE__ */ a(
169
- j,
170
- {
171
- subtitle: c,
172
- title: h,
173
- description: d,
174
- buttonText: n,
175
- buttonLink: s,
176
- onButtonAction: u,
177
- className: "text-block-v1"
178
- }
179
- ),
180
- p === !0 ? (t = i == null ? void 0 : i.slice(0, 4)) == null ? void 0 : t.map((e, o) => /* @__PURE__ */ a(
181
- b,
119
+ title: d = "Season inspiration"
120
+ } = a, b = w();
121
+ return /* @__PURE__ */ m(v, { ref: c, children: [
122
+ /* @__PURE__ */ r("div", { className: "regular-title", children: /* @__PURE__ */ m("div", { className: "regular-title-text", children: [
123
+ N(l) && /* @__PURE__ */ r("i", { className: l }),
124
+ /* @__PURE__ */ r("span", { children: d })
125
+ ] }) }),
126
+ /* @__PURE__ */ r(S, { className: "products-banner", children: /* @__PURE__ */ r("img", { src: p }) }),
127
+ /* @__PURE__ */ r($, { limit: o, children: b === !0 ? i == null ? void 0 : i.map((e, n) => /* @__PURE__ */ r(
128
+ u,
182
129
  {
183
130
  title: e == null ? void 0 : e.title,
184
- price: e == null ? void 0 : e.price,
185
- currency: e == null ? void 0 : e.currency,
186
131
  image: e == null ? void 0 : e.image,
187
132
  sellerUuid: e == null ? void 0 : e.sellerUuid,
188
133
  uuid: e == null ? void 0 : e.uuid,
189
- onSelectCard: () => r == null ? void 0 : r(e == null ? void 0 : e.uuid)
134
+ onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
190
135
  },
191
- o
192
- )) : i == null ? void 0 : i.map((e, o) => /* @__PURE__ */ a(
193
- b,
136
+ n
137
+ )) : i == null ? void 0 : i.slice(0, o).map((e, n) => /* @__PURE__ */ r(
138
+ u,
194
139
  {
195
140
  title: e == null ? void 0 : e.title,
196
- price: e == null ? void 0 : e.price,
197
- currency: e == null ? void 0 : e.currency,
198
141
  image: e == null ? void 0 : e.image,
199
142
  sellerUuid: e == null ? void 0 : e.sellerUuid,
200
143
  uuid: e == null ? void 0 : e.uuid,
201
- onSelectCard: () => r == null ? void 0 : r(e == null ? void 0 : e.uuid)
144
+ onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
202
145
  },
203
- o
204
- ))
146
+ n
147
+ )) })
205
148
  ] });
206
149
  });
207
150
  export {
208
- E as default
151
+ P as default
209
152
  };