@phillips/seldon 1.120.0 → 1.121.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.
@@ -20,6 +20,10 @@ export interface ObjectTileProps extends ComponentProps<'a'> {
20
20
  * Estimate on request text to use when estimate is not available.
21
21
  */
22
22
  estimateOnRequestText?: string;
23
+ /**
24
+ * Element used for badge object
25
+ */
26
+ badgeElement?: React.ElementType;
23
27
  /**
24
28
  * Element used for favoriting object
25
29
  */
@@ -1,105 +1,107 @@
1
- import { jsxs as s, jsx as a, Fragment as E } from "react/jsx-runtime";
2
- import { memo as O, forwardRef as z } from "react";
3
- import B from "../../node_modules/classnames/index.js";
4
- import { getCommonProps as F } from "../../utils/index.js";
1
+ import { jsxs as s, jsx as a, Fragment as O } from "react/jsx-runtime";
2
+ import { memo as z, forwardRef as F } from "react";
3
+ import I from "../../node_modules/classnames/index.js";
4
+ import { getCommonProps as L } from "../../utils/index.js";
5
5
  import { TextVariants as l } from "../../components/Text/types.js";
6
6
  import i from "../../components/Text/Text.js";
7
- import I from "../DetailList/DetailList.js";
8
- import L from "../../components/Detail/Detail.js";
9
- import R from "../../components/SeldonImage/SeldonImage.js";
10
- const V = O(
11
- z(
7
+ import R from "../DetailList/DetailList.js";
8
+ import V from "../../components/Detail/Detail.js";
9
+ import W from "../../components/SeldonImage/SeldonImage.js";
10
+ const w = z(
11
+ F(
12
12
  ({
13
- badgeText: p,
14
- className: f,
15
- children: $,
16
- element: N,
13
+ badgeText: f,
14
+ className: $,
15
+ children: N,
16
+ element: g,
17
17
  estimate: n,
18
- estimateLabelText: g = "Estimate",
18
+ estimateLabelText: b = "Estimate",
19
19
  estimateOnRequestText: m,
20
- favoriteElement: r,
20
+ badgeElement: r,
21
+ favoriteElement: o,
21
22
  imageAlt: u = "Brought to you by Phillips",
22
- imageUrl: b = "",
23
- imageSrcSet: v,
24
- imageSizes: j,
25
- imageLoading: k,
26
- imageFetchPriority: y,
27
- lotNumber: P,
28
- makerText: o,
29
- modelText: c,
30
- referenceNumber: _,
31
- titleText: d,
23
+ imageUrl: v = "",
24
+ imageSrcSet: j,
25
+ imageSizes: k,
26
+ imageLoading: y,
27
+ imageFetchPriority: P,
28
+ lotNumber: S,
29
+ makerText: c,
30
+ modelText: _,
31
+ referenceNumber: d,
32
+ titleText: h,
32
33
  withdrawnText: t,
33
- ...h
34
- }, S) => {
35
- const { className: e, ...C } = F(h, "ObjectTile"), x = N ?? "a", D = n || m;
36
- return /* @__PURE__ */ s(x, { ...C, className: B(e, f), ...h, ref: S, children: [
34
+ ...p
35
+ }, C) => {
36
+ const { className: e, ...x } = L(p, "ObjectTile"), D = g ?? "a", E = n || m;
37
+ return /* @__PURE__ */ s(D, { ...x, className: I(e, $), ...p, ref: C, children: [
37
38
  /* @__PURE__ */ a(
38
- R,
39
+ W,
39
40
  {
40
41
  alt: u,
41
42
  aspectRatio: "1/1",
42
43
  className: `${e}__img`,
43
44
  objectFit: "contain",
44
- src: b,
45
- srcSet: v,
46
- sizes: j,
47
- loading: k,
48
- fetchPriority: y
45
+ src: v,
46
+ srcSet: j,
47
+ sizes: k,
48
+ loading: y,
49
+ fetchPriority: P
49
50
  }
50
51
  ),
51
- t ? null : /* @__PURE__ */ a(i, { className: `${e}__badge`, variant: l.badge, children: p }),
52
+ t ? null : /* @__PURE__ */ a(i, { className: `${e}__badge`, variant: l.badge, children: f }),
52
53
  /* @__PURE__ */ s("div", { className: `${e}__lot-number-like`, children: [
53
- /* @__PURE__ */ a(i, { className: `${e}__lot-number`, variant: l.heading3, element: "p", children: P }),
54
- r && /* @__PURE__ */ a(r, {})
54
+ /* @__PURE__ */ a(i, { className: `${e}__lot-number`, variant: l.heading3, element: "p", children: S }),
55
+ r && /* @__PURE__ */ a("div", { className: `${e}__lot-badge`, children: /* @__PURE__ */ a(r, {}) }),
56
+ o && /* @__PURE__ */ a(o, {})
55
57
  ] }),
56
- t ? /* @__PURE__ */ a(i, { className: `${e}__withdrawn`, variant: l.heading4, children: t }) : /* @__PURE__ */ s(E, { children: [
58
+ t ? /* @__PURE__ */ a(i, { className: `${e}__withdrawn`, variant: l.heading4, children: t }) : /* @__PURE__ */ s(O, { children: [
57
59
  /* @__PURE__ */ s("div", { className: `${e}__meta`, children: [
58
- o ? /* @__PURE__ */ a(i, { className: `${e}__maker`, variant: l.heading3, children: o }) : null,
59
- d ? /* @__PURE__ */ a(
60
+ c ? /* @__PURE__ */ a(i, { className: `${e}__maker`, variant: l.heading3, children: c }) : null,
61
+ h ? /* @__PURE__ */ a(
60
62
  i,
61
63
  {
62
64
  className: `${e}__title ${e}__token-fix`,
63
65
  variant: l.heading4,
64
66
  element: "cite",
65
- children: d
67
+ children: h
66
68
  }
67
69
  ) : null,
68
- _ ? /* @__PURE__ */ a(
70
+ d ? /* @__PURE__ */ a(
69
71
  i,
70
72
  {
71
73
  className: `${e}__reference-number ${e}__token-fix`,
72
74
  variant: l.heading4,
73
75
  element: "p",
74
- children: _
76
+ children: d
75
77
  }
76
78
  ) : null,
77
- c ? /* @__PURE__ */ a(
79
+ _ ? /* @__PURE__ */ a(
78
80
  i,
79
81
  {
80
82
  className: `${e}__model ${e}__token-fix`,
81
83
  variant: l.heading4,
82
84
  element: "p",
83
- children: c
85
+ children: _
84
86
  }
85
87
  ) : null
86
88
  ] }),
87
- D ? /* @__PURE__ */ a(I, { hasSeparators: !0, className: `${e}__estimate ${e}__section`, children: /* @__PURE__ */ a(
88
- L,
89
+ E ? /* @__PURE__ */ a(R, { hasSeparators: !0, className: `${e}__estimate ${e}__section`, children: /* @__PURE__ */ a(
90
+ V,
89
91
  {
90
92
  className: `${e}__estimate__label`,
91
- label: g,
93
+ label: b,
92
94
  value: n || m,
93
95
  hasWrap: !1
94
96
  }
95
97
  ) }) : null,
96
- /* @__PURE__ */ a("div", { className: `${e}__section`, children: $ })
98
+ /* @__PURE__ */ a("div", { className: `${e}__section`, children: N })
97
99
  ] })
98
100
  ] });
99
101
  }
100
102
  )
101
103
  );
102
- V.displayName = "ObjectTile";
104
+ w.displayName = "ObjectTile";
103
105
  export {
104
- V as default
106
+ w as default
105
107
  };
@@ -9,6 +9,7 @@ export declare const NoImage: {
9
9
  (props: ComponentProps<typeof ObjectTile>): import("react/jsx-runtime").JSX.Element;
10
10
  args: {
11
11
  badgeText: string;
12
+ badgeElement: () => import("react/jsx-runtime").JSX.Element;
12
13
  favoriteElement: () => import("react/jsx-runtime").JSX.Element;
13
14
  estimate: string;
14
15
  element: string;
@@ -26,6 +27,7 @@ export declare const Playground: {
26
27
  (props: ComponentProps<typeof ObjectTile>): import("react/jsx-runtime").JSX.Element;
27
28
  args: {
28
29
  badgeText: string;
30
+ badgeElement: () => import("react/jsx-runtime").JSX.Element;
29
31
  favoriteElement: () => import("react/jsx-runtime").JSX.Element;
30
32
  estimate: string;
31
33
  element: string;
@@ -30,16 +30,32 @@
30
30
  &__lot-number-like {
31
31
  position: relative;
32
32
 
33
- & > :not(.#{$px}-object-tile__lot-number) {
33
+ & > :not(.#{$px}-object-tile__lot-number):not(.#{$px}-object-tile__lot-badge) {
34
34
  position: absolute;
35
35
  right: 0;
36
36
  top: 50%;
37
37
  transform: translateY(-50%);
38
38
  }
39
+
40
+ .#{$px}-object-tile__lot-badge {
41
+ display: inline-block;
42
+ position: absolute;
43
+ left: 4%;
44
+
45
+ svg {
46
+ height: 100%;
47
+ width: 100%;
48
+
49
+ path {
50
+ fill: $pure-black;
51
+ }
52
+ }
53
+ }
39
54
  }
40
55
 
41
56
  & .#{$px}-object-tile__lot-number {
42
57
  margin-bottom: $spacing-xsm;
58
+ display: inline-block;
43
59
  }
44
60
 
45
61
  & .#{$px}-object-tile__maker,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.120.0",
3
+ "version": "1.121.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"