@phillips/seldon 1.119.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.
Files changed (116) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +1 -1
  2. package/dist/components/Accordion/Accordion.js +18 -18
  3. package/dist/components/Accordion/AccordionItem.js +67 -68
  4. package/dist/components/Carousel/Carousel.js +49 -51
  5. package/dist/components/Carousel/CarouselDots.js +46 -47
  6. package/dist/components/ContentPeek/ContentPeek.js +47 -47
  7. package/dist/components/ErrorBoundary/ErrorBoundary.js +11 -12
  8. package/dist/components/Filter/Filter.js +40 -41
  9. package/dist/components/Filter/FilterHeader.js +24 -24
  10. package/dist/components/Input/Input.d.ts +1 -1
  11. package/dist/components/Input/Input.js +21 -20
  12. package/dist/components/Input/Input.stories.d.ts +7 -0
  13. package/dist/components/Link/utils.js +2 -2
  14. package/dist/components/LinkBlock/LinkBlock.js +12 -13
  15. package/dist/components/LinkList/LinkList.js +8 -11
  16. package/dist/components/Navigation/Navigation.js +21 -22
  17. package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +48 -50
  18. package/dist/components/Navigation/NavigationList/NavigationList.js +33 -35
  19. package/dist/components/Pagination/Pagination.js +7 -7
  20. package/dist/components/Pagination/utils.js +1 -1
  21. package/dist/components/PinchZoom/PinchZoom.js +40 -43
  22. package/dist/components/Search/Search.js +94 -98
  23. package/dist/components/Search/SearchButton.js +19 -19
  24. package/dist/components/SeldonImage/SeldonImage.js +1 -1
  25. package/dist/components/Select/Select.js +22 -14
  26. package/dist/components/Select/Select.stories.d.ts +15 -0
  27. package/dist/components/Tabs/TabTrigger.js +13 -13
  28. package/dist/node_modules/@artsy/fresnel/dist/Breakpoints.js +2 -2
  29. package/dist/node_modules/@artsy/fresnel/dist/DynamicResponsive.js +1 -1
  30. package/dist/node_modules/@artsy/fresnel/dist/Interactions.js +2 -2
  31. package/dist/node_modules/@artsy/fresnel/dist/Media.js +2 -2
  32. package/dist/node_modules/@artsy/fresnel/dist/MediaQueries.js +1 -1
  33. package/dist/node_modules/@artsy/fresnel/dist/Utils.js +1 -1
  34. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
  35. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
  36. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +2 -2
  37. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +2 -2
  38. package/dist/node_modules/@radix-ui/primitive/dist/index.js +5 -5
  39. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +63 -67
  40. package/dist/node_modules/@radix-ui/react-context/dist/index.js +35 -35
  41. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +79 -83
  42. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +5 -5
  43. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +43 -45
  44. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
  45. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
  46. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
  47. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
  48. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
  49. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
  50. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
  51. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
  52. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
  53. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
  54. package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
  55. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +113 -115
  56. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
  57. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +33 -37
  58. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
  59. package/dist/node_modules/@radix-ui/react-select/dist/index.js +422 -439
  60. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
  61. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
  62. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
  63. package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +39 -41
  64. package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
  65. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +7 -10
  66. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
  67. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
  68. package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
  69. package/dist/node_modules/change-case/dist/index.js +41 -44
  70. package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
  71. package/dist/node_modules/date-fns/differenceInDays.js +9 -9
  72. package/dist/node_modules/date-fns/differenceInHours.js +11 -11
  73. package/dist/node_modules/date-fns/differenceInMinutes.js +8 -8
  74. package/dist/node_modules/date-fns/differenceInSeconds.js +7 -7
  75. package/dist/node_modules/date-fns/formatDuration.js +11 -12
  76. package/dist/node_modules/date-fns/isSameWeek.js +8 -8
  77. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
  78. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
  79. package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +5 -5
  80. package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +10 -10
  81. package/dist/node_modules/date-fns/startOfDay.js +6 -6
  82. package/dist/node_modules/date-fns/startOfWeek.js +7 -8
  83. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1 -1
  84. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +1 -1
  85. package/dist/node_modules/exenv/index.js +2 -2
  86. package/dist/node_modules/get-nonce/dist/es2015/index.js +1 -1
  87. package/dist/node_modules/prop-types/checkPropTypes.js +2 -2
  88. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
  89. package/dist/node_modules/react-intersection-observer/dist/index.js +2 -2
  90. package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +1 -1
  91. package/dist/node_modules/react-modal/lib/components/ModalPortal.js +1 -1
  92. package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +1 -1
  93. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
  94. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
  95. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +1 -1
  96. package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
  97. package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +14 -14
  98. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
  99. package/dist/node_modules/usehooks-ts/dist/index.js +1 -1
  100. package/dist/node_modules/warning/warning.js +1 -1
  101. package/dist/node_modules/wheel-gestures/dist/wheel-gestures.esm.js +1 -1
  102. package/dist/patterns/BidSnapshot/BidSnapshot.js +58 -58
  103. package/dist/patterns/DetailList/DetailList.js +22 -22
  104. package/dist/patterns/FilterMenu/FilterMenu.js +15 -15
  105. package/dist/patterns/LanguageSelector/LanguageSelector.js +23 -23
  106. package/dist/patterns/LanguageSelector/utils.js +2 -5
  107. package/dist/patterns/ObjectTile/ObjectTile.d.ts +4 -0
  108. package/dist/patterns/ObjectTile/ObjectTile.js +50 -48
  109. package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +2 -0
  110. package/dist/patterns/ViewingsList/StatefulViewingsList.js +16 -16
  111. package/dist/patterns/ViewingsList/ViewingsList.js +42 -42
  112. package/dist/patterns/ViewingsList/ViewingsListCard.js +122 -123
  113. package/dist/patterns/ViewingsList/ViewingsListCardForm.js +170 -170
  114. package/dist/scss/patterns/ObjectTile/_objectTile.scss +17 -1
  115. package/dist/site-furniture/Header/Header.js +32 -32
  116. package/package.json +2 -1
