@lanaco/lnc-react-ui 4.0.60 → 4.0.61

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 s=require("react/jsx-runtime"),a=require("react"),u=require("./suspense-categories-card-simple-HXlnt5ki.cjs"),m=require("./style-BNMwv9ZQ.cjs"),p=a.memo(u.CategorySimpleCard),g=a.forwardRef(({items:r,onSelectCard:i=()=>{},isLoading:n=!1,limit:t=4},l)=>{const c=a.useMemo(()=>{var o;return(o=r==null?void 0:r.slice(0,4))==null?void 0:o.map((e,d)=>s.jsx(p,{uuid:e==null?void 0:e.uuid,image:e==null?void 0:e.image,name:e==null?void 0:e.name,onSelectCard:()=>i==null?void 0:i(e==null?void 0:e.uuid)},d))},[r]);return s.jsx(m.Wrapper,{children:s.jsx("div",{className:"wrapper__grid",children:s.jsx(u.SuspenseSimpleCategoryCard,{isLoading:n,limit:t,keyPrefix:"blog-section",children:c})})})});module.exports=g;
1
+ "use strict";const s=require("react/jsx-runtime"),a=require("react"),u=require("./suspense-categories-card-simple-HXlnt5ki.cjs"),l=require("./style-OPSfrtFm.cjs"),m=a.memo(u.CategorySimpleCard),p=a.forwardRef(({items:r,onSelectCard:i=()=>{},isLoading:n=!1,limit:t=4,isHighlight:c=!1},C)=>{const d=a.useMemo(()=>{var o;return(o=r==null?void 0:r.slice(0,4))==null?void 0:o.map((e,g)=>s.jsx(m,{uuid:e==null?void 0:e.uuid,image:e==null?void 0:e.image,name:e==null?void 0:e.name,onSelectCard:()=>i==null?void 0:i(e==null?void 0:e.uuid)},g))},[r]);return s.jsx(l.Wrapper,{className:c?"highlight":"",children:s.jsx("div",{className:"wrapper__grid",children:s.jsx(u.SuspenseSimpleCategoryCard,{isLoading:n,limit:t,keyPrefix:"blog-section",children:d})})})});module.exports=p;
@@ -1,28 +1,34 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { memo as u, forwardRef as f, useMemo as g } from "react";
3
- import { C as n, S as t } from "./suspense-categories-card-simple-BEaaS-oz.js";
4
- import { W as l } from "./style-7aonpzuy.js";
5
- const c = u(n), z = f(
6
- ({ items: e, onSelectCard: a = () => {
7
- }, isLoading: m = !1, limit: p = 4 }, C) => {
8
- const d = g(() => {
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { memo as l, forwardRef as f, useMemo as t } from "react";
3
+ import { C as u, S as n } from "./suspense-categories-card-simple-BEaaS-oz.js";
4
+ import { W as c } from "./style-DOKM5cZi.js";
5
+ const C = l(u), M = f(
6
+ ({
7
+ items: r,
8
+ onSelectCard: o = () => {
9
+ },
10
+ isLoading: m = !1,
11
+ limit: s = 4,
12
+ isHighlight: p = !1
13
+ }, h) => {
14
+ const d = t(() => {
9
15
  var i;
10
- return (i = e == null ? void 0 : e.slice(0, 4)) == null ? void 0 : i.map((r, s) => /* @__PURE__ */ o(
11
- c,
16
+ return (i = r == null ? void 0 : r.slice(0, 4)) == null ? void 0 : i.map((e, g) => /* @__PURE__ */ a(
17
+ C,
12
18
  {
13
- uuid: r == null ? void 0 : r.uuid,
14
- image: r == null ? void 0 : r.image,
15
- name: r == null ? void 0 : r.name,
16
- onSelectCard: () => a == null ? void 0 : a(r == null ? void 0 : r.uuid)
19
+ uuid: e == null ? void 0 : e.uuid,
20
+ image: e == null ? void 0 : e.image,
21
+ name: e == null ? void 0 : e.name,
22
+ onSelectCard: () => o == null ? void 0 : o(e == null ? void 0 : e.uuid)
17
23
  },
18
- s
24
+ g
19
25
  ));
20
- }, [e]);
21
- return /* @__PURE__ */ o(l, { children: /* @__PURE__ */ o("div", { className: "wrapper__grid", children: /* @__PURE__ */ o(
22
- t,
26
+ }, [r]);
27
+ return /* @__PURE__ */ a(c, { className: p ? "highlight" : "", children: /* @__PURE__ */ a("div", { className: "wrapper__grid", children: /* @__PURE__ */ a(
28
+ n,
23
29
  {
24
30
  isLoading: m,
25
- limit: p,
31
+ limit: s,
26
32
  keyPrefix: "blog-section",
27
33
  children: d
28
34
  }
@@ -30,5 +36,5 @@ const c = u(n), z = f(
30
36
  }
31
37
  );
32
38
  export {
33
- z as default
39
+ M as default
34
40
  };
@@ -1 +1 @@
1
- "use strict";const r=require("react/jsx-runtime"),u=require("react"),g=require("./useDetectMobile-D6d5LpdL.cjs"),q=require("./index-D0NN682o.cjs"),P=require("./suspense-product-card-simple-QlbK_FyB.cjs"),j=require("./Button.cjs"),f=require("./style-BNMwv9ZQ.cjs"),y=u.memo(q.SimpleProductCard),M=u.forwardRef(({buttonText:o,buttonLink:t,items:i,onButtonAction:l=()=>{},onSelectCard:s=()=>{},isLoading:n=!1,limit:d=4,getImage:a=()=>{}},N)=>{const p=g.useDetectMobile(),m=u.useMemo(()=>{var c;return(c=i==null?void 0:i.slice(0,4))==null?void 0:c.map((e,b)=>r.jsx(y,{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,onSelectCard:()=>s==null?void 0:s(e==null?void 0:e.uuid),image:a(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},b))},[i]);return r.jsxs(f.Wrapper,{children:[r.jsx("div",{className:"wrapper__grid",children:r.jsx(P.SuspenseSimpleProductCard,{isLoading:n,limit:d,keyPrefix:"blog-section",children:m})}),r.jsx(j,{text:o,borderRadius:"curved",btnType:p?"basic":"outline",color:"neutral",className:"wrapper__action",onClick:()=>l(t)})]})});module.exports=M;
1
+ "use strict";const r=require("react/jsx-runtime"),u=require("react"),q=require("./useDetectMobile-D6d5LpdL.cjs"),P=require("./index-D0NN682o.cjs"),h=require("./suspense-product-card-simple-QlbK_FyB.cjs"),j=require("./Button.cjs"),f=require("./style-OPSfrtFm.cjs"),y=u.memo(P.SimpleProductCard),M=u.forwardRef(({buttonText:t,buttonLink:o,items:i,onButtonAction:l=()=>{},onSelectCard:s=()=>{},isLoading:n=!1,limit:d=4,getImage:a=()=>{},isHighlight:p=!0},N)=>{const m=q.useDetectMobile(),b=u.useMemo(()=>{var c;return(c=i==null?void 0:i.slice(0,4))==null?void 0:c.map((e,g)=>r.jsx(y,{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,onSelectCard:()=>s==null?void 0:s(e==null?void 0:e.uuid),image:a(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},g))},[i]);return r.jsxs(f.Wrapper,{className:p?"highlight":"",children:[r.jsx("div",{className:"wrapper__grid",children:r.jsx(h.SuspenseSimpleProductCard,{isLoading:n,limit:d,keyPrefix:"blog-section",children:b})}),r.jsx(j,{text:t,borderRadius:"curved",btnType:m?"basic":"outline",color:"neutral",className:"wrapper__action",onClick:()=>l(o)})]})});module.exports=M;
@@ -1,15 +1,15 @@
1
- import { jsx as i, jsxs as f } from "react/jsx-runtime";
2
- import { memo as b, forwardRef as g, useMemo as P } from "react";
3
- import { u as y } from "./useDetectMobile-BC6EGaBc.js";
4
- import { S as M } from "./index-CFVE57cd.js";
5
- import { S as N } from "./suspense-product-card-simple--_T6ibCi.js";
1
+ import { jsx as i, jsxs as g } from "react/jsx-runtime";
2
+ import { memo as b, forwardRef as h, useMemo as P } from "react";
3
+ import { u as N } from "./useDetectMobile-BC6EGaBc.js";
4
+ import { S as y } from "./index-CFVE57cd.js";
5
+ import { S as M } from "./suspense-product-card-simple--_T6ibCi.js";
6
6
  import S from "./Button.js";
7
- import { W as _ } from "./style-7aonpzuy.js";
8
- const h = b(M), F = g(
7
+ import { W as _ } from "./style-DOKM5cZi.js";
8
+ const w = b(y), R = h(
9
9
  ({
10
- buttonText: s,
10
+ buttonText: u,
11
11
  buttonLink: t,
12
- items: e,
12
+ items: r,
13
13
  onButtonAction: l = () => {
14
14
  },
15
15
  onSelectCard: o = () => {
@@ -17,42 +17,43 @@ const h = b(M), F = g(
17
17
  isLoading: a = !1,
18
18
  limit: c = 4,
19
19
  getImage: d = () => {
20
- }
21
- }, w) => {
22
- const m = y(), p = P(() => {
23
- var u;
24
- return (u = e == null ? void 0 : e.slice(0, 4)) == null ? void 0 : u.map((r, n) => /* @__PURE__ */ i(
25
- h,
20
+ },
21
+ isHighlight: m = !0
22
+ }, U) => {
23
+ const p = N(), n = P(() => {
24
+ var s;
25
+ return (s = r == null ? void 0 : r.slice(0, 4)) == null ? void 0 : s.map((e, f) => /* @__PURE__ */ i(
26
+ w,
26
27
  {
27
- title: r == null ? void 0 : r.name,
28
- price: r == null ? void 0 : r.price,
29
- isFree: r == null ? void 0 : r.isFree,
30
- isNegotiable: r == null ? void 0 : r.isNegotiable,
31
- currency: r == null ? void 0 : r.currency,
32
- sellerUuid: r == null ? void 0 : r.sellerUuid,
33
- uuid: r == null ? void 0 : r.uuid,
34
- onSelectCard: () => o == null ? void 0 : o(r == null ? void 0 : r.uuid),
35
- image: d(r == null ? void 0 : r.image, r == null ? void 0 : r.uuid, r == null ? void 0 : r.sellerUuid) || null
28
+ title: e == null ? void 0 : e.name,
29
+ price: e == null ? void 0 : e.price,
30
+ isFree: e == null ? void 0 : e.isFree,
31
+ isNegotiable: e == null ? void 0 : e.isNegotiable,
32
+ currency: e == null ? void 0 : e.currency,
33
+ sellerUuid: e == null ? void 0 : e.sellerUuid,
34
+ uuid: e == null ? void 0 : e.uuid,
35
+ onSelectCard: () => o == null ? void 0 : o(e == null ? void 0 : e.uuid),
36
+ image: d(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null
36
37
  },
37
- n
38
+ f
38
39
  ));
39
- }, [e]);
40
- return /* @__PURE__ */ f(_, { children: [
40
+ }, [r]);
41
+ return /* @__PURE__ */ g(_, { className: m ? "highlight" : "", children: [
41
42
  /* @__PURE__ */ i("div", { className: "wrapper__grid", children: /* @__PURE__ */ i(
42
- N,
43
+ M,
43
44
  {
44
45
  isLoading: a,
45
46
  limit: c,
46
47
  keyPrefix: "blog-section",
47
- children: p
48
+ children: n
48
49
  }
49
50
  ) }),
50
51
  /* @__PURE__ */ i(
51
52
  S,
52
53
  {
53
- text: s,
54
+ text: u,
54
55
  borderRadius: "curved",
55
- btnType: m ? "basic" : "outline",
56
+ btnType: p ? "basic" : "outline",
56
57
  color: "neutral",
57
58
  className: "wrapper__action",
58
59
  onClick: () => l(t)
@@ -62,5 +63,5 @@ const h = b(M), F = g(
62
63
  }
63
64
  );
64
65
  export {
65
- F as default
66
+ R as default
66
67
  };
@@ -1 +1 @@
1
- "use strict";const r=require("react/jsx-runtime"),u=require("react"),f=require("./useDetectMobile-D6d5LpdL.cjs"),a=require("./skeleton-BTGcDgNY.cjs"),g=require("./Button.cjs"),S=require("./style-BNMwv9ZQ.cjs"),b=({limit:t=4,isLoading:n=!1,keyPrefix:s})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,o)=>r.jsx(a.ShopCardSkeleton,{isLoading:n},`${s}-skeleton-shop-card-${o}`))}),_=({children:t,fallbackComponent:n=r.jsx(r.Fragment,{}),isLoading:s=!1,limit:i,keyPrefix:o})=>r.jsx(u.Suspense,{fallbackComponent:n,children:s===!0?r.jsx(b,{isLoading:s,limit:i,keyPrefix:o}):t}),k=u.memo(a.ShopCard),q=u.forwardRef(({buttonText:t,buttonLink:n,items:s,onButtonAction:i=()=>{},onSelectCard:o=()=>{},isLoading:l=!1,limit:d=4,getImage:p=()=>{}},C)=>{const h=f.useDetectMobile(),j=u.useMemo(()=>{var c;return(c=s==null?void 0:s.slice(0,4))==null?void 0:c.map((e,m)=>r.jsx(k,{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:()=>o==null?void 0:o(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__${m+1}`))},[s]);return r.jsxs(S.Wrapper,{children:[r.jsx("div",{className:"wrapper__grid",children:r.jsx(_,{isLoading:l,limit:d,keyPrefix:"blog-section",children:j})}),r.jsx(g,{text:t,borderRadius:"curved",btnType:h?"basic":"outline",color:"neutral",className:"wrapper__action",onClick:()=>i(n)})]})});module.exports=q;
1
+ "use strict";const r=require("react/jsx-runtime"),u=require("react"),f=require("./useDetectMobile-D6d5LpdL.cjs"),a=require("./skeleton-BTGcDgNY.cjs"),g=require("./Button.cjs"),S=require("./style-OPSfrtFm.cjs"),b=({limit:t=4,isLoading:n=!1,keyPrefix:s})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,o)=>r.jsx(a.ShopCardSkeleton,{isLoading:n},`${s}-skeleton-shop-card-${o}`))}),_=({children:t,fallbackComponent:n=r.jsx(r.Fragment,{}),isLoading:s=!1,limit:i,keyPrefix:o})=>r.jsx(u.Suspense,{fallbackComponent:n,children:s===!0?r.jsx(b,{isLoading:s,limit:i,keyPrefix:o}):t}),k=u.memo(a.ShopCard),q=u.forwardRef(({buttonText:t,buttonLink:n,items:s,onButtonAction:i=()=>{},onSelectCard:o=()=>{},isLoading:l=!1,limit:d=4,getImage:p=()=>{}},C)=>{const h=f.useDetectMobile(),j=u.useMemo(()=>{var c;return(c=s==null?void 0:s.slice(0,4))==null?void 0:c.map((e,m)=>r.jsx(k,{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:()=>o==null?void 0:o(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__${m+1}`))},[s]);return r.jsxs(S.Wrapper,{children:[r.jsx("div",{className:"wrapper__grid",children:r.jsx(_,{isLoading:l,limit:d,keyPrefix:"blog-section",children:j})}),r.jsx(g,{text:t,borderRadius:"curved",btnType:h?"basic":"outline",color:"neutral",className:"wrapper__action",onClick:()=>i(n)})]})});module.exports=q;
@@ -3,7 +3,7 @@ import { Suspense as S, memo as g, forwardRef as b, useMemo as _ } from "react";
3
3
  import { u as C } from "./useDetectMobile-BC6EGaBc.js";
4
4
  import { a as k, S as w } from "./skeleton-CwE74giy.js";
5
5
  import v from "./Button.js";
6
- import { W as M } from "./style-7aonpzuy.js";
6
+ import { W as M } from "./style-DOKM5cZi.js";
7
7
  const y = ({ limit: s = 4, isLoading: i = !1, keyPrefix: e }) => /* @__PURE__ */ o(u, { children: Array.from({ length: s }, (a, t) => /* @__PURE__ */ o(
8
8
  k,
9
9
  {
@@ -1,6 +1,6 @@
1
- import { s as e } from "./emotion-styled.browser.esm-BNN1dTl3.js";
2
- import { M as r } from "./consts-C1uHV4xc.js";
3
- const i = e.div`
1
+ import { s as r } from "./emotion-styled.browser.esm-BNN1dTl3.js";
2
+ import { M as e } from "./consts-C1uHV4xc.js";
3
+ const i = r.div`
4
4
  display: flex;
5
5
  flex-direction: column;
6
6
  justify-content: center;
@@ -24,7 +24,19 @@ const i = e.div`
24
24
  letter-spacing: -0.09px;
25
25
  }
26
26
 
27
- @media (max-width: ${r + "px"}) {
27
+ &.highlight {
28
+ border-radius: 1rem;
29
+ border: 2px solid var(--warning-500, #f59e0b);
30
+ background: var(--warning-50, #fffbeb);
31
+ padding: 0.75rem;
32
+ width: fit-content;
33
+
34
+ & .wrapper__action {
35
+ border: none;
36
+ }
37
+ }
38
+
39
+ @media (max-width: ${e + "px"}) {
28
40
  & .wrapper__grid {
29
41
  grid-template-columns: repeat(2, 1fr);
30
42
  }
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./emotion-styled.browser.esm-BtEseadx.cjs"),r=require("./consts-CtNoHdBj.cjs"),t=e.styled.div`
1
+ "use strict";const r=require("./emotion-styled.browser.esm-BtEseadx.cjs"),e=require("./consts-CtNoHdBj.cjs"),t=r.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  justify-content: center;
@@ -22,7 +22,19 @@
22
22
  letter-spacing: -0.09px;
23
23
  }
24
24
 
25
- @media (max-width: ${r.MOBILE_SIZE_PX+"px"}) {
25
+ &.highlight {
26
+ border-radius: 1rem;
27
+ border: 2px solid var(--warning-500, #f59e0b);
28
+ background: var(--warning-50, #fffbeb);
29
+ padding: 0.75rem;
30
+ width: fit-content;
31
+
32
+ & .wrapper__action {
33
+ border: none;
34
+ }
35
+ }
36
+
37
+ @media (max-width: ${e.MOBILE_SIZE_PX+"px"}) {
26
38
  & .wrapper__grid {
27
39
  grid-template-columns: repeat(2, 1fr);
28
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.60",
3
+ "version": "4.0.61",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -225,4 +225,4 @@
225
225
  "storybook-dark-mode": "^1.1.0",
226
226
  "vite": "^5.4.10"
227
227
  }
228
- }
228
+ }