@phillips/seldon 1.148.0 → 1.149.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.
- package/dist/assets/pictograms/formatted/Chat.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Chat.js +44 -0
- package/dist/assets/pictograms/formatted/CreditCard.d.ts +9 -0
- package/dist/assets/pictograms/formatted/CreditCard.js +31 -0
- package/dist/assets/pictograms/formatted/Form.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Form.js +31 -0
- package/dist/assets/pictograms/formatted/Live.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Live.js +35 -0
- package/dist/assets/pictograms/formatted/MobilePhone.d.ts +9 -0
- package/dist/assets/pictograms/formatted/MobilePhone.js +30 -0
- package/dist/assets/pictograms/formatted/Notification.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Notification.js +45 -0
- package/dist/assets/pictograms/formatted/Phone.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Phone.js +56 -0
- package/dist/assets/pictograms/formatted/Photos.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Photos.js +39 -0
- package/dist/assets/pictograms/formatted/Search.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Search.js +44 -0
- package/dist/assets/pictograms/formatted/Shipping.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Shipping.js +37 -0
- package/dist/assets/pictograms/formatted/Sign.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Sign.js +37 -0
- package/dist/assets/pictograms/formatted/Submit.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Submit.js +38 -0
- package/dist/assets/pictograms/formatted/Timer.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Timer.js +39 -0
- package/dist/assets/pictograms/formatted/Verification.d.ts +9 -0
- package/dist/assets/pictograms/formatted/Verification.js +39 -0
- package/dist/assets/pictograms/formatted/index.d.ts +14 -0
- package/dist/assets/pictograms/formatted/index.js +30 -0
- package/dist/components/Countdown/Countdown.d.ts +2 -2
- package/dist/components/Countdown/Countdown.js +56 -53
- package/dist/components/Countdown/Countdown.stories.d.ts +3 -0
- package/dist/components/Icon/Icon.d.ts +7 -1
- package/dist/components/Icon/Icon.js +17 -16
- package/dist/components/Icon/index.d.ts +1 -1
- package/dist/components/Pictogram/Pictogram.d.ts +29 -0
- package/dist/components/Pictogram/Pictogram.js +25 -0
- package/dist/components/Pictogram/Pictogram.stories.d.ts +21 -0
- package/dist/components/Pictogram/Pictogram.test.d.ts +1 -0
- package/dist/components/Pictogram/index.d.ts +1 -0
- package/dist/design/icons/PictogramGrid.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -15
- package/dist/patterns/BidSnapshot/BidSnapshot.d.ts +2 -2
- package/dist/patterns/BidSnapshot/BidSnapshot.js +43 -43
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.d.ts +2 -2
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +2 -2
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.stories.d.ts +22 -1
- package/package.json +3 -2
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { getCommonProps as
|
|
1
|
+
import { jsxs as w, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as k } from "react";
|
|
3
|
+
import q from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { getCommonProps as z, findChildrenOfType as D, findChildrenExcludingTypes as F } from "../../utils/index.js";
|
|
5
5
|
import G from "../DetailList/DetailList.js";
|
|
6
6
|
import p from "../../components/Detail/Detail.js";
|
|
7
|
-
import { LotStatus as
|
|
7
|
+
import { LotStatus as n, SupportedLanguages as H } from "../../types/commonTypes.js";
|
|
8
8
|
import J from "../../components/Countdown/Countdown.js";
|
|
9
9
|
import { CountdownVariants as K } from "../../components/Countdown/types.js";
|
|
10
10
|
import { BidStatusEnum as Q } from "./types.js";
|
|
11
11
|
import L from "./BidMessage.js";
|
|
12
|
-
import { isAfter as
|
|
12
|
+
import { isAfter as x } 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 = k(
|
|
15
15
|
({
|
|
16
|
-
lotStatus: o =
|
|
16
|
+
lotStatus: o = n.ready,
|
|
17
17
|
bidStatus: d,
|
|
18
18
|
bidsLabelText: C = X,
|
|
19
19
|
children: c,
|
|
20
|
-
className:
|
|
21
|
-
closingText:
|
|
22
|
-
currency:
|
|
20
|
+
className: N,
|
|
21
|
+
closingText: W = "Closes in",
|
|
22
|
+
currency: t = "$",
|
|
23
23
|
currentBid: f,
|
|
24
|
-
currentBidText:
|
|
25
|
-
formatDurationStr:
|
|
26
|
-
lang:
|
|
27
|
-
saleCloseDate:
|
|
28
|
-
lotCloseDate:
|
|
29
|
-
numberOfBids:
|
|
30
|
-
startingBid:
|
|
31
|
-
startingBidText:
|
|
24
|
+
currentBidText: y = "Current bid",
|
|
25
|
+
formatDurationStr: T = (s) => s.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
|
|
26
|
+
lang: B = "en",
|
|
27
|
+
saleCloseDate: r,
|
|
28
|
+
lotCloseDate: i,
|
|
29
|
+
numberOfBids: h = 0,
|
|
30
|
+
startingBid: u,
|
|
31
|
+
startingBidText: M = "Starting bid",
|
|
32
32
|
soldPrice: $,
|
|
33
|
-
soldForText:
|
|
34
|
-
wonForText:
|
|
35
|
-
|
|
36
|
-
...
|
|
33
|
+
soldForText: j = "Sold for",
|
|
34
|
+
wonForText: E = "Won for",
|
|
35
|
+
getCurrentDateTime: b = () => /* @__PURE__ */ new Date(),
|
|
36
|
+
...S
|
|
37
37
|
}, P) => {
|
|
38
|
-
const { className:
|
|
39
|
-
[`${
|
|
40
|
-
[`${
|
|
38
|
+
const { className: s, ...R } = z(S, "BidSnapshot"), l = f !== null && h > 0, g = o === n.ready, a = o === n.live, v = o === n.past, m = b() || /* @__PURE__ */ new Date(), _ = a && i && x(i, m) && r && (U(r, m) < 60 || x(m, r)), A = D(c, L), I = F(c, [L]), V = q(s, N, {
|
|
39
|
+
[`${s}--live`]: a,
|
|
40
|
+
[`${s}--has-bids`]: l || v
|
|
41
41
|
});
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
42
|
+
return /* @__PURE__ */ w("div", { ...R, ...S, ref: P, className: V, children: [
|
|
43
|
+
/* @__PURE__ */ w(G, { hasSeparators: !0, className: `${s}__text`, children: [
|
|
44
|
+
v ? /* @__PURE__ */ e(
|
|
45
45
|
p,
|
|
46
46
|
{
|
|
47
|
-
label: d === Q.Won ?
|
|
48
|
-
value: $ ? `${
|
|
47
|
+
label: d === Q.Won ? E : j,
|
|
48
|
+
value: $ ? `${t}${$?.toLocaleString()}` : "",
|
|
49
49
|
hasWrap: !1
|
|
50
50
|
}
|
|
51
51
|
) : null,
|
|
52
|
-
|
|
52
|
+
a && l ? /* @__PURE__ */ e(
|
|
53
53
|
p,
|
|
54
54
|
{
|
|
55
|
-
label:
|
|
56
|
-
subLabel: `(${C(
|
|
57
|
-
value: `${
|
|
55
|
+
label: y,
|
|
56
|
+
subLabel: `(${C(h)})`,
|
|
57
|
+
value: `${t}${f?.toLocaleString()}`,
|
|
58
58
|
hasWrap: !1
|
|
59
59
|
}
|
|
60
60
|
) : null,
|
|
61
|
-
|
|
61
|
+
u && (g || a && !l) ? /* @__PURE__ */ e(p, { label: M, value: `${t}${u?.toLocaleString()}`, hasWrap: !1 }) : null
|
|
62
62
|
] }),
|
|
63
63
|
d && !g ? A : null,
|
|
64
|
-
|
|
65
|
-
_ ? /* @__PURE__ */
|
|
64
|
+
I,
|
|
65
|
+
_ ? /* @__PURE__ */ e(
|
|
66
66
|
J,
|
|
67
67
|
{
|
|
68
|
-
endDateTime:
|
|
69
|
-
label:
|
|
68
|
+
endDateTime: i,
|
|
69
|
+
label: W,
|
|
70
70
|
variant: K.compact,
|
|
71
|
-
locale: H[
|
|
72
|
-
formatDurationStr:
|
|
71
|
+
locale: H[B],
|
|
72
|
+
formatDurationStr: T,
|
|
73
73
|
showBottomBorder: !1,
|
|
74
|
-
|
|
74
|
+
getCurrentDateTime: b
|
|
75
75
|
}
|
|
76
76
|
) : null
|
|
77
77
|
] });
|
|
@@ -73,9 +73,9 @@ export interface SaleHeaderBannerProps extends ComponentProps<'div'> {
|
|
|
73
73
|
*/
|
|
74
74
|
onClick?: () => void;
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* Function to get the current date time (defaults to new Date())
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
getCurrentDateTime?: () => Date | null;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
81
|
* ## Overview
|
|
@@ -29,14 +29,14 @@ const z = M(
|
|
|
29
29
|
footerElement: b,
|
|
30
30
|
headerLabel: j,
|
|
31
31
|
showTimer: c,
|
|
32
|
-
|
|
32
|
+
getCurrentDateTime: y,
|
|
33
33
|
...s
|
|
34
34
|
}, l) => {
|
|
35
35
|
const { className: e, ...m } = R(s, "SaleHeaderBanner"), d = B === O.live, _ = {
|
|
36
36
|
endDateTime: i,
|
|
37
37
|
label: w,
|
|
38
38
|
formatDurationStr: x,
|
|
39
|
-
|
|
39
|
+
getCurrentDateTime: y
|
|
40
40
|
};
|
|
41
41
|
return /* @__PURE__ */ n("div", { ...m, className: D(e, P), ...s, ref: l, children: [
|
|
42
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,
|
|
@@ -25,11 +25,32 @@ export declare const Playground: {
|
|
|
25
25
|
type: string;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
+
currentDateTime: {
|
|
29
|
+
control: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
28
33
|
};
|
|
29
34
|
};
|
|
30
35
|
export declare const PreSale: (props: SaleHeaderBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
36
|
export declare const PreSaleTwoOccurrences: (props: SaleHeaderBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
37
|
export declare const PreSaleThreeOccurrences: (props: SaleHeaderBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
export declare const OpenForBidding:
|
|
38
|
+
export declare const OpenForBidding: {
|
|
39
|
+
(props: SaleHeaderBannerProps & {
|
|
40
|
+
currentDateTime?: Date;
|
|
41
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
argTypes: {
|
|
43
|
+
currentDateTime: {
|
|
44
|
+
control: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
auctionEndTime: {
|
|
49
|
+
control: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
34
55
|
export declare const Closed: (props: SaleHeaderBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
56
|
export declare const MissingImage: (props: SaleHeaderBannerProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.149.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"lint:styles": "stylelint \"src/**/*.scss\" --fix",
|
|
39
39
|
"lint:md": "markdownlint \"src/**/*.{md,mdx}\" --fix",
|
|
40
40
|
"prepare": "husky install",
|
|
41
|
-
"icons:format": "npx @svgr/cli --config-file svgr.config.cjs --out-dir src/assets/formatted --ignore-existing -- src/assets"
|
|
41
|
+
"icons:format": "npx @svgr/cli --config-file svgr.config.cjs --out-dir src/assets/formatted --ignore-existing -- src/assets",
|
|
42
|
+
"pictograms:format": "npx @svgr/cli --config-file svgr.config.cjs --out-dir src/assets/pictograms/formatted --ignore-existing -- src/assets/pictograms"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@artsy/fresnel": "^7.1.4",
|