@@ -1,42 +1,42 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import $, { forwardRef as j } from "react";
3
- import p from "../../node_modules/classnames/index.js";
4
- import { getCommonProps as D, px as s } from "../../utils/index.js";
5
- import { DetailListAlignment as t } from "./types.js";
6
- import { getDetailKey as N } from "./utils.js";
7
- const L = j(
8
- ({ alignment: a = t.justified, className: u, children: e, hasSeparators: m = !1, ...r }, c) => {
9
- const { className: f, ...d } = D(r, "DetailList"), o = Array.isArray(e) ? e : [e];
3
+ import f from "../../node_modules/classnames/index.js";
4
+ import { getCommonProps as y, px as s } from "../../utils/index.js";
5
+ import { DetailListAlignment as a } from "./types.js";
6
+ import { getDetailKey as D } from "./utils.js";
7
+ const N = j(
8
+ ({ alignment: e = a.justified, className: p, children: t, hasSeparators: i = !1, ...o }, c) => {
9
+ const { className: m, ...d } = y(o, "DetailList"), u = Array.isArray(t) ? t : [t];
10
10
  return /* @__PURE__ */ l(
11
11
  "dl",
12
12
  {
13
13
  ...d,
14
- className: p(f, u, {
15
- [`${s}-has-separators`]: m,
16
- [`${s}-columns`]: a === t.columns,
17
- [`${s}-justified`]: a === t.justified
14
+ className: f(m, p, {
15
+ [`${s}-has-separators`]: i,
16
+ [`${s}-columns`]: e === a.columns,
17
+ [`${s}-justified`]: e === a.justified
18
18
  }),
19
- ...r,
19
+ ...o,
20
20
  ref: c,
21
- children: o == null ? void 0 : o.map(
22
- (i, n) => $.isValidElement(i) ? /* @__PURE__ */ l(
21
+ children: u?.map(
22
+ (r, n) => $.isValidElement(r) ? /* @__PURE__ */ l(
23
23
  "div",
24
24
  {
25
- className: p(`${f}-wrapper`, {
26
- [`${s}-has-separators`]: m,
27
- [`${s}-columns`]: a === t.columns,
28
- [`${s}-justified`]: a === t.justified
25
+ className: f(`${m}-wrapper`, {
26
+ [`${s}-has-separators`]: i,
27
+ [`${s}-columns`]: e === a.columns,
28
+ [`${s}-justified`]: e === a.justified
29
29
  }),
30
- children: i
30
+ children: r
31
31
  },
32
- N(i, n)
32
+ D(r, n)
33
33
  ) : void 0
34
34
  )
35
35
  }
36
36
  );
37
37
  }
38
38
  );
39
- L.displayName = "DetailList";
39
+ N.displayName = "DetailList";
40
40
  export {
41
- L as default
41
+ N as default
42
42
  };
@@ -1,23 +1,23 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
- import d, { forwardRef as N, useState as C, Children as g, cloneElement as F } from "react";
3
- import { getCommonProps as V } from "../../utils/index.js";
4
- import a from "../../node_modules/classnames/index.js";
5
- import w from "../../components/Filter/Filter.js";
6
- const x = N(
7
- ({ className: t, children: m, element: n = "form", ...r }, l) => {
8
- const { className: i, ...p } = V(r, "FilterMenu"), [s, f] = C(null), o = s == null ? void 0 : s.length, c = g.map(
9
- m,
10
- (e) => d.isValidElement(e) && e.type === w ? F(e, {
2
+ import d, { forwardRef as F, useState as N, Children as w, cloneElement as C } from "react";
3
+ import { getCommonProps as g } from "../../utils/index.js";
4
+ import t from "../../node_modules/classnames/index.js";
5
+ import A from "../../components/Filter/Filter.js";
6
+ const V = F(
7
+ ({ className: a, children: l, element: i = "form", ...r }, m) => {
8
+ const { className: n, ...p } = g(r, "FilterMenu"), [o, f] = N(null), s = o?.length, c = w.map(
9
+ l,
10
+ (e) => d.isValidElement(e) && e.type === A ? C(e, {
11
11
  setViewAllFilter: f,
12
- hidden: o ? s !== e.props.name : !1,
13
- isViewingAll: o,
14
- className: o && a(e.props.className, "is-opening")
12
+ hidden: s ? o !== e.props.name : !1,
13
+ isViewingAll: s,
14
+ className: s && t(e.props.className, "is-opening")
15
15
  }) : e
16
16
  );
17
- return /* @__PURE__ */ u(n, { ...p, ...r, className: a(i, t), ref: l, children: c });
17
+ return /* @__PURE__ */ u(i, { ...p, ...r, className: t(n, a), ref: m, children: c });
18
18
  }
19
19
  );
20
- x.displayName = "FilterControl";
20
+ V.displayName = "FilterControl";
21
21
  export {
22
- x as default
22
+ V as default
23
23
  };
@@ -2,7 +2,7 @@ import { jsxs as v, Fragment as L, jsx as e } from "react/jsx-runtime";
2
2
  import { forwardRef as b } from "react";
3
3
  import { getCommonProps as S, noOp as N } from "../../utils/index.js";
4
4
  import T from "../../node_modules/classnames/index.js";
5
- import { SupportedLanguages as i } from "../../types/commonTypes.js";
5
+ import { SupportedLanguages as m } from "../../types/commonTypes.js";
6
6
  import x from "../../components/Dropdown/Dropdown.js";
7
7
  import C from "../../components/Accordion/Accordion.js";
8
8
  import k from "../../components/Accordion/AccordionItem.js";
@@ -12,53 +12,53 @@ import { LinkVariants as M } from "../../components/Link/types.js";
12
12
  import { TextVariants as V } from "../../components/Text/types.js";
13
13
  import A from "../../components/Text/Text.js";
14
14
  import I from "../../components/Navigation/NavigationList/NavigationList.js";
15
- import { SSRMediaQuery as g } from "../../providers/SeldonProvider/utils.js";
15
+ import { SSRMediaQuery as d } from "../../providers/SeldonProvider/utils.js";
16
16
  import { getLanguageLabel as P } from "./utils.js";
17
17
  const j = ({
18
- id: a,
18
+ id: r,
19
19
  value: l,
20
20
  // can't be passed to the accordion
21
21
  onValueChange: o,
22
22
  label: t,
23
23
  options: n,
24
- ...m
25
- }) => /* @__PURE__ */ e(C, { ...m, children: /* @__PURE__ */ e(
24
+ ...i
25
+ }) => /* @__PURE__ */ e(C, { ...i, children: /* @__PURE__ */ e(
26
26
  k,
27
27
  {
28
28
  hasTransition: !0,
29
- id: a != null ? a : "language-selector-accordion",
29
+ id: r ?? "language-selector-accordion",
30
30
  label: /* @__PURE__ */ e(A, { variant: V.snwHeaderLink, children: t }),
31
31
  variant: w.lg,
32
- children: /* @__PURE__ */ e(I, { id: `${a}-navlist`, children: n.map((r) => /* @__PURE__ */ e(
32
+ children: /* @__PURE__ */ e(I, { id: `${r}-navlist`, children: n.map((a) => /* @__PURE__ */ e(
33
33
  y,
34
34
  {
35
- label: r.label,
36
- onClick: () => o(r.value),
35
+ label: a.label,
36
+ onClick: () => o(a.value),
37
37
  navType: M.snwFlyoutLink
38
38
  },
39
- r.value
39
+ a.value
40
40
  )) })
41
41
  }
42
42
  ) }), E = b(
43
43
  ({
44
- className: a,
45
- currentLanguage: l = i.en,
44
+ className: r,
45
+ currentLanguage: l = m.en,
46
46
  languageOptions: o = [
47
- { label: "English", value: i.en },
48
- { label: "中文", value: i.zh }
47
+ { label: "English", value: m.en },
48
+ { label: "中文", value: m.zh }
49
49
  ],
50
50
  onLanguageChange: t = N,
51
51
  id: n,
52
- isHidden: m,
53
- disabled: r = !1,
54
- ...u
52
+ isHidden: i,
53
+ disabled: a = !1,
54
+ ...g
55
55
  }, s) => {
56
- const { className: c, ...d } = S({ id: n }, "LanguageSelector"), f = P({ languageOptions: o, currentLanguage: l }), p = {
57
- ...d,
56
+ const { className: c, ...u } = S({ id: n }, "LanguageSelector"), f = P({ languageOptions: o, currentLanguage: l }), p = {
58
57
  ...u,
58
+ ...g,
59
59
  id: n,
60
- className: T(c, a, {
61
- [`${c}--hidden`]: m
60
+ className: T(c, r, {
61
+ [`${c}--hidden`]: i
62
62
  }),
63
63
  options: o,
64
64
  value: l,
@@ -66,8 +66,8 @@ const j = ({
66
66
  label: f
67
67
  };
68
68
  return /* @__PURE__ */ v(L, { children: [
69
- /* @__PURE__ */ e(g.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ e(x, { ...p, disabled: r, ref: s }) }),
70
- /* @__PURE__ */ e(g.Media, { lessThan: "md", children: /* @__PURE__ */ e(j, { ...p, ref: s }) })
69
+ /* @__PURE__ */ e(d.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ e(x, { ...p, disabled: a, ref: s }) }),
70
+ /* @__PURE__ */ e(d.Media, { lessThan: "md", children: /* @__PURE__ */ e(j, { ...p, ref: s }) })
71
71
  ] });
72
72
  }
73
73
  );
@@ -1,7 +1,4 @@
1
- const f = ({ languageOptions: b, currentLanguage: c }) => {
2
- var e, L;
3
- return (L = (e = b == null ? void 0 : b.find((d) => d.value === c)) == null ? void 0 : e.label) != null ? L : "English";
4
- };
1
+ const g = ({ languageOptions: e, currentLanguage: a }) => e?.find((l) => l.value === a)?.label ?? "English";
5
2
  export {
6
- f as getLanguageLabel
3
+ g as getLanguageLabel
7
4
  };
@@ -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 e, Fragment as O } from "react/jsx-runtime";
2
- import { memo as z, forwardRef as B } from "react";
3
- import F from "../../node_modules/classnames/index.js";
4
- import { getCommonProps as I } 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 L from "../DetailList/DetailList.js";
8
- import R from "../../components/Detail/Detail.js";
9
- import V from "../../components/SeldonImage/SeldonImage.js";
10
- const W = z(
11
- B(
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
13
  badgeText: f,
14
14
  className: $,
15
15
  children: N,
16
- element: r,
16
+ element: g,
17
17
  estimate: n,
18
- estimateLabelText: g = "Estimate",
18
+ estimateLabelText: b = "Estimate",
19
19
  estimateOnRequestText: m,
20
+ badgeElement: r,
20
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,
23
+ imageUrl: v = "",
24
+ imageSrcSet: j,
25
+ imageSizes: k,
26
+ imageLoading: y,
27
+ imageFetchPriority: P,
28
+ lotNumber: S,
28
29
  makerText: c,
29
30
  modelText: _,
30
31
  referenceNumber: d,
31
32
  titleText: h,
32
33
  withdrawnText: t,
33
34
  ...p
34
- }, S) => {
35
- const { className: a, ...C } = I(p, "ObjectTile"), x = r != null ? r : "a", D = n || m;
36
- return /* @__PURE__ */ s(x, { ...C, className: F(a, $), ...p, ref: S, children: [
37
- /* @__PURE__ */ e(
38
- V,
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: [
38
+ /* @__PURE__ */ a(
39
+ W,
39
40
  {
40
41
  alt: u,
41
42
  aspectRatio: "1/1",
42
- className: `${a}__img`,
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__ */ e(i, { className: `${a}__badge`, variant: l.badge, children: f }),
52
- /* @__PURE__ */ s("div", { className: `${a}__lot-number-like`, children: [
53
- /* @__PURE__ */ e(i, { className: `${a}__lot-number`, variant: l.heading3, element: "p", children: P }),
54
- o && /* @__PURE__ */ e(o, {})
52
+ t ? null : /* @__PURE__ */ a(i, { className: `${e}__badge`, variant: l.badge, children: f }),
53
+ /* @__PURE__ */ s("div", { className: `${e}__lot-number-like`, children: [
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__ */ e(i, { className: `${a}__withdrawn`, variant: l.heading4, children: t }) : /* @__PURE__ */ s(O, { children: [
57
- /* @__PURE__ */ s("div", { className: `${a}__meta`, children: [
58
- c ? /* @__PURE__ */ e(i, { className: `${a}__maker`, variant: l.heading3, children: c }) : null,
59
- h ? /* @__PURE__ */ e(
58
+ t ? /* @__PURE__ */ a(i, { className: `${e}__withdrawn`, variant: l.heading4, children: t }) : /* @__PURE__ */ s(O, { children: [
59
+ /* @__PURE__ */ s("div", { className: `${e}__meta`, children: [
60
+ c ? /* @__PURE__ */ a(i, { className: `${e}__maker`, variant: l.heading3, children: c }) : null,
61
+ h ? /* @__PURE__ */ a(
60
62
  i,
61
63
  {
62
- className: `${a}__title ${a}__token-fix`,
64
+ className: `${e}__title ${e}__token-fix`,
63
65
  variant: l.heading4,
64
66
  element: "cite",
65
67
  children: h
66
68
  }
67
69
  ) : null,
68
- d ? /* @__PURE__ */ e(
70
+ d ? /* @__PURE__ */ a(
69
71
  i,
70
72
  {
71
- className: `${a}__reference-number ${a}__token-fix`,
73
+ className: `${e}__reference-number ${e}__token-fix`,
72
74
  variant: l.heading4,
73
75
  element: "p",
74
76
  children: d
75
77
  }
76
78
  ) : null,
77
- _ ? /* @__PURE__ */ e(
79
+ _ ? /* @__PURE__ */ a(
78
80
  i,
79
81
  {
80
- className: `${a}__model ${a}__token-fix`,
82
+ className: `${e}__model ${e}__token-fix`,
81
83
  variant: l.heading4,
82
84
  element: "p",
83
85
  children: _
84
86
  }
85
87
  ) : null
86
88
  ] }),
87
- D ? /* @__PURE__ */ e(L, { hasSeparators: !0, className: `${a}__estimate ${a}__section`, children: /* @__PURE__ */ e(
88
- R,
89
+ E ? /* @__PURE__ */ a(R, { hasSeparators: !0, className: `${e}__estimate ${e}__section`, children: /* @__PURE__ */ a(
90
+ V,
89
91
  {
90
- className: `${a}__estimate__label`,
91
- label: g,
92
+ className: `${e}__estimate__label`,
93
+ label: b,
92
94
  value: n || m,
93
95
  hasWrap: !1
94
96
  }
95
97
  ) }) : null,
96
- /* @__PURE__ */ e("div", { className: `${a}__section`, children: N })
98
+ /* @__PURE__ */ a("div", { className: `${e}__section`, children: N })
97
99
  ] })
98
100
  ] });
99
101
  }
100
102
  )
101
103
  );
102
- W.displayName = "ObjectTile";
104
+ w.displayName = "ObjectTile";
103
105
  export {
104
- W 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;
@@ -1,33 +1,33 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import * as u from "react";
3
3
  import c from "./ViewingsList.js";
4
- const S = ({
4
+ const v = ({
5
5
  defaultViewing: o,
6
- i18n: d,
7
- validate: a = () => {
6
+ i18n: i,
7
+ validate: s = () => {
8
8
  },
9
- onDelete: l = () => {
9
+ onDelete: r = () => {
10
10
  },
11
- onSave: s,
12
- ...r
11
+ onSave: d,
12
+ ...a
13
13
  }) => {
14
- const [f, n] = u.useState(o);
14
+ const [l, n] = u.useState(o);
15
15
  return /* @__PURE__ */ m(
16
16
  c,
17
17
  {
18
- ...r,
19
- i18n: d,
20
- viewings: f,
21
- onDelete: (t) => {
22
- n((e) => e == null ? void 0 : e.filter((i) => i.id !== t)), l(t);
18
+ ...a,
19
+ i18n: i,
20
+ viewings: l,
21
+ onDelete: (e) => {
22
+ n((t) => t?.filter((f) => f.id !== e)), r(e);
23
23
  },
24
- onAdd: (t) => {
25
- n((e) => e ? [...e, { id: t }] : [{ id: t }]);
24
+ onAdd: (e) => {
25
+ n((t) => t ? [...t, { id: e }] : [{ id: e }]);
26
26
  },
27
- onSave: (t) => s(t, n, a)
27
+ onSave: (e) => d(e, n, s)
28
28
  }
29
29
  );
30
30
  };
31
31
  export {
32
- S as default
32
+ v as default
33
33
  };
@@ -1,52 +1,52 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import { createElement as L } from "react";
4
- import S from "../../node_modules/classnames/index.js";
5
- import { getCommonProps as M } from "../../utils/index.js";
6
- import P from "./ViewingsListCard.js";
7
- import R from "../../components/Button/Button.js";
8
- const $ = () => Math.floor(Math.random() * 100) + Date.now(), H = ({
9
- cardTitle: C = "Viewing Details",
10
- className: E,
11
- i18n: f = {},
12
- onAdd: r,
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import * as o from "react";
3
+ import { createElement as b } from "react";
4
+ import g from "../../node_modules/classnames/index.js";
5
+ import { getCommonProps as k } from "../../utils/index.js";
6
+ import x from "./ViewingsListCard.js";
7
+ import B from "../../components/Button/Button.js";
8
+ const S = () => Math.floor(Math.random() * 100) + Date.now(), A = ({
9
+ cardTitle: V = "Viewing Details",
10
+ className: $,
11
+ i18n: r = {},
12
+ onAdd: f,
13
13
  onDelete: e,
14
- onSave: N,
15
- title: O,
16
- viewings: c,
17
- ...i
14
+ onSave: w,
15
+ title: C,
16
+ viewings: d,
17
+ ...c
18
18
  }) => {
19
- const [a, h] = d.useState(c), [m, s] = d.useState(""), [o, u] = d.useState(), { className: p, ...D } = M(i, "ViewingsList");
20
- d.useEffect(() => {
21
- h(c);
22
- }, [c]);
23
- const { addViewingsBtnLabel: y = "ADD VIEWINGS" } = f, b = () => {
24
- const t = `${$()}${a ? "-" + a.length : ""}`;
25
- s(t), u(t), r && r(t);
26
- }, V = (t) => {
27
- s(""), typeof e == "function" && e(t);
28
- }, k = (t) => {
29
- s(t), u(a == null ? void 0 : a.find((n) => n.id === t));
30
- }, x = (t) => {
31
- N(t) && s("");
32
- }, B = () => {
33
- typeof o == "string" ? typeof e == "function" && e(o) : m === (o == null ? void 0 : o.id) && h((t) => t == null ? void 0 : t.map((n) => n.id === o.id ? o : n)), s("");
19
+ const [i, h] = o.useState(d), [l, n] = o.useState(""), [s, u] = o.useState(), { className: p, ...E } = k(c, "ViewingsList");
20
+ o.useEffect(() => {
21
+ h(d);
22
+ }, [d]);
23
+ const { addViewingsBtnLabel: L = "ADD VIEWINGS" } = r, N = () => {
24
+ const t = `${S()}${i ? "-" + i.length : ""}`;
25
+ n(t), u(t), f && f(t);
26
+ }, O = (t) => {
27
+ n(""), typeof e == "function" && e(t);
28
+ }, v = (t) => {
29
+ n(t), u(i?.find((a) => a.id === t));
30
+ }, D = (t) => {
31
+ w(t) && n("");
32
+ }, y = () => {
33
+ typeof s == "string" ? typeof e == "function" && e(s) : l === s?.id && h((t) => t?.map((a) => a.id === s.id ? s : a)), n("");
34
34
  };
35
- return /* @__PURE__ */ L("div", { ...D, className: S(p, E), key: m, ...i }, /* @__PURE__ */ l("h2", { className: S(`${p}__title`), children: O }), a == null ? void 0 : a.map((t, n) => /* @__PURE__ */ l(
36
- P,
35
+ return /* @__PURE__ */ b("div", { ...E, className: g(p, $), key: l, ...c }, /* @__PURE__ */ m("h2", { className: g(`${p}__title`), children: C }), i?.map((t, a) => /* @__PURE__ */ m(
36
+ x,
37
37
  {
38
38
  ...t,
39
- ...f,
40
- cardTitle: t.location ? `${C} ${n + 1}` : void 0,
41
- isEditState: m === t.id,
42
- onCancel: B,
43
- onDelete: V,
44
- onEdit: () => k(t.id),
45
- onSave: x
39
+ ...r,
40
+ cardTitle: t.location ? `${V} ${a + 1}` : void 0,
41
+ isEditState: l === t.id,
42
+ onCancel: y,
43
+ onDelete: O,
44
+ onEdit: () => v(t.id),
45
+ onSave: D
46
46
  },
47
47
  `${t.id}`
48
- )), /* @__PURE__ */ l(R, { id: `viewings-list-add-btn-${i.id || $()}`, onClick: b, children: y }));
48
+ )), /* @__PURE__ */ m(B, { id: `viewings-list-add-btn-${c.id || S()}`, onClick: N, children: L }));
49
49
  };
50
50
  export {
51
- H as default
51
+ A as default
52
52
  };