@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.
@@ -1,21 +1,22 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as R } from "react";
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 O } from "../../types/commonTypes.js";
6
- import { SSRMediaQuery as p } from "../../providers/SeldonProvider/utils.js";
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 V, BannerMediaSize as q } from "../../components/Banner/types.js";
11
- import I from "../../components/PageContentWrapper/PageContentWrapper.js";
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 L from "../../components/SeldonImage/SeldonImage.js";
15
- const Q = R(
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: l,
18
- auctionTitle: o,
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: T,
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: j,
37
+ getCurrentDateTime: A,
37
38
  ...c
38
- }, z) => {
39
- const { className: a, ...A } = D(c, "SaleHeaderBanner"), d = w === O.live, _ = {
40
- endDateTime: l,
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: j
44
+ getCurrentDateTime: A
44
45
  };
45
- return /* @__PURE__ */ i("div", { ...A, className: F(a, x), ...c, ref: z, children: [
46
- d && l && m ? /* @__PURE__ */ e(p.Media, { lessThan: f.md, children: /* @__PURE__ */ e("div", { className: `${a}__stack__countdown`, children: /* @__PURE__ */ e(u, { ..._, showBottomBorder: !1, centerAlign: !0 }) }) }) : null,
47
- /* @__PURE__ */ i(n, { variant: V.top, children: [
48
- /* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ i("div", { className: `${a}__stack`, children: [
49
- d && l && m ? /* @__PURE__ */ e(p.Media, { greaterThanOrEqual: f.md, children: /* @__PURE__ */ e("div", { className: `${a}__stack__countdown`, children: /* @__PURE__ */ e(u, { ..._, centerAlign: !0 }) }) }) : null,
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: o }),
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: h, occurrenceLabel: H }) => /* @__PURE__ */ i("div", { className: `${a}__occurrence-details-text`, children: [
56
- /* @__PURE__ */ e(t, { variant: r.labelMedium, children: H }),
57
- /* @__PURE__ */ e(t, { variant: r.labelMedium, className: `${a}__date`, children: h })
58
- ] }, String(h))),
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: q.half, className: `${a}__image`, children: /* @__PURE__ */ e(
64
- L,
64
+ /* @__PURE__ */ e(n.Media, { size: V.half, className: `${a}__image`, children: /* @__PURE__ */ e(
65
+ I,
65
66
  {
66
- aspectRatio: "16/9",
67
+ aspectRatio: Q.Landscape,
67
68
  src: v,
68
- alt: String(o),
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
- Q.displayName = "SaleHeaderBanner";
81
+ T.displayName = "SaleHeaderBanner";
81
82
  export {
82
- Q as default
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.274.0",
3
+ "version": "1.275.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"