@phillips/seldon 1.178.0 → 1.179.0
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/patterns/SaleHeaderBanner/SaleHeaderBanner.d.ts +2 -0
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +50 -48
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.stories.d.ts +6 -0
- package/dist/scss/patterns/SaleHeaderBanner/_saleHeaderBanner.scss +8 -0
- package/package.json +1 -1
|
@@ -10,6 +10,8 @@ export interface SaleHeaderBannerProps extends ComponentProps<'div'> {
|
|
|
10
10
|
* What is the title of the auction?
|
|
11
11
|
*/
|
|
12
12
|
auctionTitle: React.ReactNode;
|
|
13
|
+
/** Text to be displayed as a badge. */
|
|
14
|
+
badgeText?: string;
|
|
13
15
|
/**
|
|
14
16
|
* The URL of the banner image
|
|
15
17
|
*/
|
|
@@ -1,77 +1,79 @@
|
|
|
1
1
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { AuctionStatus as
|
|
2
|
+
import { forwardRef as R } from "react";
|
|
3
|
+
import { getCommonProps as D } from "../../utils/index.js";
|
|
4
|
+
import F from "../../node_modules/classnames/index.js";
|
|
5
|
+
import f from "../../components/Countdown/Countdown.js";
|
|
6
|
+
import O from "../../components/SeldonImage/SeldonImage.js";
|
|
7
|
+
import { AuctionStatus as q } 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
|
-
import { SSRMediaQuery as
|
|
12
|
-
const
|
|
10
|
+
import z from "../../components/PageContentWrapper/PageContentWrapper.js";
|
|
11
|
+
import { SSRMediaQuery as g } from "../../providers/SeldonProvider/utils.js";
|
|
12
|
+
const A = R(
|
|
13
13
|
({
|
|
14
14
|
auctionEndTime: i,
|
|
15
15
|
auctionTitle: o,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
badgeText: c,
|
|
17
|
+
imageSrcUrl: v,
|
|
18
|
+
imageSrcSet: N,
|
|
19
|
+
imageSizes: u,
|
|
20
|
+
imageLoading: S,
|
|
21
|
+
imageFetchPriority: $,
|
|
22
|
+
location: w,
|
|
23
|
+
countdownTimerLabel: B,
|
|
24
|
+
countdownFormatDuration: b,
|
|
25
|
+
auctionState: k,
|
|
26
|
+
occurrenceInformation: x,
|
|
27
|
+
onClick: I,
|
|
27
28
|
children: C,
|
|
28
29
|
className: P,
|
|
29
|
-
footerElement:
|
|
30
|
-
headerLabel:
|
|
31
|
-
showTimer:
|
|
32
|
-
getCurrentDateTime:
|
|
30
|
+
footerElement: j,
|
|
31
|
+
headerLabel: y,
|
|
32
|
+
showTimer: l,
|
|
33
|
+
getCurrentDateTime: H,
|
|
33
34
|
...s
|
|
34
|
-
},
|
|
35
|
-
const { className: e, ...
|
|
35
|
+
}, m) => {
|
|
36
|
+
const { className: e, ...d } = D(s, "SaleHeaderBanner"), _ = k === q.live, p = {
|
|
36
37
|
endDateTime: i,
|
|
37
|
-
label:
|
|
38
|
-
formatDurationStr:
|
|
39
|
-
getCurrentDateTime:
|
|
38
|
+
label: B,
|
|
39
|
+
formatDurationStr: b,
|
|
40
|
+
getCurrentDateTime: H
|
|
40
41
|
};
|
|
41
|
-
return /* @__PURE__ */ n("div", { ...
|
|
42
|
-
|
|
42
|
+
return /* @__PURE__ */ n("div", { ...d, className: F(e, P), ...s, ref: m, children: [
|
|
43
|
+
_ && i && l ? /* @__PURE__ */ a(g.Media, { lessThan: "md", children: /* @__PURE__ */ a("div", { className: `${e}__stack__countdown`, children: /* @__PURE__ */ a(f, { ...p, showBottomBorder: !1 }) }) }) : null,
|
|
43
44
|
/* @__PURE__ */ a(
|
|
44
|
-
|
|
45
|
+
O,
|
|
45
46
|
{
|
|
46
47
|
aspectRatio: "16/9",
|
|
47
|
-
src:
|
|
48
|
+
src: v,
|
|
48
49
|
alt: String(o),
|
|
49
50
|
objectFit: "cover",
|
|
50
51
|
className: `${e}__image`,
|
|
51
|
-
srcSet:
|
|
52
|
-
sizes:
|
|
53
|
-
loading:
|
|
54
|
-
fetchPriority:
|
|
52
|
+
srcSet: N,
|
|
53
|
+
sizes: u,
|
|
54
|
+
loading: S,
|
|
55
|
+
fetchPriority: $
|
|
55
56
|
}
|
|
56
57
|
),
|
|
57
|
-
/* @__PURE__ */ a(
|
|
58
|
-
|
|
59
|
-
/* @__PURE__ */ a(t, { variant: r.badge, children:
|
|
58
|
+
/* @__PURE__ */ a(z, { className: `${e}__stack-wrapper`, ...d, ...s, ref: m, children: /* @__PURE__ */ n("div", { className: `${e}__stack`, children: [
|
|
59
|
+
_ && i && l ? /* @__PURE__ */ a(g.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ a("div", { className: `${e}__stack__countdown`, children: /* @__PURE__ */ a(f, { ...p }) }) }) : null,
|
|
60
|
+
/* @__PURE__ */ a(t, { variant: r.badge, children: y }),
|
|
60
61
|
/* @__PURE__ */ a(t, { variant: r.title1, children: o }),
|
|
61
|
-
/* @__PURE__ */ a(t, { variant: r.
|
|
62
|
+
c && /* @__PURE__ */ a(t, { variant: r.badge, className: `${e}__badge`, children: c }),
|
|
63
|
+
/* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__location`, children: w }),
|
|
62
64
|
/* @__PURE__ */ n("div", { className: `${e}__occurrence-details`, children: [
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */ a(t, { variant: r.string2, children:
|
|
65
|
-
/* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__date`, children:
|
|
66
|
-
] }, String(
|
|
65
|
+
x.map(({ date: h, occurrenceLabel: M }) => /* @__PURE__ */ n("div", { className: `${e}__occurrence-details-text`, children: [
|
|
66
|
+
/* @__PURE__ */ a(t, { variant: r.string2, children: M }),
|
|
67
|
+
/* @__PURE__ */ a(t, { variant: r.string2, className: `${e}__date`, children: h })
|
|
68
|
+
] }, String(h))),
|
|
67
69
|
C
|
|
68
70
|
] }),
|
|
69
|
-
|
|
71
|
+
j
|
|
70
72
|
] }) })
|
|
71
73
|
] });
|
|
72
74
|
}
|
|
73
75
|
);
|
|
74
|
-
|
|
76
|
+
A.displayName = "SaleHeaderBanner";
|
|
75
77
|
export {
|
|
76
|
-
|
|
78
|
+
A as default
|
|
77
79
|
};
|
|
@@ -25,6 +25,11 @@ export declare const Playground: {
|
|
|
25
25
|
type: string;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
+
badgeText: {
|
|
29
|
+
control: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
28
33
|
currentDateTime: {
|
|
29
34
|
control: {
|
|
30
35
|
type: string;
|
|
@@ -35,6 +40,7 @@ export declare const Playground: {
|
|
|
35
40
|
export declare const PreSale: (props: SaleHeaderBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
41
|
export declare const PreSaleTwoOccurrences: (props: SaleHeaderBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
42
|
export declare const PreSaleThreeOccurrences: (props: SaleHeaderBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare const Consignment: (props: SaleHeaderBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
44
|
export declare const OpenForBidding: {
|
|
39
45
|
(props: SaleHeaderBannerProps & {
|
|
40
46
|
currentDateTime?: Date;
|
|
@@ -46,6 +46,14 @@
|
|
|
46
46
|
margin: $spacing-xsm 0;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
&__badge {
|
|
50
|
+
border: 1px solid $badge-blue;
|
|
51
|
+
color: $badge-blue;
|
|
52
|
+
font-size: $string-size3;
|
|
53
|
+
margin: $spacing-xsm 0;
|
|
54
|
+
padding: $spacing-micro $spacing-xsm;
|
|
55
|
+
}
|
|
56
|
+
|
|
49
57
|
&__occurrence-details {
|
|
50
58
|
align-items: center;
|
|
51
59
|
display: flex;
|