@lanaco/lnc-react-ui 4.0.140 → 4.0.142

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,13 +1,13 @@
1
- "use strict";const t=require("react/jsx-runtime"),s=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./consts-goSZX3xP.cjs"),U=require("./Button.cjs"),C=require("./utils-Dl9xPH4c.cjs"),M=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./style-CyHewQxg.cjs"),f=require("./suspense-product-card-detailed-C7_tBl85.cjs"),F=require("./index-D0xXo7W6.cjs"),E=v.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),a=require("react"),U=require("./emotion-styled.browser.esm-BtEseadx.cjs"),F=require("./consts-goSZX3xP.cjs"),L=require("./Button.cjs"),h=require("./utils-Dl9xPH4c.cjs"),M=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./style-CyHewQxg.cjs"),j=require("./suspense-product-card-detailed-BA06QK8a.cjs"),B=require("./index-D0xXo7W6.cjs"),E=U.styled.div`
2
2
  display: grid;
3
- grid-template-columns: ${l=>`repeat(${l.limit}, minmax(0, 1fr))`};
3
+ grid-template-columns: ${s=>`repeat(${s.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
5
5
 
6
6
  & .button-link {
7
7
  white-space: nowrap;
8
8
  }
9
9
 
10
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
10
+ @media (max-width: ${F.MOBILE_SIZE_PX+"px"}) {
11
11
  display: flex;
12
12
  gap: 1rem;
13
13
  overflow-x: auto;
@@ -26,4 +26,4 @@
26
26
  /* Safari and Chrome */
27
27
  }
28
28
  }
29
- `,h=s.memo(f.DetailedProductCard),R=s.forwardRef((l,q)=>{const{icon:a,title:S,buttonLink:c,items:i,buttonText:j,limit:o=4,onSelectCard:d=()=>{},onButtonAction:w=()=>{},isLoading:P=!1,getImage:u=()=>{},negotiableText:m,freeText:g,options:n,onSelectOption:p=()=>{},productsToolbarName:N="All",sponsoredText:b}=l,y=M.useDetectMobile(),k=s.useMemo(()=>t.jsx(t.Fragment,{children:y===!0?i==null?void 0:i.map((e,r)=>t.jsx(h,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,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,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>d(e==null?void 0:e.uuid),imageUrl:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:m,freeText:g,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,trade:e==null?void 0:e.trade,sponsoredText:b},r)):i==null?void 0:i.slice(0,o).map((e,r)=>t.jsx(h,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,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,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>d(e==null?void 0:e.uuid),imageUrl:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:m,freeText:g,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,trade:e==null?void 0:e.trade,sponsoredText:b},r))}),[i,y,o]);return t.jsxs(T.TitleWithOptionsSectionWrapper,{ref:q,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[C.isDefinedNotEmptyString(a)&&t.jsx("i",{className:a}),t.jsx("span",{children:S})]}),C.isDefinedNotEmptyString(c)&&t.jsx(U,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var r;(r=e==null?void 0:e.target)==null||r.blur(),w(c)},borderRadius:"curved",className:"button-link",children:j})]}),(n==null?void 0:n.length)>0&&t.jsx(F.SelectBar,{items:n,onRemove:e=>{p(e)},onSelect:e=>{p(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:N}),t.jsx(E,{limit:o,children:t.jsx(f.SuspenseDetailedProductCard,{isLoading:P,limit:o,keyPrefix:"explore-landing",children:k})})]})});module.exports=R;
29
+ `,f=a.memo(j.DetailedProductCard),R=a.forwardRef((s,q)=>{const{icon:l,title:S,buttonLink:c,items:i,buttonText:w,limit:o=4,onSelectCard:d=()=>{},onButtonAction:P=()=>{},isLoading:N=!1,getImage:u=()=>{},negotiableText:m,freeText:g,options:n,onSelectOption:p=()=>{},productsToolbarName:v="All",sponsoredText:b,onBookmark:k=()=>{},bookmarkComponent:y=t.jsx(t.Fragment,{})}=s,C=M.useDetectMobile(),D=a.useMemo(()=>t.jsx(t.Fragment,{children:C===!0?i==null?void 0:i.map((e,r)=>t.jsx(f,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,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,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>d(e==null?void 0:e.uuid),imageUrl:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:m,freeText:g,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,trade:e==null?void 0:e.trade,sponsoredText:b,onBookmark:k,bookmarkComponent:y,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},r)):i==null?void 0:i.slice(0,o).map((e,r)=>t.jsx(f,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,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,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>d(e==null?void 0:e.uuid),imageUrl:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:m,freeText:g,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,trade:e==null?void 0:e.trade,sponsoredText:b,onBookmark:k,bookmarkComponent:y,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},r))}),[i,C,o]);return t.jsxs(T.TitleWithOptionsSectionWrapper,{ref:q,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[h.isDefinedNotEmptyString(l)&&t.jsx("i",{className:l}),t.jsx("span",{children:S})]}),h.isDefinedNotEmptyString(c)&&t.jsx(L,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var r;(r=e==null?void 0:e.target)==null||r.blur(),P(c)},borderRadius:"curved",className:"button-link",children:w})]}),(n==null?void 0:n.length)>0&&t.jsx(B.SelectBar,{items:n,onRemove:e=>{p(e)},onSelect:e=>{p(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:v}),t.jsx(E,{limit:o,children:t.jsx(j.SuspenseDetailedProductCard,{isLoading:N,limit:o,keyPrefix:"explore-landing",children:D})})]})});module.exports=R;
@@ -1,16 +1,16 @@
1
- import { jsx as i, Fragment as T, jsxs as l } from "react/jsx-runtime";
2
- import { memo as U, forwardRef as M, useMemo as D } from "react";
3
- import { s as F } from "./emotion-styled.browser.esm-BNN1dTl3.js";
1
+ import { jsx as o, Fragment as C, jsxs as l } from "react/jsx-runtime";
2
+ import { memo as M, forwardRef as D, useMemo as F } from "react";
3
+ import { s as B } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import { M as q } from "./consts-BuFChS64.js";
5
- import B from "./Button.js";
6
- import { k as y } from "./utils-BdsZgOUE.js";
7
- import { u as E } from "./useDetectMobile-Bkvj0VMa.js";
8
- import { T as I } from "./style-DFPWLJBr.js";
9
- import { D as L, S as O } from "./suspense-product-card-detailed-DtTXmJJB.js";
10
- import { S as R } from "./index-Dweo-G3H.js";
11
- const W = F.div`
5
+ import E from "./Button.js";
6
+ import { k as h } from "./utils-BdsZgOUE.js";
7
+ import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
8
+ import { T as O } from "./style-DFPWLJBr.js";
9
+ import { D as R, S as W } from "./suspense-product-card-detailed-CUd-EI3U.js";
10
+ import { S as $ } from "./index-Dweo-G3H.js";
11
+ const j = B.div`
12
12
  display: grid;
13
- grid-template-columns: ${(a) => `repeat(${a.limit}, minmax(0, 1fr))`};
13
+ grid-template-columns: ${(n) => `repeat(${n.limit}, minmax(0, 1fr))`};
14
14
  gap: 1.25rem;
15
15
 
16
16
  & .button-link {
@@ -36,30 +36,33 @@ const W = F.div`
36
36
  /* Safari and Chrome */
