@phillips/seldon 1.274.0 → 1.275.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/components/Article/Article.cjs +1 -1
- package/dist/components/Article/Article.js +17 -16
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.js +14 -11
- package/dist/components/ExitGateCard/ExitGateCard.cjs +1 -1
- package/dist/components/ExitGateCard/ExitGateCard.js +18 -17
- package/dist/components/SeldonImage/SeldonImage.cjs +1 -1
- package/dist/components/SeldonImage/SeldonImage.d.ts +1 -1
- package/dist/components/SeldonImage/SeldonImage.js +45 -44
- package/dist/components/SeldonImage/SeldonImage.stories.d.ts +73 -6
- package/dist/components/SeldonImage/index.d.ts +1 -0
- package/dist/components/SeldonImage/types.cjs +1 -0
- package/dist/components/SeldonImage/types.d.ts +6 -0
- package/dist/components/SeldonImage/types.js +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +55 -53
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.cjs +1 -1
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +35 -34
- package/dist/patterns/ObjectTile/ObjectTile.cjs +1 -1
- package/dist/patterns/ObjectTile/ObjectTile.js +31 -30
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.cjs +1 -1
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +32 -31
- package/dist/scss/components/SeldonImage/_seldonImage.scss +21 -0
- package/dist/static/test-image-1200x1600.jpg +0 -0
- package/dist/static/test-image-1600x1600.jpg +0 -0
- package/package.json +1 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as H } from "react";
|
|
3
3
|
import { getCommonProps as D } from "../../utils/index.js";
|
|
4
4
|
import F from "../../_virtual/index2.js";
|
|
5
|
-
import { AuctionStatus as
|
|
6
|
-
import { SSRMediaQuery as
|
|
5
|
+
import { AuctionStatus as L } from "../../types/commonTypes.js";
|
|
6
|
+
import { SSRMediaQuery as h } from "../../providers/SeldonProvider/utils.js";
|
|
7
7
|
import n from "../../components/Banner/Banner.js";
|
|
8
8
|
import { Breakpoints as f } from "../../utils/constants.js";
|
|
9
9
|
import u from "../../components/Countdown/Countdown.js";
|
|
10
|
-
import { BannerVariants as
|
|
11
|
-
import
|
|
10
|
+
import { BannerVariants as O, BannerMediaSize as V } from "../../components/Banner/types.js";
|
|
11
|
+
import q from "../../components/PageContentWrapper/PageContentWrapper.js";
|
|
12
12
|
import { TextVariants as r } from "../../components/Text/types.js";
|
|
13
13
|
import t from "../../components/Text/Text.js";
|
|
14
|
-
import
|
|
15
|
-
|
|
14
|
+
import I from "../../components/SeldonImage/SeldonImage.js";
|
|
15
|
+
import { AspectRatio as Q } from "../../components/SeldonImage/types.js";
|
|
16
|
+
const T = H(
|
|
16
17
|
({
|
|
17
|
-
auctionEndTime:
|
|
18
|
-
auctionTitle:
|
|
18
|
+
auctionEndTime: o,
|
|
19
|
+
auctionTitle: l,
|
|
19
20
|
badgeText: s,
|
|
20
21
|
imageSrcUrl: v,
|
|
21
22
|
imageSrcSet: N,
|
|
@@ -27,45 +28,45 @@ const Q = R(
|
|
|
27
28
|
countdownFormatDuration: M,
|
|
28
29
|
auctionState: w,
|
|
29
30
|
occurrenceInformation: C,
|
|
30
|
-
onClick:
|
|
31
|
+
onClick: W,
|
|
31
32
|
children: k,
|
|
32
33
|
className: x,
|
|
33
34
|
footerElement: P,
|
|
34
35
|
headerLabel: y,
|
|
35
36
|
showTimer: m,
|
|
36
|
-
getCurrentDateTime:
|
|
37
|
+
getCurrentDateTime: A,
|
|
37
38
|
...c
|
|
38
|
-
},
|
|
39
|
-
const { className: a, ...
|
|
40
|
-
endDateTime:
|
|
39
|
+
}, R) => {
|
|
40
|
+
const { className: a, ...j } = D(c, "SaleHeaderBanner"), d = w === L.live, p = {
|
|
41
|
+
endDateTime: o,
|
|
41
42
|
label: B,
|
|
42
43
|
formatDurationStr: M,
|
|
43
|
-
getCurrentDateTime:
|
|
44
|
+
getCurrentDateTime: A
|
|
44
45
|
};
|
|
45
|
-
return /* @__PURE__ */ i("div", { ...
|
|
46
|
-
d &&
|
|
47
|
-
/* @__PURE__ */ i(n, { variant:
|
|
48
|
-
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(
|
|
49
|
-
d &&
|
|
46
|
+
return /* @__PURE__ */ i("div", { ...j, className: F(a, x), ...c, ref: R, children: [
|
|
47
|
+
d && o && m ? /* @__PURE__ */ e(h.Media, { lessThan: f.md, children: /* @__PURE__ */ e("div", { className: `${a}__stack__countdown`, children: /* @__PURE__ */ e(u, { ...p, showBottomBorder: !1, centerAlign: !0 }) }) }) : null,
|
|
48
|
+
/* @__PURE__ */ i(n, { variant: O.top, children: [
|
|
49
|
+
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ i("div", { className: `${a}__stack`, children: [
|
|
50
|
+
d && o && m ? /* @__PURE__ */ e(h.Media, { greaterThanOrEqual: f.md, children: /* @__PURE__ */ e("div", { className: `${a}__stack__countdown`, children: /* @__PURE__ */ e(u, { ...p, centerAlign: !0 }) }) }) : null,
|
|
50
51
|
/* @__PURE__ */ e(n.Eyebrow, { variant: r.labelMedium, className: `${a}__header-label`, children: y }),
|
|
51
|
-
/* @__PURE__ */ e(n.Title, { variant: r.headingLarge, element: "h1", className: `${a}__title`, children:
|
|
52
|
+
/* @__PURE__ */ e(n.Title, { variant: r.headingLarge, element: "h1", className: `${a}__title`, children: l }),
|
|
52
53
|
s && /* @__PURE__ */ e(t, { variant: r.badge, className: `${a}__badge`, children: s }),
|
|
53
54
|
/* @__PURE__ */ e(t, { variant: r.labelMedium, className: `${a}__location`, children: b }),
|
|
54
55
|
/* @__PURE__ */ i("div", { className: `${a}__occurrence-details`, children: [
|
|
55
|
-
C.map(({ date:
|
|
56
|
-
/* @__PURE__ */ e(t, { variant: r.labelMedium, children:
|
|
57
|
-
/* @__PURE__ */ e(t, { variant: r.labelMedium, className: `${a}__date`, children:
|
|
58
|
-
] }, String(
|
|
56
|
+
C.map(({ date: _, occurrenceLabel: z }) => /* @__PURE__ */ i("div", { className: `${a}__occurrence-details-text`, children: [
|
|
57
|
+
/* @__PURE__ */ e(t, { variant: r.labelMedium, children: z }),
|
|
58
|
+
/* @__PURE__ */ e(t, { variant: r.labelMedium, className: `${a}__date`, children: _ })
|
|
59
|
+
] }, String(_))),
|
|
59
60
|
k
|
|
60
61
|
] }),
|
|
61
62
|
P
|
|
62
63
|
] }) }) }),
|
|
63
|
-
/* @__PURE__ */ e(n.Media, { size:
|
|
64
|
-
|
|
64
|
+
/* @__PURE__ */ e(n.Media, { size: V.half, className: `${a}__image`, children: /* @__PURE__ */ e(
|
|
65
|
+
I,
|
|
65
66
|
{
|
|
66
|
-
aspectRatio:
|
|
67
|
+
aspectRatio: Q.Landscape,
|
|
67
68
|
src: v,
|
|
68
|
-
alt: String(
|
|
69
|
+
alt: String(l),
|
|
69
70
|
objectFit: "cover",
|
|
70
71
|
srcSet: N,
|
|
71
72
|
sizes: g,
|
|
@@ -77,7 +78,7 @@ const Q = R(
|
|
|
77
78
|
] });
|
|
78
79
|
}
|
|
79
80
|
);
|
|
80
|
-
|
|
81
|
+
T.displayName = "SaleHeaderBanner";
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
+
T as default
|
|
83
84
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
@use '../../allPartials' as *;
|
|
2
2
|
|
|
3
3
|
.#{$px}-seldon-image {
|
|
4
|
+
// Propagate an ancestor `max-height` down to the wrapper so the img can inherit it too (percentages resolve to `none` when parent height is auto; `inherit` doesn't).
|
|
5
|
+
max-height: inherit;
|
|
4
6
|
overflow: hidden;
|
|
5
7
|
position: relative;
|
|
6
8
|
|
|
@@ -14,9 +16,28 @@
|
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
|
|
19
|
+
// Portrait/square can overflow vertically; auto dims + max caps let the img respect parent max-height, not just width.
|
|
20
|
+
&--aspect-ratio-3-4 {
|
|
21
|
+
img {
|
|
22
|
+
aspect-ratio: 3 / 4;
|
|
23
|
+
height: auto;
|
|
24
|
+
max-height: inherit;
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
width: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.#{$px}-seldon-image--error-image {
|
|
30
|
+
aspect-ratio: 3 / 4;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
17
34
|
&--aspect-ratio-1-1 {
|
|
18
35
|
img {
|
|
19
36
|
aspect-ratio: 1 / 1;
|
|
37
|
+
height: auto;
|
|
38
|
+
max-height: inherit;
|
|
39
|
+
max-width: 100%;
|
|
40
|
+
width: auto;
|
|
20
41
|
}
|
|
21
42
|
|
|
22
43
|
&.#{$px}-seldon-image--error-image {
|
|
Binary file
|
|
Binary file
|