@phillips/seldon 1.143.0 → 1.143.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/components/Countdown/Countdown.d.ts +3 -0
- package/dist/patterns/BidSnapshot/BidSnapshot.js +32 -31
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.d.ts +4 -0
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +19 -17
- package/dist/scss/components/Countdown/_countdown.scss +2 -2
- package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as S, jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { getCommonProps as
|
|
1
|
+
import { jsxs as S, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as V } from "react";
|
|
3
|
+
import k from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { getCommonProps as q, findChildrenOfType as z, findChildrenExcludingTypes as F } from "../../utils/index.js";
|
|
5
5
|
import G from "../DetailList/DetailList.js";
|
|
6
6
|
import d from "../../components/Detail/Detail.js";
|
|
7
7
|
import { LotStatus as n, SupportedLanguages as H } from "../../types/commonTypes.js";
|
|
@@ -11,66 +11,67 @@ import { BidStatusEnum as Q } from "./types.js";
|
|
|
11
11
|
import v from "./BidMessage.js";
|
|
12
12
|
import { isAfter as L } from "../../node_modules/date-fns/isAfter.js";
|
|
13
13
|
import { differenceInMinutes as U } from "../../node_modules/date-fns/differenceInMinutes.js";
|
|
14
|
-
const X = (o) => o === 1 ? `${o} bid` : `${o} bids`, Y =
|
|
14
|
+
const X = (o) => o === 1 ? `${o} bid` : `${o} bids`, Y = V(
|
|
15
15
|
({
|
|
16
16
|
lotStatus: o = n.ready,
|
|
17
17
|
bidStatus: p,
|
|
18
18
|
bidsLabelText: w = X,
|
|
19
19
|
children: c,
|
|
20
20
|
className: C,
|
|
21
|
-
closingText:
|
|
22
|
-
currency:
|
|
21
|
+
closingText: T = "Closes in",
|
|
22
|
+
currency: r = "$",
|
|
23
23
|
currentBid: f,
|
|
24
|
-
currentBidText:
|
|
25
|
-
formatDurationStr:
|
|
24
|
+
currentBidText: x = "Current bid",
|
|
25
|
+
formatDurationStr: N = (a) => a.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
|
|
26
26
|
lang: W = "en",
|
|
27
|
-
saleCloseDate:
|
|
28
|
-
lotCloseDate:
|
|
29
|
-
numberOfBids:
|
|
27
|
+
saleCloseDate: i,
|
|
28
|
+
lotCloseDate: l,
|
|
29
|
+
numberOfBids: u = 0,
|
|
30
30
|
startingBid: y,
|
|
31
31
|
startingBidText: B = "Starting bid",
|
|
32
|
-
soldPrice:
|
|
32
|
+
soldPrice: h,
|
|
33
33
|
soldForText: M = "Sold for",
|
|
34
34
|
wonForText: j = "Won for",
|
|
35
35
|
currentDateTime: E = /* @__PURE__ */ new Date(),
|
|
36
36
|
...$
|
|
37
37
|
}, P) => {
|
|
38
|
-
const { className:
|
|
39
|
-
[`${
|
|
40
|
-
[`${
|
|
38
|
+
const { className: a, ...R } = q($, "BidSnapshot"), m = f !== null && u > 0, b = o === n.ready, s = o === n.live, g = o === n.past, e = E, _ = s && l && L(l, e) && i && (U(i, e) < 60 || L(e, i)), A = z(c, v), D = F(c, [v]), I = k(a, C, {
|
|
39
|
+
[`${a}--live`]: s,
|
|
40
|
+
[`${a}--has-bids`]: m || g
|
|
41
41
|
});
|
|
42
|
-
return /* @__PURE__ */ S("div", { ...R, ...$, ref: P, className:
|
|
43
|
-
/* @__PURE__ */ S(G, { hasSeparators: !0, className: `${
|
|
44
|
-
g ? /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ S("div", { ...R, ...$, ref: P, className: I, children: [
|
|
43
|
+
/* @__PURE__ */ S(G, { hasSeparators: !0, className: `${a}__text`, children: [
|
|
44
|
+
g ? /* @__PURE__ */ t(
|
|
45
45
|
d,
|
|
46
46
|
{
|
|
47
47
|
label: p === Q.Won ? j : M,
|
|
48
|
-
value:
|
|
48
|
+
value: h ? `${r}${h?.toLocaleString()}` : "",
|
|
49
49
|
hasWrap: !1
|
|
50
50
|
}
|
|
51
51
|
) : null,
|
|
52
|
-
|
|
52
|
+
s && m ? /* @__PURE__ */ t(
|
|
53
53
|
d,
|
|
54
54
|
{
|
|
55
|
-
label:
|
|
56
|
-
subLabel: `(${w(
|
|
57
|
-
value: `${
|
|
55
|
+
label: x,
|
|
56
|
+
subLabel: `(${w(u)})`,
|
|
57
|
+
value: `${r}${f?.toLocaleString()}`,
|
|
58
58
|
hasWrap: !1
|
|
59
59
|
}
|
|
60
60
|
) : null,
|
|
61
|
-
b ||
|
|
61
|
+
b || s && !m ? /* @__PURE__ */ t(d, { label: B, value: `${r}${y?.toLocaleString()}`, hasWrap: !1 }) : null
|
|
62
62
|
] }),
|
|
63
63
|
p && !b ? A : null,
|
|
64
|
-
|
|
65
|
-
_ ? /* @__PURE__ */
|
|
64
|
+
D,
|
|
65
|
+
_ ? /* @__PURE__ */ t(
|
|
66
66
|
J,
|
|
67
67
|
{
|
|
68
|
-
endDateTime:
|
|
69
|
-
label:
|
|
68
|
+
endDateTime: l,
|
|
69
|
+
label: T,
|
|
70
70
|
variant: K.compact,
|
|
71
71
|
locale: H[W],
|
|
72
|
-
formatDurationStr:
|
|
73
|
-
showBottomBorder: !1
|
|
72
|
+
formatDurationStr: N,
|
|
73
|
+
showBottomBorder: !1,
|
|
74
|
+
currentDateTime: e
|
|
74
75
|
}
|
|
75
76
|
) : null
|
|
76
77
|
] });
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
2
|
+
import { forwardRef as M } from "react";
|
|
3
|
+
import { getCommonProps as R } from "../../utils/index.js";
|
|
4
|
+
import D from "../../node_modules/classnames/index.js";
|
|
5
5
|
import h from "../../components/Countdown/Countdown.js";
|
|
6
|
-
import
|
|
7
|
-
import { AuctionStatus as
|
|
6
|
+
import F from "../../components/SeldonImage/SeldonImage.js";
|
|
7
|
+
import { AuctionStatus as O } from "../../types/commonTypes.js";
|
|
8
8
|
import { TextVariants as r } from "../../components/Text/types.js";
|
|
9
9
|
import t from "../../components/Text/Text.js";
|
|
10
|
-
import
|
|
10
|
+
import q from "../../components/PageContentWrapper/PageContentWrapper.js";
|
|
11
11
|
import { SSRMediaQuery as f } from "../../providers/SeldonProvider/utils.js";
|
|
12
|
-
const
|
|
12
|
+
const z = M(
|
|
13
13
|
({
|
|
14
14
|
auctionEndTime: i,
|
|
15
15
|
auctionTitle: o,
|
|
@@ -23,23 +23,25 @@ const q = H(
|
|
|
23
23
|
countdownFormatDuration: x,
|
|
24
24
|
auctionState: B,
|
|
25
25
|
occurrenceInformation: k,
|
|
26
|
-
onClick:
|
|
26
|
+
onClick: A,
|
|
27
27
|
children: C,
|
|
28
28
|
className: P,
|
|
29
29
|
footerElement: b,
|
|
30
30
|
headerLabel: j,
|
|
31
31
|
showTimer: c,
|
|
32
|
+
currentDateTime: y,
|
|
32
33
|
...s
|
|
33
34
|
}, l) => {
|
|
34
|
-
const { className: e, ...m } =
|
|
35
|
+
const { className: e, ...m } = R(s, "SaleHeaderBanner"), d = B === O.live, _ = {
|
|
35
36
|
endDateTime: i,
|
|
36
37
|
label: w,
|
|
37
|
-
formatDurationStr: x
|
|
38
|
+
formatDurationStr: x,
|
|
39
|
+
currentDateTime: y
|
|
38
40
|
};
|
|
39
|
-
return /* @__PURE__ */ n("div", { ...m, className:
|
|
41
|
+
return /* @__PURE__ */ n("div", { ...m, className: D(e, P), ...s, ref: l, children: [
|
|
40
42
|
d && i && c ? /* @__PURE__ */ a(f.Media, { lessThan: "md", children: /* @__PURE__ */ a("div", { className: `${e}__stack__countdown`, children: /* @__PURE__ */ a(h, { ..._, showBottomBorder: !1 }) }) }) : null,
|
|
41
43
|
/* @__PURE__ */ a(
|
|
42
|
-
|
|
44
|
+
F,
|
|
43
45
|
{
|
|
44
46
|
aspectRatio: "16/9",
|
|
45
47
|
src: g,
|
|
@@ -52,14 +54,14 @@ const q = H(
|
|
|
52
54
|
fetchPriority: S
|
|
53
55
|
}
|
|
54
56
|
),
|
|
55
|
-
/* @__PURE__ */ a(
|
|
57
|
+
/* @__PURE__ */ a(q, { className: `${e}__stack-wrapper`, ...m, ...s, ref: l, children: /* @__PURE__ */ n("div", { className: `${e}__stack`, children: [
|
|
56
58
|
d && i && c ? /* @__PURE__ */ a(f.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ a("div", { className: `${e}__stack__countdown`, children: /* @__PURE__ */ a(h, { ..._ }) }) }) : null,
|
|
57
59
|
/* @__PURE__ */ a(t, { variant: r.badge, children: j }),
|
|
58
60
|
/* @__PURE__ */ a(t, { variant: r.title1, children: o }),
|
|
59
61
|
/* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__location`, children: $ }),
|
|
60
62
|
/* @__PURE__ */ n("div", { className: `${e}__occurrence-details`, children: [
|
|
61
|
-
k.map(({ date: p, occurrenceLabel:
|
|
62
|
-
/* @__PURE__ */ a(t, { variant: r.string2, children:
|
|
63
|
+
k.map(({ date: p, occurrenceLabel: H }) => /* @__PURE__ */ n("div", { className: `${e}__occurrence-details-text`, children: [
|
|
64
|
+
/* @__PURE__ */ a(t, { variant: r.string2, children: H }),
|
|
63
65
|
/* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__date`, children: p })
|
|
64
66
|
] }, String(p))),
|
|
65
67
|
C
|
|
@@ -69,7 +71,7 @@ const q = H(
|
|
|
69
71
|
] });
|
|
70
72
|
}
|
|
71
73
|
);
|
|
72
|
-
|
|
74
|
+
z.displayName = "SaleHeaderBanner";
|
|
73
75
|
export {
|
|
74
|
-
|
|
76
|
+
z as default
|
|
75
77
|
};
|