@phillips/seldon 1.98.0 → 1.98.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.
@@ -54,6 +54,10 @@ export interface BidSnapshotProps extends ComponentProps<'div'> {
54
54
  * Starting bid text, a string for label of starting bid detail
55
55
  */
56
56
  startingBidText?: string;
57
+ /**
58
+ * Sold For amount
59
+ * */
60
+ soldPrice?: number;
57
61
  /**
58
62
  * Sold for label text, a string for label of sold for detail
59
63
  */
@@ -1,67 +1,76 @@
1
- import { jsxs as _, jsx as l } from "react/jsx-runtime";
1
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as V } from "react";
3
3
  import k from "../../node_modules/classnames/index.js";
4
4
  import { getCommonProps as q, findChildrenOfType as z, findChildrenExcludingTypes as A } from "../../utils/index.js";
5
5
  import F from "../DetailList/DetailList.js";
6
- import G from "../../components/Detail/Detail.js";
7
- import { LotStatus as a, SupportedLanguages as H } from "../../types/commonTypes.js";
8
- import I from "../../components/Countdown/Countdown.js";
9
- import { CountdownVariants as J } from "../../components/Countdown/types.js";
10
- import { BidStatusEnum as u } from "./types.js";
11
- import g from "./BidMessage.js";
12
- const K = (o) => o === 1 ? `${o} bid` : `${o} bids`, Q = V(
6
+ import p from "../../components/Detail/Detail.js";
7
+ import { LotStatus as m, SupportedLanguages as G } from "../../types/commonTypes.js";
8
+ import H from "../../components/Countdown/Countdown.js";
9
+ import { CountdownVariants as I } from "../../components/Countdown/types.js";
10
+ import C from "./BidMessage.js";
11
+ const J = (a) => a === 1 ? `${a} bid` : `${a} bids`, K = V(
13
12
  ({
14
- lotStatus: o = a.ready,
15
- bidStatus: e,
16
- bidsLabelText: C = K,
17
- children: m,
18
- className: $,
19
- closingText: b = "Closes in",
20
- currency: v = "$",
21
- currentBid: i,
22
- currentBidText: y = "Current bid",
23
- formatDurationStr: L = (s) => s.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
24
- lang: S = "en",
13
+ lotStatus: a = m.ready,
14
+ bidStatus: f,
15
+ bidsLabelText: v = J,
16
+ children: c,
17
+ className: L,
18
+ closingText: S = "Closes in",
19
+ currency: i = "$",
20
+ currentBid: s,
21
+ currentBidText: g = "Current bid",
22
+ formatDurationStr: x = (o) => o.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
23
+ lang: N = "en",
25
24
  lotCloseDate: d,
26
- numberOfBids: p = 0,
27
- startingBid: T,
28
- startingBidText: x = "Starting bid",
29
- soldForText: N = "Sold for",
30
- wonForText: w = "Won for",
31
- ...c
25
+ numberOfBids: h = 0,
26
+ startingBid: r,
27
+ startingBidText: T = "Starting bid",
28
+ soldPrice: e,
29
+ soldForText: w = "Sold for",
30
+ wonForText: y = "Won for",
31
+ ...$
32
32
  }, W) => {
33
- var h;
34
- const { className: s, ...P } = q(c, "BidSnapshot"), n = i !== null && p > 0, j = e === u.Winning || e === u.Won, f = o === a.ready, t = o === a.live, B = o === a.past, D = t && d, E = z(m, g), M = A(m, [g]), R = k(s, $, {
35
- [`${s}--live`]: t,
36
- [`${s}--has-bids`]: n
33
+ const { className: o, ...j } = q($, "BidSnapshot"), l = s !== null && h > 0, b = a === m.ready, n = a === m.live, D = a === m.past, M = n && d, R = z(c, C), _ = A(c, [C]), E = k(o, L, {
34
+ [`${o}--live`]: n,
35
+ [`${o}--has-bids`]: l
37
36
  });
38
- let r = y;
39
- return (f || !n) && (r = x), B && n && (r = j ? w : N), /* @__PURE__ */ _("div", { ...P, ...c, ref: W, className: R, children: [
40
- /* @__PURE__ */ l(F, { hasSeparators: !0, className: `${s}__text`, children: /* @__PURE__ */ l(
41
- G,
42
- {
43
- label: r,
44
- subLabel: t && i && `(${C(p)})`,
45
- value: `${v}${(h = i || T) == null ? void 0 : h.toLocaleString()}`,
46
- hasWrap: !1
47
- }
48
- ) }),
49
- e && !f ? E : null,
50
- M,
51
- D ? /* @__PURE__ */ l(
52
- I,
37
+ return /* @__PURE__ */ u("div", { ...j, ...$, ref: W, className: E, children: [
38
+ /* @__PURE__ */ u(F, { hasSeparators: !0, className: `${o}__text`, children: [
39
+ D && l && e ? /* @__PURE__ */ t(
40
+ p,
41
+ {
42
+ label: f ? y : w,
43
+ value: `${i}${e == null ? void 0 : e.toLocaleString()}`,
44
+ hasWrap: !1
45
+ }
46
+ ) : null,
47
+ n && l ? /* @__PURE__ */ t(
48
+ p,
49
+ {
50
+ label: g,
51
+ subLabel: `(${v(h)})`,
52
+ value: `${i}${s == null ? void 0 : s.toLocaleString()}`,
53
+ hasWrap: !1
54
+ }
55
+ ) : null,
56
+ b || n && !l ? /* @__PURE__ */ t(p, { label: T, value: `${i}${r == null ? void 0 : r.toLocaleString()}`, hasWrap: !1 }) : null
57
+ ] }),
58
+ f && !b ? R : null,
59
+ _,
60
+ M ? /* @__PURE__ */ t(
61
+ H,
53
62
  {
54
63
  endDateTime: d,
55
- label: b,
56
- variant: J.compact,
57
- locale: H[S],
58
- formatDurationStr: L
64
+ label: S,
65
+ variant: I.compact,
66
+ locale: G[N],
67
+ formatDurationStr: x
59
68
  }
60
69
  ) : null
61
70
  ] });
62
71
  }
63
72
  );
64
- Q.displayName = "BidSnapshot";
73
+ K.displayName = "BidSnapshot";
65
74
  export {
66
- Q as default
75
+ K as default
67
76
  };
@@ -24,6 +24,7 @@ export declare const Playground: {
24
24
  lotCloseDate: Date;
25
25
  lang: import('date-fns').Locale;
26
26
  startingBid: number;
27
+ soldPrice: number;
27
28
  };
28
29
  argTypes: {
29
30
  bidStatus: {
@@ -32,5 +33,11 @@ export declare const Playground: {
32
33
  type: string;
33
34
  };
34
35
  };
36
+ auctionStatus: {
37
+ options: typeof LotStatus;
38
+ control: {
39
+ type: string;
40
+ };
41
+ };
35
42
  };
36
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.98.0",
3
+ "version": "1.98.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"