@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.cjs +2 -2
- package/dist/index.js +156 -124
- package/package.json +1 -1
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
|
-
|
|
50327
|
-
|
|
50328
|
-
|
|
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
|
-
|
|
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: "
|
|
50340
|
-
alignItems: "
|
|
50339
|
+
gap: "xs",
|
|
50340
|
+
alignItems: "flex-start",
|
|
50341
50341
|
style: c ? { paddingTop: c } : void 0,
|
|
50342
50342
|
children: [
|
|
50343
|
-
e !== void 0 && /* @__PURE__ */
|
|
50344
|
-
direction: "
|
|
50345
|
-
gap: "2px",
|
|
50343
|
+
e !== void 0 && /* @__PURE__ */ H(Y, {
|
|
50344
|
+
direction: "vertical",
|
|
50346
50345
|
alignItems: "center",
|
|
50347
|
-
|
|
50348
|
-
|
|
50346
|
+
gap: "0px",
|
|
50347
|
+
children: [/* @__PURE__ */ V(di, {
|
|
50348
|
+
content: `${h} views`,
|
|
50349
50349
|
relationship: "label",
|
|
50350
|
-
|
|
50351
|
-
|
|
50352
|
-
"
|
|
50353
|
-
|
|
50354
|
-
|
|
50355
|
-
|
|
50356
|
-
|
|
50357
|
-
|
|
50358
|
-
|
|
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
|
-
|
|
50363
|
-
direction: "
|
|
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:
|
|
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: {
|
|
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
|
-
|
|
50402
|
+
style: { textAlign: "center" },
|
|
50403
|
+
children: g
|
|
50388
50404
|
})]
|
|
50389
50405
|
}),
|
|
50390
|
-
r && n !== void 0 && n > 0 && /* @__PURE__ */
|
|
50391
|
-
direction: "
|
|
50392
|
-
gap: "2px",
|
|
50406
|
+
r && n !== void 0 && n > 0 && /* @__PURE__ */ H(Y, {
|
|
50407
|
+
direction: "vertical",
|
|
50393
50408
|
alignItems: "center",
|
|
50394
|
-
|
|
50395
|
-
|
|
50409
|
+
gap: "0px",
|
|
50410
|
+
children: [/* @__PURE__ */ V(di, {
|
|
50411
|
+
content: `${_} comments`,
|
|
50396
50412
|
relationship: "label",
|
|
50397
|
-
|
|
50398
|
-
|
|
50399
|
-
|
|
50400
|
-
|
|
50401
|
-
|
|
50402
|
-
/* @__PURE__ */ V(
|
|
50403
|
-
|
|
50404
|
-
|
|
50405
|
-
|
|
50406
|
-
|
|
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(
|
|
50414
|
-
|
|
50415
|
-
|
|
50416
|
-
|
|
50417
|
-
|
|
50418
|
-
|
|
50419
|
-
|
|
50420
|
-
|
|
50421
|
-
|
|
50422
|
-
|
|
50423
|
-
|
|
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__ */
|
|
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:
|
|
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
|
-
|
|
50450
|
-
|
|
50451
|
-
|
|
50452
|
-
|
|
50453
|
-
|
|
50454
|
-
|
|
50455
|
-
|
|
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,
|
|
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:
|
|
51000
|
-
headline:
|
|
51001
|
-
formatUtcDate:
|
|
51002
|
-
}),
|
|
51003
|
-
|
|
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 ?
|
|
51008
|
-
children:
|
|
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:
|
|
51047
|
+
children: S
|
|
51017
51048
|
}),
|
|
51018
|
-
g !== !1 &&
|
|
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:
|
|
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:
|
|
51031
|
-
dateText:
|
|
51032
|
-
views:
|
|
51033
|
-
likes:
|
|
51034
|
-
comments:
|
|
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
|
-
|
|
51040
|
-
|
|
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(
|
|
51079
|
+
className: K(A.overlayCard, l),
|
|
51048
51080
|
style: {
|
|
51049
51081
|
maxWidth: d ?? "100%",
|
|
51050
51082
|
minHeight: r ?? 160,
|
|
51051
|
-
cursor:
|
|
51083
|
+
cursor: M ? "pointer" : void 0,
|
|
51052
51084
|
...u
|
|
51053
51085
|
},
|
|
51054
|
-
...
|
|
51086
|
+
...N,
|
|
51055
51087
|
children: [
|
|
51056
|
-
/* @__PURE__ */ V("div", { className:
|
|
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:
|
|
51100
|
+
children: P(!0)
|
|
51069
51101
|
})
|
|
51070
51102
|
]
|
|
51071
51103
|
}) : /* @__PURE__ */ H(Y, {
|
|
51072
51104
|
direction: "horizontal",
|
|
51073
|
-
className: K(
|
|
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:
|
|
51110
|
+
cursor: M ? "pointer" : "default",
|
|
51079
51111
|
...u
|
|
51080
51112
|
},
|
|
51081
|
-
...
|
|
51082
|
-
children: [
|
|
51083
|
-
className:
|
|
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:
|
|
51089
|
-
alt:
|
|
51090
|
-
className:
|
|
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:
|
|
51102
|
-
children:
|
|
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:
|
|
69287
|
-
height:
|
|
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