@phillips/seldon 1.210.2 → 1.211.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,4 +1,4 @@
1
- var o = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- o as __module
3
+ e as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var o = { exports: {} };
2
2
  export {
3
- e as __module
3
+ o as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../../_virtual/index9.js";
1
+ import { __module as e } from "../../../_virtual/index10.js";
2
2
  import { __require as r } from "./index.cjs.development.js";
3
3
  import { __require as o } from "./index.cjs.production.min.js";
4
4
  typeof process < "u" && process.env.NODE_ENV !== "production" ? e.exports = r() : e.exports = o();
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs as d } from "../../_virtual/_commonjsHelpers.js";
2
- import { __module as v } from "../../_virtual/index10.js";
2
+ import { __module as v } from "../../_virtual/index9.js";
3
3
  v.exports = function(n) {
4
4
  return g(m(n), n);
5
5
  };
@@ -1,9 +1,14 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { SaleCardActions } from './SaleCardActions';
3
- import { SaleCardVariants } from './types';
4
- /** * Props for the SaleCard component. */
3
+ import { SaleCardVariants, SaleCardImageDisplay } from './types';
4
+ /**
5
+ * Props for the SaleCard component.
6
+ */
5
7
  export interface SaleCardProps extends ComponentProps<'div'> {
6
- /** * The source URL of the image to be displayed. */
8
+ /**
9
+ * The source URL of the image to be displayed.
10
+ * Leaving this prop undefined or falsy is the intended way to hide the image.
11
+ */
7
12
  imageSrc?: string;
8
13
  /** * The alt text for the image. Defaults to "Auction Image" if not provided. */
9
14
  imageAlt?: string;
@@ -28,6 +33,8 @@ export interface SaleCardProps extends ComponentProps<'div'> {
28
33
  variant?: SaleCardVariants;
29
34
  /** * The <SaleCardActions /> component used to render the SaleCard CTAs. */
30
35
  children?: React.ReactElement<typeof SaleCardActions>;
36
+ /** * The position of the image relative to the content. Can be 'left' or 'right'. Defaults to 'left'. */
37
+ imageDisplay?: SaleCardImageDisplay;
31
38
  }
32
39
  /**
33
40
  * ## Overview
@@ -1,58 +1,60 @@
1
1
  import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import E from "../../node_modules/classnames/index.js";
3
- import { forwardRef as b } from "react";
4
- import y from "../../components/Button/Button.js";
5
- import { ButtonVariants as A } from "../../components/Button/types.js";
6
- import L from "../../components/SeldonImage/SeldonImage.js";
2
+ import L from "../../node_modules/classnames/index.js";
3
+ import { forwardRef as T } from "react";
4
+ import b from "../../components/Button/Button.js";
5
+ import { ButtonVariants as y } from "../../components/Button/types.js";
6
+ import A from "../../components/SeldonImage/SeldonImage.js";
7
7
  import { TextVariants as e } from "../../components/Text/types.js";
8
8
  import s from "../../components/Text/Text.js";
9
- import { SSRMediaQuery as T } from "../../providers/SeldonProvider/utils.js";
9
+ import { SSRMediaQuery as I } from "../../providers/SeldonProvider/utils.js";
10
10
  import { getCommonProps as x } from "../../utils/index.js";
11
- import { SaleCardVariants as _ } from "./types.js";
12
- const I = b(
11
+ import { SaleCardVariants as p, SaleCardImageDisplay as P } from "./types.js";
12
+ const R = T(
13
13
  ({
14
- className: p,
14
+ className: f,
15
15
  imageSrc: t,
16
- imageAlt: f = "Auction Image",
17
- auctionType: N,
16
+ imageAlt: N = "Auction Image",
17
+ auctionType: $,
18
18
  titleText: h,
19
- date: $,
20
- location: g,
19
+ date: g,
20
+ location: u,
21
21
  badgeText: o,
22
22
  modalButtonOnClick: l,
23
23
  modalButtonText: n,
24
- variant: i = _.DEFAULT,
24
+ variant: i = p.DEFAULT,
25
25
  children: c,
26
- ...d
27
- }, u) => {
28
- const { className: a, ...v } = x(d, "SaleCard"), S = E(a, p, {
29
- [`${a}--${i}`]: i
30
- }), C = { ...v, ...d };
31
- return /* @__PURE__ */ m("article", { ...C, className: S, ref: u, children: [
32
- t ? /* @__PURE__ */ r(L, { src: t, alt: f, className: `${a}__image` }) : null,
26
+ imageDisplay: d = P.LEFT,
27
+ ..._
28
+ }, v) => {
29
+ const { className: a, ...S } = x(_, "SaleCard"), C = L(a, f, {
30
+ [`${a}--${i}`]: i,
31
+ [`${a}--image-${d}`]: d
32
+ }), E = { ...S, ..._ };
33
+ return /* @__PURE__ */ m("article", { ...E, className: C, ref: v, children: [
34
+ t ? /* @__PURE__ */ r(A, { src: t, alt: N, className: `${a}__image` }) : null,
33
35
  /* @__PURE__ */ m("div", { className: `${a}__details`, children: [
34
- /* @__PURE__ */ r(s, { variant: e.badge, className: `${a}__auction-type`, children: N }),
36
+ /* @__PURE__ */ r(s, { variant: e.badge, className: `${a}__auction-type`, children: $ }),
35
37
  /* @__PURE__ */ r(s, { variant: e.title3, children: h }),
36
38
  o && /* @__PURE__ */ r(s, { variant: e.badge, className: `${a}__badge`, children: o }),
37
39
  /* @__PURE__ */ m("div", { className: `${a}__info`, children: [
40
+ /* @__PURE__ */ r(s, { variant: e.string2, children: u }),
38
41
  /* @__PURE__ */ r(s, { variant: e.string2, children: g }),
39
- /* @__PURE__ */ r(s, { variant: e.string2, children: $ }),
40
42
  n && l && /* @__PURE__ */ r("div", { className: `${a}__modal-link`, children: /* @__PURE__ */ r(
41
- y,
43
+ b,
42
44
  {
43
45
  onClick: l,
44
- variant: A.tertiary,
46
+ variant: y.tertiary,
45
47
  className: `${a}__modal-link-button`,
46
48
  children: n
47
49
  }
48
50
  ) })
49
51
  ] })
50
52
  ] }),
51
- i !== _.RELATED_SALE_TILE && c && /* @__PURE__ */ r("div", { className: `${a}__ctas`, children: /* @__PURE__ */ r(T.Media, { greaterThanOrEqual: "md", children: c }) })
53
+ i !== p.RELATED_SALE_TILE && c && /* @__PURE__ */ r("div", { className: `${a}__ctas`, children: /* @__PURE__ */ r(I.Media, { greaterThanOrEqual: "md", children: c }) })
52
54
  ] });
53
55
  }
54
56
  );
55
- I.displayName = "SaleCard";
57
+ R.displayName = "SaleCard";
56
58
  export {
57
- I as default
59
+ R as default
58
60
  };
@@ -23,3 +23,4 @@ export declare const SaleCardWithDownloadLink: () => import("react/jsx-runtime")
23
23
  export declare const SaleCardNoCTA: () => import("react/jsx-runtime").JSX.Element;
24
24
  export declare const SaleCardWithLink: () => import("react/jsx-runtime").JSX.Element;
25
25
  export declare const SaleCardNoImage: () => import("react/jsx-runtime").JSX.Element;
26
+ export declare const SaleCardImageRightVariants: () => import("react/jsx-runtime").JSX.Element;
@@ -2,3 +2,7 @@ export declare enum SaleCardVariants {
2
2
  DEFAULT = "default",
3
3
  RELATED_SALE_TILE = "relatedSaleTile"
4
4
  }
5
+ export declare enum SaleCardImageDisplay {
6
+ LEFT = "left",
7
+ RIGHT = "right"
8
+ }
@@ -1,4 +1,5 @@
1
- var E = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.RELATED_SALE_TILE = "relatedSaleTile", e))(E || {});
1
+ var r = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.RELATED_SALE_TILE = "relatedSaleTile", e))(r || {}), t = /* @__PURE__ */ ((e) => (e.LEFT = "left", e.RIGHT = "right", e))(t || {});
2
2
  export {
3
- E as SaleCardVariants
3
+ t as SaleCardImageDisplay,
4
+ r as SaleCardVariants
4
5
  };
@@ -6,8 +6,16 @@
6
6
  flex-direction: column;
7
7
  gap: $spacing-md;
8
8
 
9
- @include media($breakpoint-snw-mobile) {
10
- flex-direction: row;
9
+ &--image-left {
10
+ @include media($breakpoint-snw-mobile) {
11
+ flex-direction: row;
12
+ }
13
+ }
14
+
15
+ &--image-right {
16
+ @include media($breakpoint-snw-mobile) {
17
+ flex-direction: row-reverse;
18
+ }
11
19
  }
12
20
 
13
21
  &__image {
@@ -118,7 +126,12 @@
118
126
  gap: $spacing-sm;
119
127
 
120
128
  @include media($size-snw-mobile, 'max') {
121
- flex-direction: row;
129
+ &.#{$px}-sale-card--image-left {
130
+ flex-direction: row;
131
+ }
132
+ &.#{$px}-sale-card--image-right {
133
+ flex-direction: row-reverse;
134
+ }
122
135
  }
123
136
 
124
137
  .#{$px}-sale-card__image {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.210.2",
3
+ "version": "1.211.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"