@lanaco/lnc-react-ui 4.0.108 → 4.0.109

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,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),o=require("react"),b=require("./Icon.cjs"),w=require("./IconButton.cjs"),v=require("./Chip.cjs"),c=require("./utils-CZynEOC_.cjs"),N=require("./index-BvSNRLNa.cjs"),y=require("./emotion-styled.browser.esm-BtEseadx.cjs"),R=require("./suspense-large-CtcwWswP.cjs"),q=y.styled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),c=require("react"),w=require("./Icon.cjs"),y=require("./IconButton.cjs"),N=require("./Chip.cjs"),o=require("./utils-CZynEOC_.cjs"),k=require("./index-BvSNRLNa.cjs"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),R=require("./suspense-large-CtcwWswP.cjs"),q=j.styled.div`
2
2
  display: flex;
3
3
  padding: 1rem;
4
4
  align-items: center;
@@ -43,7 +43,7 @@
43
43
  font-weight: 600;
44
44
  line-height: 1.5rem;
45
45
  letter-spacing: 0.1px;
46
- ${c.truncateTextInRows(3)}
46
+ ${o.truncateTextInRows(3)}
47
47
  }
48
48
 
49
49
  & .wrapper__tags {
@@ -117,7 +117,7 @@
117
117
  }
118
118
  }
119
119
  }
120
- `,I=o.forwardRef(({title:d,imageUrl:s,options:i,publishedAt:a,timeToReadText:n="{0} min read",timeToRead:l=0,numberOfLikes:m=0,numberOfComments:p=0,onSelectCard:g=()=>{},onSelectOption:_=()=>{},onBookmark:f=()=>{},onShare:e=()=>{}},h)=>r.jsxs(q,{onClick:g,children:[r.jsx(N.ProductImageWrapper,{src:s,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__content",children:[r.jsxs("div",{className:"wrapper__subcontent",children:[r.jsx("div",{className:"wrapper__title",children:d}),r.jsx("div",{className:"wrapper__tags",children:i&&(i==null?void 0:i.map((t,j)=>r.jsx(v,{label:t==null?void 0:t.name,color:t==null?void 0:t.color,className:"wrapper__tag",onClick:u=>{u==null||u.stopPropagation(),_(t==null?void 0:t.code)}},`blog-card-sponsored-option__${j+1}`)))})]}),r.jsxs("div",{className:"wrapper__info",children:[r.jsxs("div",{className:"info__content",children:[r.jsx("div",{className:"info__text",children:`${c.formatLocaleDateString(a)} • ${c.formatString(n,l)}`}),r.jsxs("div",{className:"info__text",children:[r.jsxs("div",{children:[r.jsx(b,{icon:" mng-lnc-thumbs-up",sizeInUnits:"1rem"}),c.getRoundedNumber(m)]}),r.jsxs("div",{children:[r.jsx(b,{icon:" mng-lnc-messages",sizeInUnits:"1rem"}),c.getRoundedNumber(p)]})]})]}),r.jsxs("div",{className:"info__content",children:[r.jsx(w,{icon:" mng-lnc-bookmark",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:t=>{t==null||t.stopPropagation(),f()}}),r.jsx(w,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:t=>{t==null||t.stopPropagation(),e()}})]})]})]})]})),z=y.styled.div`
120
+ `,I=c.forwardRef(({title:d,imageUrl:s,options:i,publishedAt:a,timeToReadText:n="{0} min read",timeToRead:l=0,numberOfLikes:m=0,numberOfComments:p=0,isBookmarked:g=!1,onSelectCard:h=()=>{},onSelectOption:f=()=>{},onBookmark:e=()=>{},onShare:u=()=>{}},b)=>r.jsxs(q,{onClick:h,children:[r.jsx(k.ProductImageWrapper,{src:s,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__content",children:[r.jsxs("div",{className:"wrapper__subcontent",children:[r.jsx("div",{className:"wrapper__title",children:d}),r.jsx("div",{className:"wrapper__tags",children:i&&(i==null?void 0:i.map((t,v)=>r.jsx(N,{label:t==null?void 0:t.name,color:t==null?void 0:t.color,className:"wrapper__tag",onClick:_=>{_==null||_.stopPropagation(),f(t==null?void 0:t.code)}},`blog-card-sponsored-option__${v+1}`)))})]}),r.jsxs("div",{className:"wrapper__info",children:[r.jsxs("div",{className:"info__content",children:[r.jsx("div",{className:"info__text",children:`${o.formatLocaleDateString(a)} • ${o.formatString(n,l)}`}),r.jsxs("div",{className:"info__text",children:[r.jsxs("div",{children:[r.jsx(w,{icon:" mng-lnc-thumbs-up",sizeInUnits:"1rem"}),o.getRoundedNumber(m)]}),r.jsxs("div",{children:[r.jsx(w,{icon:" mng-lnc-messages",sizeInUnits:"1rem"}),o.getRoundedNumber(p)]})]})]}),r.jsxs("div",{className:"info__content",children:[r.jsx(y,{icon:g?" mng-lnc-bookmark--filled":" mng-lnc-bookmark",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:t=>{t==null||t.stopPropagation(),e()}}),r.jsx(y,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:t=>{t==null||t.stopPropagation(),u()}})]})]})]})]})),z=j.styled.div`
121
121
  display: flex;
122
122
  flex-direction: column;
123
123
  align-items: flex-start;
@@ -139,4 +139,4 @@
139
139
  bottom: -0.75rem;
140
140
  }
141
141
  }
142
- `,k=o.memo(I),C=o.forwardRef(({timeToReadText:d="{0} min read",items:s,onSelectCard:i=()=>{},onSelectOption:a=()=>{},onShare:n=()=>{},onBookmark:l=()=>{},isLoading:m=!1,getImage:p=()=>{},isSeparated:g=!0},_)=>{const f=o.useMemo(()=>s==null?void 0:s.map((e,h)=>r.jsx(k,{title:e==null?void 0:e.title,titleSlug:e==null?void 0:e.titleSlug,options:e==null?void 0:e.options,publishedAt:e==null?void 0:e.publishedAt,timeToReadText:d,timeToRead:e==null?void 0:e.timeToRead,numberOfLikes:e==null?void 0:e.numberOfLikes,numberOfComments:e==null?void 0:e.numberOfComments,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>i==null?void 0:i(e),onSelectOption:t=>a==null?void 0:a(t),onShare:()=>n==null?void 0:n(e),onBookmark:()=>l==null?void 0:l(e),imageUrl:p(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null},`blog-card-item__${h+1}`)),[s]);return r.jsx(z,{className:g?"separated":"",children:r.jsx(R.SuspenseBlogLarge,{isLoading:m,limit:5,keyPrefix:"blog-section",children:f})})});module.exports=C;
142
+ `,C=c.memo(I),L=c.forwardRef(({timeToReadText:d="{0} min read",items:s,onSelectCard:i=()=>{},onSelectOption:a=()=>{},onShare:n=()=>{},onBookmark:l=()=>{},isLoading:m=!1,getImage:p=()=>{},isSeparated:g=!0},h)=>{const f=c.useMemo(()=>s==null?void 0:s.map((e,u)=>r.jsx(C,{title:e==null?void 0:e.title,titleSlug:e==null?void 0:e.titleSlug,options:e==null?void 0:e.options,publishedAt:e==null?void 0:e.publishedAt,timeToReadText:d,timeToRead:e==null?void 0:e.timeToRead,numberOfLikes:e==null?void 0:e.numberOfLikes,numberOfComments:e==null?void 0:e.numberOfComments,isSponsored:e==null?void 0:e.isSponsored,isBookmarked:e==null?void 0:e.isBookmarked,onSelectCard:()=>i==null?void 0:i(e),onSelectOption:b=>a==null?void 0:a(b),onShare:()=>n==null?void 0:n(e),onBookmark:()=>l==null?void 0:l(e),imageUrl:p(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null},`blog-card-item__${u+1}`)),[s]);return r.jsx(z,{className:g?"separated":"",children:r.jsx(R.SuspenseBlogLarge,{isLoading:m,limit:5,keyPrefix:"blog-section",children:f})})});module.exports=L;
@@ -1,13 +1,13 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as v, memo as z, useMemo as I } from "react";
3
- import h from "./Icon.js";
4
- import b from "./IconButton.js";
2
+ import { forwardRef as y, memo as z, useMemo as I } from "react";
3
+ import b from "./Icon.js";
4
+ import w from "./IconButton.js";
5
5
  import R from "./Chip.js";
6
- import { p as j, s as k, v as C, w } from "./utils-BbgAIA9N.js";
7
- import { P } from "./index-YGcWbzeb.js";
8
- import { s as y } from "./emotion-styled.browser.esm-BNN1dTl3.js";
9
- import { S as $ } from "./suspense-large-BM9s_kZP.js";
10
- const L = y.div`
6
+ import { p as j, s as C, v as P, w as v } from "./utils-BbgAIA9N.js";
7
+ import { P as $ } from "./index-YGcWbzeb.js";
8
+ import { s as N } from "./emotion-styled.browser.esm-BNN1dTl3.js";
9
+ import { S as B } from "./suspense-large-BM9s_kZP.js";
10
+ const L = N.div`
11
11
  display: flex;
12
12
  padding: 1rem;
13
13
  align-items: center;
@@ -126,7 +126,7 @@ const L = y.div`
126
126
  }
127
127
  }
128
128
  }
129
- `, T = v(
129
+ `, T = y(
130
130
  ({
131
131
  title: m,
132
132
  imageUrl: n,
@@ -136,70 +136,71 @@ const L = y.div`
136
136
  timeToRead: o = 0,
137
137
  numberOfLikes: c = 0,
138
138
  numberOfComments: d = 0,
139
- onSelectCard: p = () => {
139
+ isBookmarked: p = !1,
140
+ onSelectCard: _ = () => {
140
141
  },
141
- onSelectOption: u = () => {
142
+ onSelectOption: f = () => {
142
143
  },
143
- onBookmark: f = () => {
144
+ onBookmark: e = () => {
144
145
  },
145
- onShare: e = () => {
146
+ onShare: g = () => {
146
147
  }
147
- }, _) => /* @__PURE__ */ i(L, { onClick: p, children: [
148
- /* @__PURE__ */ t(P, { src: n, className: "wrapper__image" }),
148
+ }, h) => /* @__PURE__ */ i(L, { onClick: _, children: [
149
+ /* @__PURE__ */ t($, { src: n, className: "wrapper__image" }),
149
150
  /* @__PURE__ */ i("div", { className: "wrapper__content", children: [
150
151
  /* @__PURE__ */ i("div", { className: "wrapper__subcontent", children: [
151
152
  /* @__PURE__ */ t("div", { className: "wrapper__title", children: m }),
152
- /* @__PURE__ */ t("div", { className: "wrapper__tags", children: a && (a == null ? void 0 : a.map((r, N) => /* @__PURE__ */ t(
153
+ /* @__PURE__ */ t("div", { className: "wrapper__tags", children: a && (a == null ? void 0 : a.map((r, k) => /* @__PURE__ */ t(
153
154
  R,
154
155
  {
155
156
  label: r == null ? void 0 : r.name,
156
157
  color: r == null ? void 0 : r.color,
157
158
  className: "wrapper__tag",
158
- onClick: (g) => {
159
- g == null || g.stopPropagation(), u(r == null ? void 0 : r.code);
159
+ onClick: (u) => {
160
+ u == null || u.stopPropagation(), f(r == null ? void 0 : r.code);
160
161
  }
161
162
  },
162
- `blog-card-sponsored-option__${N + 1}`
163
+ `blog-card-sponsored-option__${k + 1}`
163
164
  ))) })
164
165
  ] }),
165
166
  /* @__PURE__ */ i("div", { className: "wrapper__info", children: [
166
167
  /* @__PURE__ */ i("div", { className: "info__content", children: [
167
- /* @__PURE__ */ t("div", { className: "info__text", children: `${k(
168
+ /* @__PURE__ */ t("div", { className: "info__text", children: `${C(
168
169
  l
169
- )} • ${C(s, o)}` }),
170
+ )} • ${P(s, o)}` }),
170
171
  /* @__PURE__ */ i("div", { className: "info__text", children: [
171
172
  /* @__PURE__ */ i("div", { children: [
172
- /* @__PURE__ */ t(h, { icon: " mng-lnc-thumbs-up", sizeInUnits: "1rem" }),
173
- w(c)
173
+ /* @__PURE__ */ t(b, { icon: " mng-lnc-thumbs-up", sizeInUnits: "1rem" }),
174
+ v(c)
174
175
  ] }),
175
176
  /* @__PURE__ */ i("div", { children: [
176
- /* @__PURE__ */ t(h, { icon: " mng-lnc-messages", sizeInUnits: "1rem" }),
177
- w(d)
177
+ /* @__PURE__ */ t(b, { icon: " mng-lnc-messages", sizeInUnits: "1rem" }),
178
+ v(d)
178
179
  ] })
179
180
  ] })
180
181
  ] }),
181
182
  /* @__PURE__ */ i("div", { className: "info__content", children: [
182
183
  /* @__PURE__ */ t(
183
- b,
184
+ w,
184
185
  {
185
- icon: " mng-lnc-bookmark",
186
+ icon: p ? " mng-lnc-bookmark--filled" : " mng-lnc-bookmark",
186
187
  borderRadius: "curved",
187
188
  btnType: "basic",
188
189
  color: "neutral",
189
190
  onClick: (r) => {
190
- r == null || r.stopPropagation(), f();
191
+ r == null || r.stopPropagation(), e();
191
192
  }
192
193
  }
193
194
  ),
194
195
  /* @__PURE__ */ t(
195
- b,
196
+ w,
196
197
  {
197
198
  icon: " mng-lnc-share",
198
199
  borderRadius: "curved",
199
200
  btnType: "basic",
200
201
  color: "neutral",
201
202
  onClick: (r) => {
202
- r == null || r.stopPropagation(), e();
203
+ r == null || r.stopPropagation(), g();
203
204
  }
204
205
  }
205
206
  )
@@ -207,7 +208,7 @@ const L = y.div`
207
208
  ] })
208
209
  ] })
209
210
  ] })
210
- ), U = y.div`
211
+ ), U = N.div`
211
212
  display: flex;
212
213
  flex-direction: column;
213
214
  align-items: flex-start;
@@ -229,7 +230,7 @@ const L = y.div`
229
230
  bottom: -0.75rem;
230
231
  }
231
232
  }
232
- `, B = z(T), H = v(
233
+ `, W = z(T), J = y(
233
234
  ({
234
235
  timeToReadText: m = "{0} min read",
235
236
  items: n,
@@ -245,9 +246,9 @@ const L = y.div`
245
246
  getImage: d = () => {
246
247
  },
247
248
  isSeparated: p = !0
248
- }, u) => {
249
- const f = I(() => n == null ? void 0 : n.map((e, _) => /* @__PURE__ */ t(
250
- B,
249
+ }, _) => {
250
+ const f = I(() => n == null ? void 0 : n.map((e, g) => /* @__PURE__ */ t(
251
+ W,
251
252
  {
252
253
  title: e == null ? void 0 : e.title,
253
254
  titleSlug: e == null ? void 0 : e.titleSlug,
@@ -258,16 +259,17 @@ const L = y.div`
258
259
  numberOfLikes: e == null ? void 0 : e.numberOfLikes,
259
260
  numberOfComments: e == null ? void 0 : e.numberOfComments,
260
261
  isSponsored: e == null ? void 0 : e.isSponsored,
262
+ isBookmarked: e == null ? void 0 : e.isBookmarked,
261
263
  onSelectCard: () => a == null ? void 0 : a(e),
262
- onSelectOption: (r) => l == null ? void 0 : l(r),
264
+ onSelectOption: (h) => l == null ? void 0 : l(h),
263
265
  onShare: () => s == null ? void 0 : s(e),
264
266
  onBookmark: () => o == null ? void 0 : o(e),
265
267
  imageUrl: d(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null
266
268
  },
267
- `blog-card-item__${_ + 1}`
269
+ `blog-card-item__${g + 1}`
268
270
  )), [n]);
269
271
  return /* @__PURE__ */ t(U, { className: p ? "separated" : "", children: /* @__PURE__ */ t(
270
- $,
272
+ B,
271
273
  {
272
274
  isLoading: c,
273
275
  limit: 5,
@@ -278,5 +280,5 @@ const L = y.div`
278
280
  }
279
281
  );
280
282
  export {
281
- H as default
283
+ J as default
282
284
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.108",
3
+ "version": "4.0.109",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [