@phillips/seldon 1.109.0 → 1.109.2
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/components/TextSymbol/TextSymbol.js +6 -7
- package/dist/components/TextSymbol/TextSymbol.stories.d.ts +2 -0
- package/dist/components/TextSymbol/types.d.ts +0 -5
- package/dist/components/TextSymbol/types.js +2 -3
- package/dist/patterns/BidSnapshot/BidSnapshot.js +16 -15
- package/dist/scss/_type.scss +1 -1
- package/dist/scss/components/Tabs/_tabs.scss +1 -1
- package/dist/scss/components/TextSymbol/_textSymbol.scss +6 -13
- package/dist/scss/patterns/BidSnapshot/_bidSnapshot.scss +2 -2
- package/package.json +1 -1
- package/dist/components/TextSymbol/utils.d.ts +0 -2
- package/dist/components/TextSymbol/utils.js +0 -29
- package/dist/components/TextSymbol/utils.test.d.ts +0 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import l from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { getCommonProps as c } from "../../utils/index.js";
|
|
4
4
|
import { TextSymbolVariants as p } from "./types.js";
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
return /* @__PURE__ */ s("span", { ...l, className: i(m, t, `${m}--${a}`), ...o, children: r.map((e, n) => /* @__PURE__ */ s("span", { className: `${m}--${b(e)}-symbol`, children: e }, n)) });
|
|
5
|
+
const N = ({ symbols: r = [], variant: e = p.lotNumber, className: t, ...m }) => {
|
|
6
|
+
const { className: o, ...n } = c(m, "TextSymbol");
|
|
7
|
+
return /* @__PURE__ */ a("span", { ...n, className: l(o, t, `${o}--${e}`), ...m, children: r.map((s) => /* @__PURE__ */ a("span", { children: s }, s)) });
|
|
9
8
|
};
|
|
10
9
|
export {
|
|
11
|
-
|
|
10
|
+
N as default
|
|
12
11
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e = /* @__PURE__ */ ((t) => (t.estimation = "estimation", t.lotNumber = "lotNumber", t))(e || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
m as TextSymbolVariants
|
|
3
|
+
e as TextSymbolVariants
|
|
5
4
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as L, jsx as
|
|
1
|
+
import { jsxs as L, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as q } from "react";
|
|
3
3
|
import z from "../../node_modules/classnames/index.js";
|
|
4
4
|
import { getCommonProps as D, findChildrenOfType as F, findChildrenExcludingTypes as G } from "../../utils/index.js";
|
|
@@ -8,22 +8,22 @@ import { LotStatus as m, SupportedLanguages as J } from "../../types/commonTypes
|
|
|
8
8
|
import K from "../../components/Countdown/Countdown.js";
|
|
9
9
|
import { CountdownVariants as Q } from "../../components/Countdown/types.js";
|
|
10
10
|
import S from "./BidMessage.js";
|
|
11
|
-
import { isAfter as
|
|
11
|
+
import { isAfter as w } from "../../node_modules/date-fns/isAfter.js";
|
|
12
12
|
import { differenceInMinutes as U } from "../../node_modules/date-fns/differenceInMinutes.js";
|
|
13
13
|
const X = (o) => o === 1 ? `${o} bid` : `${o} bids`, Y = q(
|
|
14
14
|
({
|
|
15
15
|
lotStatus: o = m.ready,
|
|
16
16
|
bidStatus: h,
|
|
17
|
-
bidsLabelText:
|
|
17
|
+
bidsLabelText: g = X,
|
|
18
18
|
children: $,
|
|
19
19
|
className: C,
|
|
20
20
|
closingText: x = "Closes in",
|
|
21
|
-
currency:
|
|
21
|
+
currency: r = "$",
|
|
22
22
|
currentBid: s,
|
|
23
23
|
currentBidText: N = "Current bid",
|
|
24
24
|
formatDurationStr: T = (a) => a.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
|
|
25
25
|
lang: y = "en",
|
|
26
|
-
saleCloseDate:
|
|
26
|
+
saleCloseDate: i,
|
|
27
27
|
lotCloseDate: p,
|
|
28
28
|
numberOfBids: b = 0,
|
|
29
29
|
startingBid: f,
|
|
@@ -33,41 +33,42 @@ const X = (o) => o === 1 ? `${o} bid` : `${o} bids`, Y = q(
|
|
|
33
33
|
wonForText: j = "Won for",
|
|
34
34
|
...u
|
|
35
35
|
}, R) => {
|
|
36
|
-
const { className: a, ..._ } = D(u, "BidSnapshot"), n = s !== null && b > 0, v = o === m.ready,
|
|
37
|
-
[`${a}--live`]:
|
|
36
|
+
const { className: a, ..._ } = D(u, "BidSnapshot"), n = s !== null && b > 0, v = o === m.ready, t = o === m.live, A = o === m.past, c = /* @__PURE__ */ new Date(), E = t && p && w(p, c) && i && (U(i, c) < 60 || w(c, i)), I = F($, S), V = G($, [S]), k = z(a, C, {
|
|
37
|
+
[`${a}--live`]: t,
|
|
38
38
|
[`${a}--has-bids`]: n
|
|
39
39
|
});
|
|
40
40
|
return /* @__PURE__ */ L("div", { ..._, ...u, ref: R, className: k, children: [
|
|
41
41
|
/* @__PURE__ */ L(H, { hasSeparators: !0, className: `${a}__text`, children: [
|
|
42
|
-
A && n && e ? /* @__PURE__ */
|
|
42
|
+
A && n && e ? /* @__PURE__ */ l(
|
|
43
43
|
d,
|
|
44
44
|
{
|
|
45
45
|
label: h ? j : M,
|
|
46
|
-
value: `${
|
|
46
|
+
value: `${r}${e == null ? void 0 : e.toLocaleString()}`,
|
|
47
47
|
hasWrap: !1
|
|
48
48
|
}
|
|
49
49
|
) : null,
|
|
50
|
-
|
|
50
|
+
t && n ? /* @__PURE__ */ l(
|
|
51
51
|
d,
|
|
52
52
|
{
|
|
53
53
|
label: N,
|
|
54
|
-
subLabel: `(${
|
|
55
|
-
value: `${
|
|
54
|
+
subLabel: `(${g(b)})`,
|
|
55
|
+
value: `${r}${s == null ? void 0 : s.toLocaleString()}`,
|
|
56
56
|
hasWrap: !1
|
|
57
57
|
}
|
|
58
58
|
) : null,
|
|
59
|
-
v ||
|
|
59
|
+
v || t && !n ? /* @__PURE__ */ l(d, { label: W, value: `${r}${f == null ? void 0 : f.toLocaleString()}`, hasWrap: !1 }) : null
|
|
60
60
|
] }),
|
|
61
61
|
h && !v ? I : null,
|
|
62
62
|
V,
|
|
63
|
-
E ? /* @__PURE__ */
|
|
63
|
+
E ? /* @__PURE__ */ l(
|
|
64
64
|
K,
|
|
65
65
|
{
|
|
66
66
|
endDateTime: p,
|
|
67
67
|
label: x,
|
|
68
68
|
variant: Q.compact,
|
|
69
69
|
locale: J[y],
|
|
70
|
-
formatDurationStr: T
|
|
70
|
+
formatDurationStr: T,
|
|
71
|
+
showBottomBorder: !1
|
|
71
72
|
}
|
|
72
73
|
) : null
|
|
73
74
|
] });
|
package/dist/scss/_type.scss
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
font-family: Distinct, sans-serif;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
@mixin underline($offset: $spacing-
|
|
40
|
+
@mixin underline($offset: $spacing-micro, $thickness: 1px, $color: $pure-black) {
|
|
41
41
|
text-decoration: underline;
|
|
42
42
|
text-decoration-thickness: $thickness;
|
|
43
43
|
text-underline-offset: $offset;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
@use '../../allPartials' as *;
|
|
2
2
|
|
|
3
3
|
.#{$px}-text-symbol {
|
|
4
|
-
|
|
4
|
+
@include text($heading4);
|
|
5
|
+
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
gap: $spacing-micro;
|
|
5
8
|
|
|
6
9
|
&--estimation {
|
|
10
|
+
@include text($heading5);
|
|
11
|
+
|
|
7
12
|
margin-left: 0.25rem;
|
|
8
13
|
}
|
|
9
14
|
|
|
@@ -11,16 +16,4 @@
|
|
|
11
16
|
margin-left: $spacing-xsm;
|
|
12
17
|
vertical-align: super;
|
|
13
18
|
}
|
|
14
|
-
|
|
15
|
-
&--large-symbol {
|
|
16
|
-
font-size: 65%;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&--medium-symbol {
|
|
20
|
-
font-size: 85%;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&--small-symbol {
|
|
24
|
-
font-size: 100%;
|
|
25
|
-
}
|
|
26
19
|
}
|
|
@@ -12,10 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
.#{$px}-countdown {
|
|
14
14
|
align-items: flex-start;
|
|
15
|
-
border-bottom: none;
|
|
16
15
|
padding: 0;
|
|
17
16
|
position: absolute;
|
|
18
|
-
top: calc(100% + $spacing-
|
|
17
|
+
top: calc(100% + $spacing-xsm);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
.#{$px}-countdown__countdown-container,
|
|
@@ -25,6 +24,7 @@
|
|
|
25
24
|
|
|
26
25
|
&--live:has(.#{$px}-countdown) {
|
|
27
26
|
border-bottom: 1px solid $light-gray;
|
|
27
|
+
margin-bottom: $spacing-md;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
&--has-bids .#{$px}-detail__value {
|
package/package.json
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { TextSymbolSize as e } from "./types.js";
|
|
2
|
-
const c = (a) => {
|
|
3
|
-
switch (a) {
|
|
4
|
-
case "≌":
|
|
5
|
-
case "܀":
|
|
6
|
-
case "•":
|
|
7
|
-
return e.small;
|
|
8
|
-
case "▼":
|
|
9
|
-
case "♠":
|
|
10
|
-
case "≠":
|
|
11
|
-
return e.medium;
|
|
12
|
-
case "∞":
|
|
13
|
-
case "Ω":
|
|
14
|
-
case "Δ":
|
|
15
|
-
case "†":
|
|
16
|
-
case "◆":
|
|
17
|
-
case "Σ":
|
|
18
|
-
case "✱":
|
|
19
|
-
case "Ж":
|
|
20
|
-
case "Ο":
|
|
21
|
-
case "‡":
|
|
22
|
-
case "Ø":
|
|
23
|
-
default:
|
|
24
|
-
return e.large;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
c as determineSymbolSize
|
|
29
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|