@phillips/seldon 1.195.2 → 1.197.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/BidSnapshot/BidSnapshot.d.ts +4 -0
- package/dist/patterns/BidSnapshot/BidSnapshot.js +28 -27
- package/dist/patterns/BidSnapshot/BidSnapshot.stories.d.ts +49 -1
- package/dist/providers/SeldonProvider/utils.d.ts +1 -1
- package/dist/scss/_utils.scss +14 -0
- package/dist/scss/_vars.scss +4 -0
- package/dist/scss/_vars.scss.js +4 -0
- package/dist/scss/components/Tabs/_tabs.scss +3 -2
- package/dist/scss/patterns/SaleCard/_saleCard.scss +5 -5
- package/dist/scss/patterns/TextBanner/_textBanner.scss +1 -1
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +5 -3
- package/package.json +1 -1
|
@@ -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
|
|
3
|
-
import
|
|
4
|
-
import { getCommonProps as
|
|
5
|
-
import
|
|
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
|
|
8
|
-
import
|
|
9
|
-
import { CountdownVariants as
|
|
10
|
-
import { BidStatusEnum as
|
|
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
|
|
14
|
-
const
|
|
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 =
|
|
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
|
-
|
|
34
|
-
|
|
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
|
-
},
|
|
38
|
-
const { className: s, ...
|
|
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", { ...
|
|
43
|
-
/* @__PURE__ */ w(
|
|
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 ===
|
|
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 ?
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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:
|
|
71
|
-
locale:
|
|
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
|
-
|
|
81
|
+
Z.displayName = "BidSnapshot";
|
|
81
82
|
export {
|
|
82
|
-
|
|
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:
|
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Used to hide or show components based on the current breakpoint in a SSR friendly way
|
|
3
3
|
*/
|
|
4
|
-
export declare const SSRMediaQuery: import('@artsy/fresnel/dist/Media').CreateMediaResults<"sm" | "md" | "lg" | "xl" | "xsm", never>;
|
|
4
|
+
export declare const SSRMediaQuery: import('@artsy/fresnel/dist/Media').CreateMediaResults<"sm" | "md" | "lg" | "xl" | "snw-mobile" | "xsm", never>;
|
|
5
5
|
export declare const ssrMediaQueryStyle: string;
|
package/dist/scss/_utils.scss
CHANGED
|
@@ -101,6 +101,20 @@
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
@if $breakpoint == $size-snw-mobile or $breakpoint == $breakpoint-snw-mobile {
|
|
105
|
+
@if $type == 'min' {
|
|
106
|
+
@media (min-width: $breakpoint-snw-mobile) {
|
|
107
|
+
@content;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@if $type == 'max' {
|
|
112
|
+
@media (max-width: calc($breakpoint-snw-mobile - 1px)) {
|
|
113
|
+
@content;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
104
118
|
@if $breakpoint == $size-md or $breakpoint == $breakpoint-md {
|
|
105
119
|
// $breakpoint-md: 961px;
|
|
106
120
|
@if $type == 'min' {
|
package/dist/scss/_vars.scss
CHANGED
|
@@ -180,6 +180,9 @@ $breakpoint-md: 961px;
|
|
|
180
180
|
$breakpoint-lg: 1401px;
|
|
181
181
|
$breakpoint-xl: 1801px;
|
|
182
182
|
|
|
183
|
+
// Temporary token for mobile breakpoint added to support [L3-7681](https://phillipsauctions.atlassian.net/browse/L3-7681)
|
|
184
|
+
$breakpoint-snw-mobile: 768px;
|
|
185
|
+
|
|
183
186
|
////////////////////////
|
|
184
187
|
/// FONT SIZE TOKENS:
|
|
185
188
|
///////////////////////
|
|
@@ -491,6 +494,7 @@ $size-md: 'md';
|
|
|
491
494
|
$size-lg: 'lg';
|
|
492
495
|
$size-xl: 'xl';
|
|
493
496
|
$size-xxl: 'xxl';
|
|
497
|
+
$size-snw-mobile: 'snw-mobile';
|
|
494
498
|
$default-transition: 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
495
499
|
$drawer-content-transition: 350ms cubic-bezier(0, 0, 0.2, 1);
|
|
496
500
|
$default-overlay-transition: 350ms cubic-bezier(0.4, 0, 0.2, 1);
|
package/dist/scss/_vars.scss.js
CHANGED
|
@@ -180,6 +180,9 @@ $breakpoint-md: 961px;
|
|
|
180
180
|
$breakpoint-lg: 1401px;
|
|
181
181
|
$breakpoint-xl: 1801px;
|
|
182
182
|
|
|
183
|
+
// Temporary token for mobile breakpoint added to support [L3-7681](https://phillipsauctions.atlassian.net/browse/L3-7681)
|
|
184
|
+
$breakpoint-snw-mobile: 768px;
|
|
185
|
+
|
|
183
186
|
////////////////////////
|
|
184
187
|
/// FONT SIZE TOKENS:
|
|
185
188
|
///////////////////////
|
|
@@ -491,6 +494,7 @@ $size-md: 'md';
|
|
|
491
494
|
$size-lg: 'lg';
|
|
492
495
|
$size-xl: 'xl';
|
|
493
496
|
$size-xxl: 'xxl';
|
|
497
|
+
$size-snw-mobile: 'snw-mobile';
|
|
494
498
|
$default-transition: 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
495
499
|
$drawer-content-transition: 350ms cubic-bezier(0, 0, 0.2, 1);
|
|
496
500
|
$default-overlay-transition: 350ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
display: flex;
|
|
10
10
|
gap: 1rem;
|
|
11
11
|
overflow: hidden; /* Prevent overflow */
|
|
12
|
-
padding: 0 $padding-md;
|
|
13
12
|
position: relative;
|
|
14
13
|
}
|
|
15
14
|
|
|
@@ -17,7 +16,8 @@
|
|
|
17
16
|
background: none;
|
|
18
17
|
border: none;
|
|
19
18
|
border-bottom: 2px solid transparent;
|
|
20
|
-
padding: $
|
|
19
|
+
padding-bottom: $snowflake-menu-padding;
|
|
20
|
+
padding-inline: 0;
|
|
21
21
|
transition:
|
|
22
22
|
background 0.2s ease,
|
|
23
23
|
font-weight 0.2s ease-out,
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
cursor: pointer;
|
|
34
34
|
font-size: $body-size2;
|
|
35
35
|
font-variation-settings: 'wght' 600;
|
|
36
|
+
letter-spacing: normal;
|
|
36
37
|
line-height: $body-line-height-size2;
|
|
37
38
|
|
|
38
39
|
&:hover {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
gap: $spacing-md;
|
|
8
8
|
|
|
9
|
-
@include media($breakpoint-
|
|
9
|
+
@include media($breakpoint-snw-mobile) {
|
|
10
10
|
flex-direction: row;
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
justify-content: center;
|
|
20
20
|
min-width: 100%;
|
|
21
21
|
|
|
22
|
-
@include media($breakpoint-
|
|
22
|
+
@include media($breakpoint-snw-mobile) {
|
|
23
23
|
min-width: auto;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
flex-grow: 1;
|
|
38
38
|
gap: $spacing-micro;
|
|
39
39
|
|
|
40
|
-
@include media($size-
|
|
40
|
+
@include media($size-snw-mobile, 'max') {
|
|
41
41
|
align-self: flex-start;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
&__ctas {
|
|
46
46
|
flex: 0 0 0%;
|
|
47
47
|
|
|
48
|
-
@include media($breakpoint-
|
|
48
|
+
@include media($breakpoint-snw-mobile) {
|
|
49
49
|
flex-basis: 191px;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
align-items: flex-start;
|
|
117
117
|
gap: $spacing-sm;
|
|
118
118
|
|
|
119
|
-
@include media($size-
|
|
119
|
+
@include media($size-snw-mobile, 'max') {
|
|
120
120
|
flex-direction: row;
|
|
121
121
|
}
|
|
122
122
|
|
package/dist/utils/constants.js
CHANGED
|
@@ -3,9 +3,11 @@ const s = {
|
|
|
3
3
|
sm: 361,
|
|
4
4
|
md: 961,
|
|
5
5
|
lg: 1401,
|
|
6
|
-
xl: 1801
|
|
7
|
-
|
|
6
|
+
xl: 1801,
|
|
7
|
+
// Temporary token for mobile breakpoint added to support [L3-7681](https://phillipsauctions.atlassian.net/browse/L3-7681)
|
|
8
|
+
"snw-mobile": 768
|
|
9
|
+
}, m = 16;
|
|
8
10
|
export {
|
|
9
11
|
s as BREAKPOINTS,
|
|
10
|
-
|
|
12
|
+
m as DEFAULT_REM_SIZE
|
|
11
13
|
};
|