@phillips/seldon 1.196.0 → 1.198.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.
@@ -58,6 +58,10 @@ export interface BidSnapshotProps extends ComponentProps<'div'> {
58
58
  * Starting bid text, a string for label of starting bid detail
59
59
  */
60
60
  startingBidText?: string;
61
+ /**
62
+ * Determines whether to show or hide sold price
63
+ */
64
+ showSoldPrice?: boolean;
61
65
  /**
62
66
  * Sold For amount
63
67
  * */
@@ -1,21 +1,21 @@
1
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
- import G from "../DetailList/DetailList.js";
2
+ import { forwardRef as q } from "react";
3
+ import z from "../../node_modules/classnames/index.js";
4
+ import { getCommonProps as D, findChildrenOfType as F, findChildrenExcludingTypes as G } from "../../utils/index.js";
5
+ import H from "../DetailList/DetailList.js";
6
6
  import p from "../../components/Detail/Detail.js";
7
- import { LotStatus as n, SupportedLanguages as H } from "../../types/commonTypes.js";
8
- import J from "../../components/Countdown/Countdown.js";
9
- import { CountdownVariants as K } from "../../components/Countdown/types.js";
10
- import { BidStatusEnum as Q } from "./types.js";
7
+ import { LotStatus as n, SupportedLanguages as J } from "../../types/commonTypes.js";
8
+ import K from "../../components/Countdown/Countdown.js";
9
+ import { CountdownVariants as Q } from "../../components/Countdown/types.js";
10
+ import { BidStatusEnum as U } from "./types.js";
11
11
  import L from "./BidMessage.js";
12
12
  import { isAfter as x } from "../../node_modules/date-fns/isAfter.js";
13
- import { differenceInMinutes as U } from "../../node_modules/date-fns/differenceInMinutes.js";
14
- const X = (o) => o === 1 ? `${o} bid` : `${o} bids`, Y = k(
13
+ import { differenceInMinutes as X } from "../../node_modules/date-fns/differenceInMinutes.js";
14
+ const Y = (o) => o === 1 ? `${o} bid` : `${o} bids`, Z = q(
15
15
  ({
16
16
  lotStatus: o = n.ready,
17
17
  bidStatus: d,
18
- bidsLabelText: C = X,
18
+ bidsLabelText: C = Y,
19
19
  children: c,
20
20
  className: N,
21
21
  closingText: W = "Closes in",
@@ -30,21 +30,22 @@ const X = (o) => o === 1 ? `${o} bid` : `${o} bids`, Y = k(
30
30
  startingBid: u,
31
31
  startingBidText: M = "Starting bid",
32
32
  soldPrice: $,
33
- soldForText: j = "Sold for",
34
- wonForText: E = "Won for",
33
+ showSoldPrice: j = !0,
34
+ soldForText: E = "Sold for",
35
+ wonForText: P = "Won for",
35
36
  getCurrentDateTime: b = () => /* @__PURE__ */ new Date(),
36
37
  ...S
37
- }, P) => {
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, {
38
+ }, R) => {
39
+ const { className: s, ..._ } = D(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 = a && i && x(i, m) && r && (X(r, m) < 60 || x(m, r)), I = F(c, L), V = G(c, [L]), k = z(s, N, {
39
40
  [`${s}--live`]: a,
40
41
  [`${s}--has-bids`]: l || v
41
42
  });
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(
43
+ return /* @__PURE__ */ w("div", { ..._, ...S, ref: R, className: k, children: [
44
+ /* @__PURE__ */ w(H, { hasSeparators: !0, className: `${s}__text`, children: [
45
+ j && v ? /* @__PURE__ */ e(
45
46
  p,
46
47
  {
47
- label: d === Q.Won ? E : j,
48
+ label: d === U.Won ? P : E,
48
49
  value: $ ? `${t}${$?.toLocaleString()}` : "",
49
50
  hasWrap: !1
50
51
  }
@@ -60,15 +61,15 @@ const X = (o) => o === 1 ? `${o} bid` : `${o} bids`, Y = k(
60
61
  ) : null,
61
62
  u && (g || a && !l) ? /* @__PURE__ */ e(p, { label: M, value: `${t}${u?.toLocaleString()}`, hasWrap: !1 }) : null
62
63
  ] }),
63
- d && !g ? A : null,
64
- I,
65
- _ ? /* @__PURE__ */ e(
66
- J,
64
+ d && !g ? I : null,
65
+ V,
66
+ A ? /* @__PURE__ */ e(
67
+ K,
67
68
  {
68
69
  endDateTime: i,
69
70
  label: W,
70
- variant: K.compact,
71
- locale: H[B],
71
+ variant: Q.compact,
72
+ locale: J[B],
72
73
  formatDurationStr: T,
73
74
  showBottomBorder: !1,
74
75
  getCurrentDateTime: b
@@ -77,7 +78,7 @@ const X = (o) => o === 1 ? `${o} bid` : `${o} bids`, Y = k(
77
78
  ] });
78
79
  }
79
80
  );
80
- Y.displayName = "BidSnapshot";
81
+ Z.displayName = "BidSnapshot";
81
82
  export {
82
- Y as default
83
+ Z as default
83
84
  };
@@ -5,12 +5,60 @@ declare const meta: {
5
5
  title: string;
6
6
  component: import('react').ForwardRefExoticComponent<Omit<BidSnapshotProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
7
7
  argTypes: {
8
+ bidStatus: {
9
+ options: (typeof BidStatusEnum)[];
10
+ control: {
11
+ type: "select";
12
+ };
13
+ };
8
14
  lotStatus: {
9
- options: string[];
15
+ options: (typeof LotStatus)[];
10
16
  control: {
11
17
  type: "select";
12
18
  };
13
19
  };
20
+ currency: {
21
+ control: "text";
22
+ };
23
+ currentBidText: {
24
+ control: "text";
25
+ };
26
+ closingText: {
27
+ control: "text";
28
+ };
29
+ lang: {
30
+ options: import('date-fns').Locale[];
31
+ control: {
32
+ type: "select";
33
+ };
34
+ };
35
+ saleCloseDate: {
36
+ control: "date";
37
+ };
38
+ lotCloseDate: {
39
+ control: "date";
40
+ };
41
+ numberOfBids: {
42
+ control: "number";
43
+ };
44
+ startingBid: {
45
+ control: "number";
46
+ };
47
+ startingBidText: {
48
+ control: "text";
49
+ };
50
+ showSoldPrice: {
51
+ control: "boolean";
52
+ };
53
+ soldPrice: {
54
+ control: "number";
55
+ };
56
+ soldForText: {
57
+ control: "text";
58
+ };
59
+ wonForText: {
60
+ control: "text";
61
+ };
14
62
  };
15
63
  };
16
64
  export default meta;
@@ -74,6 +74,7 @@
74
74
  color: $badge-blue;
75
75
  font-size: 0.75rem;
76
76
  padding: $spacing-micro 8px;
77
+ text-transform: unset;
77
78
  }
78
79
 
79
80
  &__auction-type {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.196.0",
3
+ "version": "1.198.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"