@spteck/react-controls-v2 2.7.1 → 2.7.2

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/index.js CHANGED
@@ -50321,51 +50321,63 @@ var wv = {
50321
50321
  color: e,
50322
50322
  verticalAlign: "middle"
50323
50323
  }),
50324
- buttonIcon: J({
50325
- "&&": {
50326
- fontSize: n - 3,
50327
- color: e,
50328
- verticalAlign: "middle"
50329
- },
50330
- "&&:hover": {
50331
- color: q.colorBrandBackground,
50332
- backdropFilter: "blur(6px)"
50333
- }
50334
- })
50324
+ buttonIcon: J({ "&&": {
50325
+ fontSize: n - 3,
50326
+ color: e,
50327
+ verticalAlign: "middle"
50328
+ } })
50335
50329
  }), Mv = ({ views: e, likes: t, comments: n, showComments: r = !0, color: i, isOverDue: a = !1, iconSize: o = 20, heartSize: s = 16, paddingTop: c, showShare: l = !1, onShare: u }) => {
50336
50330
  let d = N_().getEmoji("heart"), f = a ? q.colorStatusWarningForeground1 : i, p = jv(i, f, o);
50337
- return e === void 0 && t === void 0 && (!r || n === void 0 || n <= 0) && !l ? null : /* @__PURE__ */ H(Y, {
50331
+ if (e === void 0 && (t === void 0 || t <= 0) && (!r || n === void 0 || n <= 0) && !l) return null;
50332
+ let m = {
50333
+ backgroundColor: q.colorNeutralBackgroundAlpha,
50334
+ border: `1px solid ${q.colorNeutralStroke2}`,
50335
+ backdropFilter: "blur(6px)"
50336
+ }, h = M.useMemo(() => e === void 0 ? void 0 : gv(e), [e]), g = M.useMemo(() => t === void 0 ? void 0 : gv(t), [t]), _ = M.useMemo(() => n === void 0 ? void 0 : gv(n), [n]);
50337
+ return /* @__PURE__ */ H(Y, {
50338
50338
  direction: "horizontal",
50339
- gap: "s",
50340
- alignItems: "center",
50339
+ gap: "xs",
50340
+ alignItems: "flex-start",
50341
50341
  style: c ? { paddingTop: c } : void 0,
50342
50342
  children: [
50343
- e !== void 0 && /* @__PURE__ */ V(Y, {
50344
- direction: "horizontal",
50345
- gap: "2px",
50343
+ e !== void 0 && /* @__PURE__ */ H(Y, {
50344
+ direction: "vertical",
50346
50345
  alignItems: "center",
50347
- children: /* @__PURE__ */ V(di, {
50348
- content: "Views",
50346
+ gap: "0px",
50347
+ children: [/* @__PURE__ */ V(di, {
50348
+ content: `${h} views`,
50349
50349
  relationship: "label",
50350
- children: /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V(ha, {
50351
- className: p.viewIcon,
50352
- "aria-hidden": !0
50353
- }), /* @__PURE__ */ V(X, {
50354
- fontSize: "xs",
50355
- color: f,
50356
- fontWeight: "bold",
50357
- paddingLeft: "xs",
50358
- children: gv(e)
50359
- })] })
50360
- })
50350
+ withArrow: !0,
50351
+ children: /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V(W, {
50352
+ appearance: "subtle",
50353
+ shape: "circular",
50354
+ size: "small",
50355
+ icon: /* @__PURE__ */ V(ha, {
50356
+ className: p.viewIcon,
50357
+ "aria-hidden": !0
50358
+ }),
50359
+ "aria-label": "Views",
50360
+ style: {
50361
+ cursor: "default",
50362
+ ...m
50363
+ }
50364
+ }) })
50365
+ }), /* @__PURE__ */ V(X, {
50366
+ fontSize: "xs",
50367
+ color: f,
50368
+ fontWeight: "bold",
50369
+ style: { textAlign: "center" },
50370
+ children: h
50371
+ })]
50361
50372
  }),
50362
- (t === void 0 || t > 0) && /* @__PURE__ */ H(Y, {
50363
- direction: "horizontal",
50364
- gap: "2px",
50373
+ t !== void 0 && t > 0 && /* @__PURE__ */ H(Y, {
50374
+ direction: "vertical",
50365
50375
  alignItems: "center",
50376
+ gap: "0px",
50366
50377
  children: [d && /* @__PURE__ */ V(di, {
50367
- content: "Likes",
50378
+ content: `${g} likes`,
50368
50379
  relationship: "label",
50380
+ withArrow: !0,
50369
50381
  children: /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V(W, {
50370
50382
  appearance: "subtle",
50371
50383
  shape: "circular",
@@ -50378,50 +50390,65 @@ var wv = {
50378
50390
  height: s
50379
50391
  }),
50380
50392
  "aria-label": "Likes",
50381
- style: { cursor: "default" }
50393
+ style: {
50394
+ cursor: "default",
50395
+ ...m
50396
+ }
50382
50397
  }) })
50383
50398
  }), /* @__PURE__ */ V(X, {
50384
50399
  fontSize: "xs",
50385
50400
  color: i,
50386
50401
  fontWeight: "bold",
50387
- children: t !== void 0 && gv(t)
50402
+ style: { textAlign: "center" },
50403
+ children: g
50388
50404
  })]
50389
50405
  }),
50390
- r && n !== void 0 && n > 0 && /* @__PURE__ */ V(Y, {
50391
- direction: "horizontal",
50392
- gap: "2px",
50406
+ r && n !== void 0 && n > 0 && /* @__PURE__ */ H(Y, {
50407
+ direction: "vertical",
50393
50408
  alignItems: "center",
50394
- children: /* @__PURE__ */ V(di, {
50395
- content: "Comments",
50409
+ gap: "0px",
50410
+ children: [/* @__PURE__ */ V(di, {
50411
+ content: `${_} comments`,
50396
50412
  relationship: "label",
50397
- children: /* @__PURE__ */ H("div", { children: [
50398
- /* @__PURE__ */ V(sa, {
50399
- className: p.commentIcon,
50400
- "aria-hidden": !0
50401
- }),
50402
- /* @__PURE__ */ V(X, {
50403
- fontSize: "xs",
50404
- color: i,
50405
- fontWeight: "bold",
50406
- children: gv(n)
50407
- }),
50408
- "/",
50409
- " "
50410
- ] })
50411
- })
50413
+ withArrow: !0,
50414
+ children: /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V(W, {
50415
+ appearance: "subtle",
50416
+ shape: "circular",
50417
+ size: "small",
50418
+ icon: /* @__PURE__ */ V(sa, { className: p.commentIcon }),
50419
+ "aria-label": "Comments",
50420
+ style: {
50421
+ cursor: "default",
50422
+ ...m
50423
+ }
50424
+ }) })
50425
+ }), /* @__PURE__ */ V(X, {
50426
+ fontSize: "xs",
50427
+ color: i,
50428
+ fontWeight: "bold",
50429
+ style: { textAlign: "center" },
50430
+ children: _
50431
+ })]
50412
50432
  }),
50413
- l && /* @__PURE__ */ V(di, {
50414
- content: "Share",
50415
- relationship: "label",
50416
- children: /* @__PURE__ */ V(W, {
50417
- appearance: "subtle",
50418
- shape: "circular",
50419
- size: "small",
50420
- icon: /* @__PURE__ */ V(ja, { className: p.buttonIcon }),
50421
- "aria-label": "Share",
50422
- onClick: (e) => {
50423
- e.stopPropagation(), e.preventDefault(), u?.();
50424
- }
50433
+ l && /* @__PURE__ */ V(Y, {
50434
+ direction: "vertical",
50435
+ alignItems: "center",
50436
+ gap: "0px",
50437
+ children: /* @__PURE__ */ V(di, {
50438
+ content: "Share",
50439
+ relationship: "label",
50440
+ withArrow: !0,
50441
+ children: /* @__PURE__ */ V(W, {
50442
+ appearance: "subtle",
50443
+ shape: "circular",
50444
+ size: "small",
50445
+ icon: /* @__PURE__ */ V(ja, { className: p.buttonIcon }),
50446
+ "aria-label": "Share",
50447
+ style: { ...m },
50448
+ onClick: (e) => {
50449
+ e.stopPropagation(), e.preventDefault(), u?.();
50450
+ }
50451
+ })
50425
50452
  })
50426
50453
  })
50427
50454
  ]
@@ -50430,29 +50457,33 @@ var wv = {
50430
50457
  let m = c && !!e, h = c && !!t, g = l && (n !== void 0 || r !== void 0 || a && i !== void 0) || u;
50431
50458
  if (!m && !h && !g) return null;
50432
50459
  let _ = o ? q.colorNeutralForegroundStaticInverted : q.colorNeutralForeground2, v = s ? Ov : o ? q.colorNeutralForegroundStaticInverted : q.colorNeutralForeground3, y = o ? q.colorNeutralForegroundStaticInverted : q.colorNeutralForeground3;
50433
- return /* @__PURE__ */ H(Y, {
50460
+ return /* @__PURE__ */ V(Y, {
50434
50461
  direction: "vertical",
50435
50462
  gap: "0px",
50436
50463
  className: f,
50437
- style: p,
50464
+ style: { ...p },
50438
50465
  paddingTop: "s",
50439
- children: [m && /* @__PURE__ */ V(X, {
50440
- fontWeight: "semibold",
50441
- fontSize: "12px",
50442
- color: _,
50443
- style: { lineHeight: "1.3" },
50444
- children: e
50445
- }), (h || g) && /* @__PURE__ */ H(Y, {
50466
+ children: /* @__PURE__ */ H(Y, {
50446
50467
  direction: "horizontal",
50447
50468
  gap: "0px",
50448
50469
  justifyContent: "space-between",
50449
- alignItems: "center",
50450
- children: [h ? /* @__PURE__ */ V(X, {
50451
- fontSize: "11px",
50452
- color: v,
50453
- style: { lineHeight: "1.2" },
50454
- children: t
50455
- }) : /* @__PURE__ */ V("span", {}), g && /* @__PURE__ */ V(Mv, {
50470
+ children: [/* @__PURE__ */ H(Y, {
50471
+ direction: "vertical",
50472
+ gap: "0px",
50473
+ justifyContent: "end",
50474
+ children: [m && /* @__PURE__ */ V(X, {
50475
+ fontWeight: "semibold",
50476
+ fontSize: "12px",
50477
+ color: _,
50478
+ style: { lineHeight: "1.3" },
50479
+ children: e
50480
+ }), h && /* @__PURE__ */ V(X, {
50481
+ fontSize: "11px",
50482
+ color: v,
50483
+ style: { lineHeight: "1.2" },
50484
+ children: t
50485
+ })]
50486
+ }), g && /* @__PURE__ */ V(Mv, {
50456
50487
  views: n,
50457
50488
  likes: r,
50458
50489
  comments: i,
@@ -50462,7 +50493,7 @@ var wv = {
50462
50493
  showShare: u,
50463
50494
  onShare: d
50464
50495
  })]
50465
- })]
50496
+ })
50466
50497
  });
50467
50498
  }, Pv = (e) => {
50468
50499
  let { item: t, linkUrl: n, onClick: r, isOverDue: i = !1, variant: a = "default", className: o, styles: s, maxWidth: c, locale: l = navigator.language, timeZone: u = Intl.DateTimeFormat().resolvedOptions().timeZone, headlineLines: d, bodyLines: f, showBodyText: p = !0, showAuthorDate: m = !0, showStats: h = !0, showComments: g = !0, showShare: _ = !1, onShare: v } = e, y = a ?? "default", { category: b, headline: x, bodyText: S, author: C, date: w, imageUrl: T, views: E, likes: D, comments: O } = t, k = Av(i), { formatUtcDate: A } = G_(l, u), { dateText: j, isInteractive: ee } = U_({
@@ -50993,19 +51024,19 @@ var wv = {
50993
51024
  })
50994
51025
  });
50995
51026
  }, Uv = (e) => {
50996
- let { item: t, imageWidth: n = 120, height: r, imagePosition: i = "left", variant: a = "default", linkUrl: o, onClick: s, isOverDue: c = !1, className: l, styles: u, maxWidth: d, locale: f = navigator.language, timeZone: p = Intl.DateTimeFormat().resolvedOptions().timeZone, headlineLines: m, bodyLines: h, showBodyText: g = !0, showAuthorDate: _ = !0, showStats: v = !0, showComments: y = !0, showShare: b = !1, onShare: x } = e, { category: S, headline: C, bodyText: w, author: T, date: E, imageUrl: D, views: O, likes: k, comments: A } = t, j = Vv(c, i, a, D), { formatUtcDate: ee } = G_(f, p), { dateText: M, isInteractive: N, interactiveProps: P } = U_({
51027
+ let { item: t, imageWidth: n = 120, height: r, imagePosition: i = "left", variant: a = "default", linkUrl: o, onClick: s, isOverDue: c = !1, className: l, styles: u, maxWidth: d, locale: f = navigator.language, timeZone: p = Intl.DateTimeFormat().resolvedOptions().timeZone, headlineLines: m, bodyLines: h, showBodyText: g = !0, showAuthorDate: _ = !0, showStats: v = !0, showShare: y = !1, onShare: b } = e, { category: x, headline: S, bodyText: C, author: w, date: T, imageUrl: E, views: D, likes: O, comments: k } = t, A = Vv(c, i, a, E), { formatUtcDate: j } = G_(f, p), { dateText: ee, isInteractive: M, interactiveProps: N } = U_({
50997
51028
  linkUrl: o,
50998
51029
  onClick: s,
50999
- date: E,
51000
- headline: C,
51001
- formatUtcDate: ee
51002
- }), te = (e) => /* @__PURE__ */ H(B, { children: [
51003
- S && /* @__PURE__ */ V(X, {
51030
+ date: T,
51031
+ headline: S,
51032
+ formatUtcDate: j
51033
+ }), P = (e) => /* @__PURE__ */ H(B, { children: [
51034
+ x && /* @__PURE__ */ V(X, {
51004
51035
  fontSize: "xs",
51005
51036
  fontWeight: "bold",
51006
51037
  color: e ? q.colorBrandBackground : c ? zv : q.colorBrandForeground1,
51007
- className: e ? j.overlayCategoryLabel : j.categoryLabel,
51008
- children: S
51038
+ className: e ? A.overlayCategoryLabel : A.categoryLabel,
51039
+ children: x
51009
51040
  }),
51010
51041
  /* @__PURE__ */ V(X, {
51011
51042
  fontSize: "m",
@@ -51013,47 +51044,48 @@ var wv = {
51013
51044
  color: e ? q.colorNeutralForegroundStaticInverted : q.colorNeutralForeground1,
51014
51045
  style: { lineHeight: q.lineHeightBase400 },
51015
51046
  numberOfLines: m,
51016
- children: C
51047
+ children: S
51017
51048
  }),
51018
- g !== !1 && w && /* @__PURE__ */ V(X, {
51049
+ g !== !1 && C && /* @__PURE__ */ V(X, {
51019
51050
  fontSize: "s",
51020
51051
  color: e ? q.colorNeutralForegroundStaticInverted : q.colorNeutralForeground2,
51021
51052
  numberOfLines: h ?? 1,
51022
51053
  block: !0,
51023
- children: w
51054
+ children: C
51024
51055
  }),
51025
51056
  /* @__PURE__ */ V(Y, {
51026
51057
  direction: "vertical",
51027
51058
  gap: "xs",
51028
51059
  paddingRight: "xl",
51060
+ justifyContent: "end",
51061
+ marginTop: "auto",
51029
51062
  children: /* @__PURE__ */ V(Hv, {
51030
- author: T,
51031
- dateText: M,
51032
- views: O,
51033
- likes: k,
51034
- comments: A,
51063
+ author: w,
51064
+ dateText: ee,
51065
+ views: D,
51066
+ likes: O,
51067
+ comments: k,
51035
51068
  isOverlay: e,
51036
51069
  isOverDue: c,
51037
51070
  showAuthorDate: _,
51038
51071
  showStats: v,
51039
- showComments: y,
51040
- showShare: b,
51041
- onShare: x ? () => x(t) : void 0
51072
+ showShare: y,
51073
+ onShare: b ? () => b(t) : void 0
51042
51074
  })
51043
51075
  })
51044
51076
  ] });
51045
51077
  return a === "overlay" ? /* @__PURE__ */ H(Y, {
51046
51078
  direction: "vertical",
51047
- className: K(j.overlayCard, l),
51079
+ className: K(A.overlayCard, l),
51048
51080
  style: {
51049
51081
  maxWidth: d ?? "100%",
51050
51082
  minHeight: r ?? 160,
51051
- cursor: N ? "pointer" : void 0,
51083
+ cursor: M ? "pointer" : void 0,
51052
51084
  ...u
51053
51085
  },
51054
- ...P,
51086
+ ...N,
51055
51087
  children: [
51056
- /* @__PURE__ */ V("div", { className: j.overlayContent }),
51088
+ /* @__PURE__ */ V("div", { className: A.overlayContent }),
51057
51089
  /* @__PURE__ */ V("div", { style: { flex: 1 } }),
51058
51090
  /* @__PURE__ */ V(Y, {
51059
51091
  direction: "vertical",
@@ -51065,29 +51097,29 @@ var wv = {
51065
51097
  position: "relative",
51066
51098
  zIndex: 1
51067
51099
  },
51068
- children: te(!0)
51100
+ children: P(!0)
51069
51101
  })
51070
51102
  ]
51071
51103
  }) : /* @__PURE__ */ H(Y, {
51072
51104
  direction: "horizontal",
51073
- className: K(j.card, l),
51105
+ className: K(A.card, l),
51074
51106
  style: {
51075
51107
  maxWidth: d ?? "100%",
51076
51108
  height: r ?? void 0,
51077
51109
  flexDirection: i === "right" ? "row-reverse" : "row",
51078
- cursor: N ? "pointer" : "default",
51110
+ cursor: M ? "pointer" : "default",
51079
51111
  ...u
51080
51112
  },
51081
- ...P,
51082
- children: [D && /* @__PURE__ */ V("div", {
51083
- className: j.imageContainer,
51113
+ ...N,
51114
+ children: [E && /* @__PURE__ */ V("div", {
51115
+ className: A.imageContainer,
51084
51116
  style: { width: n },
51085
51117
  children: /* @__PURE__ */ V(yv, {
51086
51118
  ratio: 1,
51087
51119
  children: /* @__PURE__ */ V("img", {
51088
- src: D,
51089
- alt: C,
51090
- className: j.image,
51120
+ src: E,
51121
+ alt: S,
51122
+ className: A.image,
51091
51123
  loading: "lazy"
51092
51124
  })
51093
51125
  })
@@ -51098,8 +51130,8 @@ var wv = {
51098
51130
  paddingBottom: "m",
51099
51131
  paddingLeft: "l",
51100
51132
  paddingRight: "l",
51101
- className: j.contentArea,
51102
- children: te(!1)
51133
+ className: A.contentArea,
51134
+ children: P(!1)
51103
51135
  })]
51104
51136
  });
51105
51137
  }, Wv = (e) => {
@@ -69283,8 +69315,8 @@ var EA = M.memo(({ item: e, heroProps: t, containerWidth: n, mediaType: r = "ima
69283
69315
  draggable: f,
69284
69316
  children: /* @__PURE__ */ V(Uv, {
69285
69317
  item: e,
69286
- imageWidth: 140,
69287
- height: 140,
69318
+ imageWidth: 180,
69319
+ height: 180,
69288
69320
  linkUrl: e.linkUrl,
69289
69321
  variant: "flat",
69290
69322
  locale: t,
@@ -69364,6 +69396,8 @@ var EA = M.memo(({ item: e, heroProps: t, containerWidth: n, mediaType: r = "ima
69364
69396
  locale: n,
69365
69397
  timeZone: r,
69366
69398
  maxWidth: "100%",
69399
+ imageWidth: 180,
69400
+ height: 180,
69367
69401
  headlineLines: a,
69368
69402
  bodyLines: o,
69369
69403
  showBodyText: s,
@@ -69371,9 +69405,7 @@ var EA = M.memo(({ item: e, heroProps: t, containerWidth: n, mediaType: r = "ima
69371
69405
  showStats: l,
69372
69406
  showComments: u,
69373
69407
  showShare: d,
69374
- onShare: f,
69375
- imageWidth: 140,
69376
- height: 140
69408
+ onShare: f
69377
69409
  })
69378
69410
  }, e.id))
69379
69411
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spteck/react-controls-v2",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "Framework-agnostic React controls for Vite, Next.js, and SPFx - based on Fluent UI 9",
5
5
  "license": "Elastic-2.0",
6
6
  "author": "João Mendes",