@phillips/seldon 1.111.0 → 1.111.1
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.
|
@@ -64,6 +64,10 @@ export interface SaleHeaderBannerProps extends ComponentProps<'div'> {
|
|
|
64
64
|
* An element to be rendered at the bottom of the banner
|
|
65
65
|
*/
|
|
66
66
|
footerElement?: React.ReactNode;
|
|
67
|
+
/**
|
|
68
|
+
* Determines if the countdown timer should be shown (if relevant)
|
|
69
|
+
*/
|
|
70
|
+
showTimer: boolean;
|
|
67
71
|
/**
|
|
68
72
|
* What action does the CTA take?
|
|
69
73
|
*/
|
|
@@ -1,73 +1,75 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as H } from "react";
|
|
3
|
+
import { getCommonProps as M } from "../../utils/index.js";
|
|
4
|
+
import R from "../../node_modules/classnames/index.js";
|
|
5
|
+
import h from "../../components/Countdown/Countdown.js";
|
|
6
6
|
import D from "../../components/SeldonImage/SeldonImage.js";
|
|
7
7
|
import { AuctionStatus as F } 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
|
|
11
|
-
|
|
10
|
+
import O from "../../components/PageContentWrapper/PageContentWrapper.js";
|
|
11
|
+
import { SSRMediaQuery as f } from "../../providers/SeldonProvider/utils.js";
|
|
12
|
+
const q = H(
|
|
12
13
|
({
|
|
13
|
-
auctionEndTime:
|
|
14
|
-
auctionTitle:
|
|
15
|
-
imageSrcUrl:
|
|
16
|
-
imageSrcSet:
|
|
17
|
-
imageSizes:
|
|
18
|
-
imageLoading:
|
|
19
|
-
imageFetchPriority:
|
|
20
|
-
location:
|
|
21
|
-
countdownTimerLabel:
|
|
22
|
-
countdownFormatDuration:
|
|
23
|
-
auctionState:
|
|
14
|
+
auctionEndTime: i,
|
|
15
|
+
auctionTitle: o,
|
|
16
|
+
imageSrcUrl: g,
|
|
17
|
+
imageSrcSet: v,
|
|
18
|
+
imageSizes: N,
|
|
19
|
+
imageLoading: u,
|
|
20
|
+
imageFetchPriority: S,
|
|
21
|
+
location: $,
|
|
22
|
+
countdownTimerLabel: w,
|
|
23
|
+
countdownFormatDuration: x,
|
|
24
|
+
auctionState: B,
|
|
24
25
|
occurrenceInformation: k,
|
|
25
|
-
onClick:
|
|
26
|
-
children:
|
|
27
|
-
className:
|
|
26
|
+
onClick: z,
|
|
27
|
+
children: C,
|
|
28
|
+
className: P,
|
|
28
29
|
footerElement: b,
|
|
29
|
-
headerLabel:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
headerLabel: j,
|
|
31
|
+
showTimer: c,
|
|
32
|
+
...s
|
|
33
|
+
}, l) => {
|
|
34
|
+
const { className: e, ...m } = M(s, "SaleHeaderBanner"), d = B === F.live, _ = {
|
|
35
|
+
endDateTime: i,
|
|
36
|
+
label: w,
|
|
37
|
+
formatDurationStr: x
|
|
36
38
|
};
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
|
|
39
|
+
return /* @__PURE__ */ n("div", { ...m, className: R(e, P), ...s, ref: l, children: [
|
|
40
|
+
d && i && c ? /* @__PURE__ */ a(f.Media, { lessThan: "md", children: /* @__PURE__ */ a("div", { className: `${e}__stack__countdown`, children: /* @__PURE__ */ a(h, { ..._, showBottomBorder: !1 }) }) }) : null,
|
|
39
41
|
/* @__PURE__ */ a(
|
|
40
42
|
D,
|
|
41
43
|
{
|
|
42
44
|
aspectRatio: "16/9",
|
|
43
|
-
src:
|
|
44
|
-
alt: String(
|
|
45
|
+
src: g,
|
|
46
|
+
alt: String(o),
|
|
45
47
|
objectFit: "cover",
|
|
46
48
|
className: `${e}__image`,
|
|
47
|
-
srcSet:
|
|
48
|
-
sizes:
|
|
49
|
-
loading:
|
|
50
|
-
fetchPriority:
|
|
49
|
+
srcSet: v,
|
|
50
|
+
sizes: N,
|
|
51
|
+
loading: u,
|
|
52
|
+
fetchPriority: S
|
|
51
53
|
}
|
|
52
54
|
),
|
|
53
|
-
/* @__PURE__ */ a(
|
|
54
|
-
|
|
55
|
-
/* @__PURE__ */ a(t, { variant: r.badge, children:
|
|
56
|
-
/* @__PURE__ */ a(t, { variant: r.title1, children:
|
|
57
|
-
/* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__location`, children:
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
k.map(({ date:
|
|
60
|
-
/* @__PURE__ */ a(t, { variant: r.string2, children:
|
|
61
|
-
/* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__date`, children:
|
|
62
|
-
] }, String(
|
|
63
|
-
|
|
55
|
+
/* @__PURE__ */ a(O, { className: `${e}__stack-wrapper`, ...m, ...s, ref: l, children: /* @__PURE__ */ n("div", { className: `${e}__stack`, children: [
|
|
56
|
+
d && i && c ? /* @__PURE__ */ a(f.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ a("div", { className: `${e}__stack__countdown`, children: /* @__PURE__ */ a(h, { ..._ }) }) }) : null,
|
|
57
|
+
/* @__PURE__ */ a(t, { variant: r.badge, children: j }),
|
|
58
|
+
/* @__PURE__ */ a(t, { variant: r.title1, children: o }),
|
|
59
|
+
/* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__location`, children: $ }),
|
|
60
|
+
/* @__PURE__ */ n("div", { className: `${e}__occurrence-details`, children: [
|
|
61
|
+
k.map(({ date: p, occurrenceLabel: y }) => /* @__PURE__ */ n("div", { className: `${e}__occurrence-details-text`, children: [
|
|
62
|
+
/* @__PURE__ */ a(t, { variant: r.string2, children: y }),
|
|
63
|
+
/* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__date`, children: p })
|
|
64
|
+
] }, String(p))),
|
|
65
|
+
C
|
|
64
66
|
] }),
|
|
65
67
|
b
|
|
66
68
|
] }) })
|
|
67
69
|
] });
|
|
68
70
|
}
|
|
69
71
|
);
|
|
70
|
-
|
|
72
|
+
q.displayName = "SaleHeaderBanner";
|
|
71
73
|
export {
|
|
72
|
-
|
|
74
|
+
q as default
|
|
73
75
|
};
|
|
@@ -22,22 +22,9 @@
|
|
|
22
22
|
justify-content: center;
|
|
23
23
|
padding: $spacing-md 0;
|
|
24
24
|
|
|
25
|
-
&
|
|
25
|
+
&__countdown {
|
|
26
26
|
display: flex;
|
|
27
27
|
width: 100%;
|
|
28
|
-
|
|
29
|
-
@include media($size-md, $type: 'min') {
|
|
30
|
-
display: none;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&__desktop-countdown {
|
|
35
|
-
display: none;
|
|
36
|
-
width: 100%;
|
|
37
|
-
|
|
38
|
-
@include media($size-md, $type: 'min') {
|
|
39
|
-
display: flex;
|
|
40
|
-
}
|
|
41
28
|
}
|
|
42
29
|
}
|
|
43
30
|
|