37
37
  }
38
38
  }
39
- `, C = U(L), J = M((a, h) => {
39
+ `, S = M(R), V = D((n, w) => {
40
40
  const {
41
41
  icon: s,
42
- title: S,
42
+ title: P,
43
43
  buttonLink: d,
44
- items: t,
45
- buttonText: w,
46
- limit: o = 4,
47
- onSelectCard: c = () => {
44
+ items: i,
45
+ buttonText: N,
46
+ limit: t = 4,
47
+ onSelectCard: m = () => {
48
48
  },
49
- onButtonAction: P = () => {
49
+ onButtonAction: v = () => {
50
50
  },
51
- isLoading: k = !1,
52
- getImage: m = () => {
51
+ isLoading: T = !1,
52
+ getImage: c = () => {
53
53
  },
54
54
  negotiableText: u,
55
55
  freeText: p,
56
- options: n,
56
+ options: a,
57
57
  onSelectOption: g = () => {
58
58
  },
59
- productsToolbarName: N = "All",
60
- sponsoredText: b
61
- } = a, f = E(), v = D(() => /* @__PURE__ */ i(T, { children: f === !0 ? t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ i(
62
- C,
59
+ productsToolbarName: U = "All",
60
+ sponsoredText: b,
61
+ onBookmark: k = () => {
62
+ },
63
+ bookmarkComponent: f = /* @__PURE__ */ o(C, {})
64
+ } = n, y = I(), L = F(() => /* @__PURE__ */ o(C, { children: y === !0 ? i == null ? void 0 : i.map((e, r) => /* @__PURE__ */ o(
65
+ S,
63
66
  {
64
67
  title: e == null ? void 0 : e.title,
65
68
  price: e == null ? void 0 : e.price,
@@ -70,8 +73,8 @@ const W = F.div`
70
73
  uuid: e == null ? void 0 : e.uuid,
71
74
  sponsored: e == null ? void 0 : e.sponsored,
72
75
  imageComponent: e == null ? void 0 : e.imageComponent,
73
- onSelectCard: () => c(e == null ? void 0 : e.uuid),
74
- imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
76
+ onSelectCard: () => m(e == null ? void 0 : e.uuid),
77
+ imageUrl: c(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
75
78
  isFree: e == null ? void 0 : e.isFree,
76
79
  isNegotiable: e == null ? void 0 : e.isNegotiable,
77
80
  negotiableText: u,
@@ -81,11 +84,15 @@ const W = F.div`
81
84
  condition: e == null ? void 0 : e.condition,
82
85
  quantity: e == null ? void 0 : e.quantity,
83
86
  trade: e == null ? void 0 : e.trade,
84
- sponsoredText: b
87
+ sponsoredText: b,
88
+ onBookmark: k,
89
+ bookmarkComponent: f,
90
+ bookmarked: e == null ? void 0 : e.bookmarked,
91
+ bookmarkLists: e == null ? void 0 : e.bookmarkLists
85
92
  },
86
93
  r
87
- )) : t == null ? void 0 : t.slice(0, o).map((e, r) => /* @__PURE__ */ i(
88
- C,
94
+ )) : i == null ? void 0 : i.slice(0, t).map((e, r) => /* @__PURE__ */ o(
95
+ S,
89
96
  {
90
97
  title: e == null ? void 0 : e.title,
91
98
  price: e == null ? void 0 : e.price,
@@ -97,8 +104,8 @@ const W = F.div`
97
104
  location: e == null ? void 0 : e.location,
98
105
  sponsored: e == null ? void 0 : e.sponsored,
99
106
  imageComponent: e == null ? void 0 : e.imageComponent,
100
- onSelectCard: () => c(e == null ? void 0 : e.uuid),
101
- imageUrl: m(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
107
+ onSelectCard: () => m(e == null ? void 0 : e.uuid),
108
+ imageUrl: c(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
102
109
  isFree: e == null ? void 0 : e.isFree,
103
110
  isNegotiable: e == null ? void 0 : e.isNegotiable,
104
111
  negotiableText: u,
@@ -108,36 +115,40 @@ const W = F.div`
108
115
  condition: e == null ? void 0 : e.condition,
109
116
  quantity: e == null ? void 0 : e.quantity,
110
117
  trade: e == null ? void 0 : e.trade,
111
- sponsoredText: b
118
+ sponsoredText: b,
119
+ onBookmark: k,
120
+ bookmarkComponent: f,
121
+ bookmarked: e == null ? void 0 : e.bookmarked,
122
+ bookmarkLists: e == null ? void 0 : e.bookmarkLists
112
123
  },
113
124
  r
114
- )) }), [t, f, o]);
115
- return /* @__PURE__ */ l(I, { ref: h, children: [
125
+ )) }), [i, y, t]);
126
+ return /* @__PURE__ */ l(O, { ref: w, children: [
116
127
  /* @__PURE__ */ l("div", { className: "regular-title", children: [
117
128
  /* @__PURE__ */ l("div", { className: "regular-title-text", children: [
118
- y(s) && /* @__PURE__ */ i("i", { className: s }),
119
- /* @__PURE__ */ i("span", { children: S })
129
+ h(s) && /* @__PURE__ */ o("i", { className: s }),
130
+ /* @__PURE__ */ o("span", { children: P })
120
131
  ] }),
121
- y(d) && /* @__PURE__ */ i(
122
- B,
132
+ h(d) && /* @__PURE__ */ o(
133
+ E,
123
134
  {
124
135
  type: "button",
125
136
  btnType: "tinted",
126
137
  color: "neutral",
127
138
  onClick: (e) => {
128
139
  var r;
129
- (r = e == null ? void 0 : e.target) == null || r.blur(), P(d);
140
+ (r = e == null ? void 0 : e.target) == null || r.blur(), v(d);
130
141
  },
131
142
  borderRadius: "curved",
132
143
  className: "button-link",
133
- children: w
144
+ children: N
134
145
  }
135
146
  )
136
147
  ] }),
137
- (n == null ? void 0 : n.length) > 0 && /* @__PURE__ */ i(
138
- R,
148
+ (a == null ? void 0 : a.length) > 0 && /* @__PURE__ */ o(
149
+ $,
139
150
  {
140
- items: n,
151
+ items: a,
141
152
  onRemove: (e) => {
142
153
  g(e);
143
154
  },
@@ -147,20 +158,20 @@ const W = F.div`
147
158
  labelKey: "name",
148
159
  valueKey: "code",
149
160
  noMargin: !0,
150
- productsToolbarName: N
161
+ productsToolbarName: U
151
162
  }
152
163
  ),
153
- /* @__PURE__ */ i(W, { limit: o, children: /* @__PURE__ */ i(
154
- O,
164
+ /* @__PURE__ */ o(j, { limit: t, children: /* @__PURE__ */ o(
165
+ W,
155
166
  {
156
- isLoading: k,
157
- limit: o,
167
+ isLoading: T,
168
+ limit: t,
158
169
  keyPrefix: "explore-landing",
159
- children: v
170
+ children: L
160
171
  }
161
172
  ) })
162
173
  ] });
163
174
  });
164
175
  export {
165
- J as default
176
+ V as default
166
177
  };
@@ -1,11 +1,11 @@
1
- "use strict";const g=require("react/jsx-runtime"),u=require("react"),t=require("./index-BpbMKBf_.cjs"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),y=require("./utils-Dl9xPH4c.cjs"),V=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),X=(e,o,n,c,a)=>{if(e==="right"||e==="left"||o&&n)return"height: 100%;";if(!(o&&a===!0))return o?"height: "+c+";":"height: 0;"},Y=(e,o,n,c,a)=>{if(e==="top"||e==="bottom"||o&&n)return"width: 100%;";if(!(o&&a===!0))return o?"width: "+c+";":"width: 0;"},A=v.styled.div`
1
+ "use strict";const f=require("react/jsx-runtime"),u=require("react"),t=require("./index-BpbMKBf_.cjs"),$=require("./emotion-styled.browser.esm-BtEseadx.cjs"),y=require("./utils-Dl9xPH4c.cjs"),X=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),Y=(e,o,n,c,a)=>{if(e==="right"||e==="left"||o&&n)return"height: 100%;";if(!(o&&a===!0))return o?"height: "+c+";":"height: 0;"},A=(e,o,n,c,a)=>{if(e==="top"||e==="bottom"||o&&n)return"width: 100%;";if(!(o&&a===!0))return o?"width: "+c+";":"width: 0;"},B=$.styled.div`
2
2
  touch-action: none;
3
3
  overflow: auto;
4
4
  max-height: ${e=>e.isOpen||e.unsetHeight===!1?"100dvh":0};
5
- ${e=>X(e.direction,e.isOpen,e.isFullPage,e.drawerSize,e.unsetHeight)}
5
+ ${e=>Y(e.direction,e.isOpen,e.isFullPage,e.drawerSize,e.unsetHeight)}
6
6
  max-width: ${e=>e.isOpen||e.unsetWidth===!1?"100vw":0};
7
- ${e=>Y(e.direction,e.isOpen,e.isFullPage,e.drawerSize,e.unsetWidth)}
8
- position: fixed;
7
+ ${e=>A(e.direction,e.isOpen,e.isFullPage,e.drawerSize,e.unsetWidth)}
8
+ position: ${e=>e.position};
9
9
  z-index: ${e=>e.zIndex};
10
10
  ${e=>e.direction==="bottom"?"bottom: 0":"top: 0"};
11
11
  ${e=>e.direction==="right"?"right: 0":"left: 0"};
@@ -21,13 +21,13 @@
21
21
  background-color: ${e=>y.getColorRgbaValue(e.theme,"Drawer",e.color,"enabled","background")};
22
22
  color: ${e=>y.getColorRgbaValue(e.theme,"Drawer",e.color,"enabled","text")};
23
23
  ${e=>y.getComponentTypographyCss(e.theme,"Drawer",e.size,"enabled")};
24
- `,B=v.styled.div`
24
+ `,G=$.styled.div`
25
25
  z-index: ${e=>e.zIndex};
26
- position: fixed;
26
+ position: ${e=>e.position};
27
27
  top: 0;
28
28
  left: 0;
29
29
 
30
30
  height: ${e=>e.isOpen===!0&&e.enableOverlay===!0?"100dvh":0};
31
31
  width: ${e=>e.isOpen===!0&&e.enableOverlay===!0?"100vw":0};
32
32
  background-color: ${e=>e.overlayColor};
33
- `,$=u.forwardRef((e,o)=>{const{direction:n="right",open:c=!1,duration:a=.8,enableOverlay:x=!0,zIndex:m=100,closeOnClickOutside:O=!0,closeOnSwipe:d=!0,isFullPage:P=!1,unsetHeight:z=!1,unsetWidth:S=!1,onClose:C=()=>{},onOpen:D=()=>{},className:k="",style:q={},color:F="neutral",overlayColor:H="rgba(123, 123, 123, 0.5)",size:I="small",drawerSize:j="12.5rem",children:E,...W}=e,M=V.useTheme(),i=u.useRef(),[p,b]=u.useState(!1);var h=null,f=null;function _(r){return r.touches||r.originalEvent.touches}function R(r){const l=_(r)[0];h=l.clientX,f=l.clientY}function L(r){if(!(!h||!f)){var l=r.touches[0].clientX,U=r.touches[0].clientY,w=h-l,T=f-U;Math.abs(w)>Math.abs(T)?w>0?d==!0&&n=="left"&&s():d==!0&&n=="right"&&s():T>0?d==!0&&n=="top"&&s():d==!0&&n=="bottom"&&s(),h=null,f=null}}u.useImperativeHandle(o,()=>({open(){N()},close(){s()},isOpen(){return p}}));const N=r=>{b(!0),D(r)},s=r=>{b(!1),C(r)};return u.useEffect(()=>{const r=l=>{i!=null&&i.current&&!(i!=null&&i.current.contains(l.target))&&O==!0&&s()};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[]),g.jsx(g.Fragment,{children:g.jsx(B,{enableOverlay:x,overlayColor:H,isOpen:p,zIndex:m,children:g.jsx(A,{ref:i,zIndex:m,isOpen:p,direction:n,isFullPage:P,unsetHeight:z,unsetWidth:S,duration:a,color:F,theme:M,className:k,style:q,size:I,drawerSize:j,onTouchStart:R,onTouchMove:L,...W,children:E})})})});$.propTypes={direction:t.PropTypes.oneOf(["top","right","left","bottom"]),open:t.PropTypes.bool,duration:t.PropTypes.number,enableOverlay:t.PropTypes.bool,zIndex:t.PropTypes.number,closeOnClickOutside:t.PropTypes.bool,closeOnSwipe:t.PropTypes.bool,isFullPage:t.PropTypes.bool,unsetHeight:t.PropTypes.bool,unsetWidth:t.PropTypes.bool,onClose:t.PropTypes.func,onOpen:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,overlayColor:t.PropTypes.string,drawerSize:t.PropTypes.string,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"])};module.exports=$;
33
+ `,v=u.forwardRef((e,o)=>{const{direction:n="right",open:c=!1,duration:a=.8,enableOverlay:x=!0,zIndex:m=100,position:O="fixed",closeOnClickOutside:P=!0,closeOnSwipe:d=!0,isFullPage:z=!1,unsetHeight:S=!1,unsetWidth:C=!1,onClose:D=()=>{},onOpen:k=()=>{},className:q="",style:F={},color:H="neutral",overlayColor:I="rgba(123, 123, 123, 0.5)",size:j="small",drawerSize:E="12.5rem",children:W,...M}=e,_=X.useTheme(),i=u.useRef(),[g,b]=u.useState(!1);var h=null,p=null;function R(r){return r.touches||r.originalEvent.touches}function L(r){const l=R(r)[0];h=l.clientX,p=l.clientY}function N(r){if(!(!h||!p)){var l=r.touches[0].clientX,V=r.touches[0].clientY,w=h-l,T=p-V;Math.abs(w)>Math.abs(T)?w>0?d==!0&&n=="left"&&s():d==!0&&n=="right"&&s():T>0?d==!0&&n=="top"&&s():d==!0&&n=="bottom"&&s(),h=null,p=null}}u.useImperativeHandle(o,()=>({open(){U()},close(){s()},isOpen(){return g}}));const U=r=>{b(!0),k(r)},s=r=>{b(!1),D(r)};return u.useEffect(()=>{const r=l=>{i!=null&&i.current&&!(i!=null&&i.current.contains(l.target))&&P==!0&&s()};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[]),f.jsx(f.Fragment,{children:f.jsx(G,{enableOverlay:x,overlayColor:I,isOpen:g,zIndex:m,position:O,children:f.jsx(B,{ref:i,zIndex:m,isOpen:g,direction:n,isFullPage:z,unsetHeight:S,unsetWidth:C,duration:a,color:H,theme:_,className:q,style:F,size:j,drawerSize:E,onTouchStart:L,onTouchMove:N,...M,children:W})})})});v.propTypes={direction:t.PropTypes.oneOf(["top","right","left","bottom"]),open:t.PropTypes.bool,duration:t.PropTypes.number,enableOverlay:t.PropTypes.bool,zIndex:t.PropTypes.number,position:t.PropTypes.string,closeOnClickOutside:t.PropTypes.bool,closeOnSwipe:t.PropTypes.bool,isFullPage:t.PropTypes.bool,unsetHeight:t.PropTypes.bool,unsetWidth:t.PropTypes.bool,onClose:t.PropTypes.func,onOpen:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,overlayColor:t.PropTypes.string,drawerSize:t.PropTypes.string,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"])};module.exports=v;
@@ -1,22 +1,22 @@
1
- import { jsx as g, Fragment as Y } from "react/jsx-runtime";
2
- import { forwardRef as V, useRef as q, useState as A, useImperativeHandle as B, useEffect as G } from "react";
1
+ import { jsx as g, Fragment as V } from "react/jsx-runtime";
2
+ import { forwardRef as q, useRef as A, useState as B, useImperativeHandle as G, useEffect as J } from "react";
3
3
  import { P as t } from "./index-CblbdqjE.js";
4
4
  import { s as y } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { b as $, c as J } from "./utils-BdsZgOUE.js";
6
- import { u as K } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
7
- const Q = (e, r, o, u, s) => {
8
- if (e === "right" || e === "left" || r && o) return "height: 100%;";
9
- if (!(r && s === !0))
10
- return r ? "height: " + u + ";" : "height: 0;";
11
- }, R = (e, r, o, u, s) => {
12
- if (e === "top" || e === "bottom" || r && o) return "width: 100%;";
13
- if (!(r && s === !0))
14
- return r ? "width: " + u + ";" : "width: 0;";
15
- }, Z = y.div`
5
+ import { b as w, c as K } from "./utils-BdsZgOUE.js";
6
+ import { u as Q } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
7
+ const R = (e, o, r, u, s) => {
8
+ if (e === "right" || e === "left" || o && r) return "height: 100%;";
9
+ if (!(o && s === !0))
10
+ return o ? "height: " + u + ";" : "height: 0;";
11
+ }, Z = (e, o, r, u, s) => {
12
+ if (e === "top" || e === "bottom" || o && r) return "width: 100%;";
13
+ if (!(o && s === !0))
14
+ return o ? "width: " + u + ";" : "width: 0;";
15
+ }, _ = y.div`
16
16
  touch-action: none;
17
17
  overflow: auto;
18
18
  max-height: ${(e) => e.isOpen || e.unsetHeight === !1 ? "100dvh" : 0};
19
- ${(e) => Q(
19
+ ${(e) => R(
20
20
  e.direction,
21
21
  e.isOpen,
22
22
  e.isFullPage,
@@ -24,14 +24,14 @@ const Q = (e, r, o, u, s) => {
24
24
  e.unsetHeight
25
25
  )}
26
26
  max-width: ${(e) => e.isOpen || e.unsetWidth === !1 ? "100vw" : 0};
27
- ${(e) => R(
27
+ ${(e) => Z(
28
28
  e.direction,
29
29
  e.isOpen,
30
30
  e.isFullPage,
31
31
  e.drawerSize,
32
32
  e.unsetWidth
33
33
  )}
34
- position: fixed;
34
+ position: ${(e) => e.position};
35
35
  z-index: ${(e) => e.zIndex};
36
36
  ${(e) => e.direction === "bottom" ? "bottom: 0" : "top: 0"};
37
37
  ${(e) => e.direction === "right" ? "right: 0" : "left: 0"};
@@ -44,68 +44,69 @@ const Q = (e, r, o, u, s) => {
44
44
 
45
45
  box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
46
46
 
47
- background-color: ${(e) => $(
47
+ background-color: ${(e) => w(
48
48
  e.theme,
49
49
  "Drawer",
50
50
  e.color,
51
51
  "enabled",
52
52
  "background"
53
53
  )};
54
- color: ${(e) => $(e.theme, "Drawer", e.color, "enabled", "text")};
55
- ${(e) => J(e.theme, "Drawer", e.size, "enabled")};
56
- `, _ = y.div`
54
+ color: ${(e) => w(e.theme, "Drawer", e.color, "enabled", "text")};
55
+ ${(e) => K(e.theme, "Drawer", e.size, "enabled")};
56
+ `, ee = y.div`
57
57
  z-index: ${(e) => e.zIndex};
58
- position: fixed;
58
+ position: ${(e) => e.position};
59
59
  top: 0;
60
60
  left: 0;
61
61
 
62
62
  height: ${(e) => e.isOpen === !0 && e.enableOverlay === !0 ? "100dvh" : 0};
63
63
  width: ${(e) => e.isOpen === !0 && e.enableOverlay === !0 ? "100vw" : 0};
64
64
  background-color: ${(e) => e.overlayColor};
65
- `, ee = V((e, r) => {
65
+ `, te = q((e, o) => {
66
66
  const {
67
- direction: o = "right",
67
+ direction: r = "right",
68
68
  open: u = !1,
69
69
  duration: s = 0.8,
70
70
  enableOverlay: O = !0,
71
71
  zIndex: m = 100,
72
+ position: p = "fixed",
72
73
  closeOnClickOutside: x = !0,
73
74
  closeOnSwipe: c = !0,
74
- isFullPage: p = !1,
75
- unsetHeight: z = !1,
76
- unsetWidth: S = !1,
75
+ isFullPage: z = !1,
76
+ unsetHeight: S = !1,
77
+ unsetWidth: C = !1,
77
78
  //----------------
78
- onClose: C = () => {
79
+ onClose: D = () => {
79
80
  },
80
- onOpen: D = () => {
81
+ onOpen: T = () => {
81
82
  },
82
83
  //----------------
83
- className: T = "",
84
- style: k = {},
85
- color: H = "neutral",
86
- overlayColor: I = "rgba(123, 123, 123, 0.5)",
87
- size: P = "small",
88
- drawerSize: F = "12.5rem",
89
- children: W,
90
- ...E
91
- } = e, M = K(), i = q(), [f, b] = A(!1);
84
+ className: k = "",
85
+ style: H = {},
86
+ color: I = "neutral",
87
+ overlayColor: P = "rgba(123, 123, 123, 0.5)",
88
+ size: F = "small",
89
+ drawerSize: W = "12.5rem",
90
+ children: E,
91
+ ...M
92
+ } = e, j = Q(), i = A(), [f, b] = B(!1);
92
93
  var d = null, h = null;
93
- function j(n) {
94
+ function L(n) {
94
95
  return n.touches || n.originalEvent.touches;
95
96
  }
96
- function L(n) {
97
- const a = j(n)[0];
97
+ function N(n) {
98
+ const a = L(n)[0];
98
99
  d = a.clientX, h = a.clientY;
99
100
  }
100
- function N(n) {
101
+ function U(n) {
101
102
  if (!(!d || !h)) {
102
- var a = n.touches[0].clientX, X = n.touches[0].clientY, v = d - a, w = h - X;
103
- Math.abs(v) > Math.abs(w) ? v > 0 ? c == !0 && o == "left" && l() : c == !0 && o == "right" && l() : w > 0 ? c == !0 && o == "top" && l() : c == !0 && o == "bottom" && l(), d = null, h = null;
103
+ var a = n.touches[0].clientX, Y = n.touches[0].clientY, $ = d - a, v = h - Y;
104
+ Math.abs($) > Math.abs(v) ? $ > 0 ? c == !0 && r == "left" && l() : c == !0 && r == "right" && l() : v > 0 ? c == !0 && r == "top" && l() : c == !0 && r == "bottom" && l(), d = null, h = null;
104
105
  }
105
106
  }
106
- B(r, () => ({
107
+ G(o, () => ({
107
108
  open() {
108
- U();
109
+ X();
109
110
  },
110
111
  close() {
111
112
  l();
@@ -114,52 +115,53 @@ const Q = (e, r, o, u, s) => {
114
115
  return f;
115
116
  }
116
117
  }));
117
- const U = (n) => {
118
- b(!0), D(n);
118
+ const X = (n) => {
119
+ b(!0), T(n);
119
120
  }, l = (n) => {
120
- b(!1), C(n);
121
+ b(!1), D(n);
121
122
  };
122
- return G(() => {
123
+ return J(() => {
123
124
  const n = (a) => {
124
125
  i != null && i.current && !(i != null && i.current.contains(a.target)) && x == !0 && l();
125
126
  };
126
127
  return document.addEventListener("click", n, !0), () => {
127
128
  document.removeEventListener("click", n, !0);
128
129
  };
129
- }, []), /* @__PURE__ */ g(Y, { children: /* @__PURE__ */ g(
130
- _,
130
+ }, []), /* @__PURE__ */ g(V, { children: /* @__PURE__ */ g(
131
+ ee,
131
132
  {
132
133
  enableOverlay: O,
133
- overlayColor: I,
134
+ overlayColor: P,
134
135
  isOpen: f,
135
136
  zIndex: m,
137
+ position: p,
136
138
  children: /* @__PURE__ */ g(
137
- Z,
139
+ _,
138
140
  {
139
141
  ref: i,
140
142
  zIndex: m,
141
143
  isOpen: f,
142
- direction: o,
143
- isFullPage: p,
144
- unsetHeight: z,
145
- unsetWidth: S,
144
+ direction: r,
145
+ isFullPage: z,
146
+ unsetHeight: S,
147
+ unsetWidth: C,
146
148
  duration: s,
147
- color: H,
148
- theme: M,
149
- className: T,
150
- style: k,
151
- size: P,
152
- drawerSize: F,
153
- onTouchStart: L,
154
- onTouchMove: N,
155
- ...E,
156
- children: W
149
+ color: I,
150
+ theme: j,
151
+ className: k,
152
+ style: H,
153
+ size: F,
154
+ drawerSize: W,
155
+ onTouchStart: N,
156
+ onTouchMove: U,
157
+ ...M,
158
+ children: E
157
159
  }
158
160
  )
159
161
  }
160
162
  ) });
161
163
  });
162
- ee.propTypes = {
164
+ te.propTypes = {
163
165
  direction: t.oneOf(["top", "right", "left", "bottom"]),
164
166
  open: t.bool,
165
167
  /**
@@ -174,6 +176,7 @@ ee.propTypes = {
174
176
  * z-index of Drawer
175
177
  */
176
178
  zIndex: t.number,
179
+ position: t.string,
177
180
  closeOnClickOutside: t.bool,
178
181
  closeOnSwipe: t.bool,
179
182
  /**
@@ -209,5 +212,5 @@ ee.propTypes = {
209
212
  ])
210
213
  };
211
214
  export {
212
- ee as default
215
+ te as default
213
216
  };
@@ -1,7 +1,7 @@
1
- "use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),b=require("./suspense-product-card-detailed-C7_tBl85.cjs"),C=P.styled.div`
1
+ "use strict";const i=require("react/jsx-runtime"),l=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),C=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),w=require("./suspense-product-card-detailed-BA06QK8a.cjs"),N=v.styled.div`
2
2
  padding: 1.75rem 3rem;
3
3
  display: grid;
4
- grid-template-columns: ${t=>`repeat(${t.limit||5}, minmax(0, 1fr))`};
4
+ grid-template-columns: ${o=>`repeat(${o.limit||5}, minmax(0, 1fr))`};
5
5
 
6
6
  gap: 2.97rem;
7
7
 
@@ -34,7 +34,7 @@
34
34
  }
35
35
 
36
36
  & .product-card {
37
- max-width: ${t=>`calc(${100/t.desktopCols}% - ${(t.desktopCols-1)*t.columnGapRem/t.desktopCols}rem)`};
37
+ max-width: ${o=>`calc(${100/o.desktopCols}% - ${(o.desktopCols-1)*o.columnGapRem/o.desktopCols}rem)`};
38
38
 
39
39
  animation-duration: 0.2s;
40
40
  animation-name: animate-fade;
@@ -54,13 +54,13 @@
54
54
  }
55
55
  }
56
56
 
57
- @media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
57
+ @media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
58
58
  grid-template-columns: repeat(2, 1fr);
59
59
  padding: 2rem 1.25rem;
60
60
  gap: 1.19rem;
61
61
  }
62
62
 
63
- @media (max-width: ${f.SMALL_MOBILE_SIZE_PX+"px"}) {
63
+ @media (max-width: ${k.SMALL_MOBILE_SIZE_PX+"px"}) {
64
64
  display: flex;
65
65
  flex-direction: column;
66
66
 
@@ -71,4 +71,4 @@
71
71
  }
72
72
  }
73
73
  }
74
- `,h=n.memo(b.DetailedProductCard),N=n.forwardRef((t,w)=>{const{items:r,limit:a=5,limitMobile:d=4,onSelectCard:s=()=>{},title:y="Urgent sale",showLessText:S="Show less",showMoreText:j="Show more",isLoading:k=!1,getImage:m=()=>{},negotiableText:g,freeText:p}=t,c=v.useDetectMobile(),[l,M]=n.useState(!1),U=n.useMemo(()=>{var o;return i.jsx(i.Fragment,{children:c===!0?(o=r==null?void 0:r.slice(0,l===!0?r==null?void 0:r.length:d))==null?void 0:o.map((e,u)=>i.jsx(h,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>s==null?void 0:s(e==null?void 0:e.uuid),imageUrl:m(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:g,freeText:p},u)):r==null?void 0:r.slice(0,a).map((e,u)=>i.jsx(h,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>s==null?void 0:s(e==null?void 0:e.uuid),imageUrl:m(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:g,freeText:p},u))})},[r,c,a,d,l]);return i.jsxs(C,{ref:w,limit:a,children:[i.jsxs("div",{className:"urgent-tag",children:[i.jsx("i",{className:"mng mng-lnc-bolt-filled"}),i.jsx("span",{children:y})]}),i.jsx(b.SuspenseDetailedProductCard,{isLoading:k,limit:a,keyPrefix:"explore-landing",children:U}),c===!0&&d<(r==null?void 0:r.length)&&i.jsx(q,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:o=>{var e;(e=o==null?void 0:o.target)==null||e.blur(),M(!l)},children:l===!0?S:j})]})});module.exports=N;
74
+ `,h=l.memo(w.DetailedProductCard),_=l.forwardRef((o,y)=>{const{items:r,limit:a=5,limitMobile:d=4,onSelectCard:t=()=>{},title:S="Urgent sale",showLessText:j="Show less",showMoreText:L="Show more",isLoading:M=!1,getImage:u=()=>{},negotiableText:g,freeText:p,onBookmark:b=()=>{},bookmarkComponent:f=i.jsx(i.Fragment,{})}=o,m=C.useDetectMobile(),[n,U]=l.useState(!1),P=l.useMemo(()=>{var s;return i.jsx(i.Fragment,{children:m===!0?(s=r==null?void 0:r.slice(0,n===!0?r==null?void 0:r.length:d))==null?void 0:s.map((e,c)=>i.jsx(h,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid),imageUrl:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:g,freeText:p,onBookmark:b,bookmarkComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},c)):r==null?void 0:r.slice(0,a).map((e,c)=>i.jsx(h,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid),imageUrl:u(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,negotiableText:g,freeText:p,onBookmark:b,bookmarkComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},c))})},[r,m,a,d,n]);return i.jsxs(N,{ref:y,limit:a,children:[i.jsxs("div",{className:"urgent-tag",children:[i.jsx("i",{className:"mng mng-lnc-bolt-filled"}),i.jsx("span",{children:S})]}),i.jsx(w.SuspenseDetailedProductCard,{isLoading:M,limit:a,keyPrefix:"explore-landing",children:P}),m===!0&&d<(r==null?void 0:r.length)&&i.jsx(q,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:s=>{var e;(e=s==null?void 0:s.target)==null||e.blur(),U(!n)},children:n===!0?j:L})]})});module.exports=_;