@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,18 +1,18 @@
1
- function h(e) {
2
- return (a, t) => {
3
- const c = t != null && t.context ? String(t.context) : "standalone";
4
- let l;
5
- if (c === "formatting" && e.formattingValues) {
6
- const d = e.defaultFormattingWidth || e.defaultWidth, u = t != null && t.width ? String(t.width) : d;
7
- l = e.formattingValues[u] || e.formattingValues[d];
1
+ function c(t) {
2
+ return (l, e) => {
3
+ const u = e?.context ? String(e.context) : "standalone";
4
+ let d;
5
+ if (u === "formatting" && t.formattingValues) {
6
+ const n = t.defaultFormattingWidth || t.defaultWidth, i = e?.width ? String(e.width) : n;
7
+ d = t.formattingValues[i] || t.formattingValues[n];
8
8
  } else {
9
- const d = e.defaultWidth, u = t != null && t.width ? String(t.width) : e.defaultWidth;
10
- l = e.values[u] || e.values[d];
9
+ const n = t.defaultWidth, i = e?.width ? String(e.width) : t.defaultWidth;
10
+ d = t.values[i] || t.values[n];
11
11
  }
12
- const f = e.argumentCallback ? e.argumentCallback(a) : a;
13
- return l[f];
12
+ const a = t.argumentCallback ? t.argumentCallback(l) : l;
13
+ return d[a];
14
14
  };
15
15
  }
16
16
  export {
17
- h as buildLocalizeFn
17
+ c as buildLocalizeFn
18
18
  };
@@ -60,10 +60,10 @@ const a = {
60
60
  one: "almost 1 year",
61
61
  other: "almost {{count}} years"
62
62
  }
63
- }, r = (s, n, o) => {
63
+ }, r = (s, n, t) => {
64
64
  let e;
65
- const t = a[s];
66
- return typeof t == "string" ? e = t : n === 1 ? e = t.one : e = t.other.replace("{{count}}", n.toString()), o != null && o.addSuffix ? o.comparison && o.comparison > 0 ? "in " + e : e + " ago" : e;
65
+ const o = a[s];
66
+ return typeof o == "string" ? e = o : n === 1 ? e = o.one : e = o.other.replace("{{count}}", n.toString()), t?.addSuffix ? t.comparison && t.comparison > 0 ? "in " + e : e + " ago" : e;
67
67
  };
68
68
  export {
69
69
  r as formatDistance
@@ -1,4 +1,4 @@
1
- const u = {
1
+ const s = {
2
2
  lessThanXSeconds: {
3
3
  one: "不到 1 秒",
4
4
  other: "不到 {{count}} 秒"
@@ -60,11 +60,11 @@ const u = {
60
60
  one: "将近 1 年",
61
61
  other: "将近 {{count}} 年"
62
62
  }
63
- }, c = (r, n, o) => {
63
+ }, u = (r, n, t) => {
64
64
  let e;
65
- const t = u[r];
66
- return typeof t == "string" ? e = t : n === 1 ? e = t.one : e = t.other.replace("{{count}}", String(n)), o != null && o.addSuffix ? o.comparison && o.comparison > 0 ? e + "内" : e + "前" : e;
65
+ const o = s[r];
66
+ return typeof o == "string" ? e = o : n === 1 ? e = o.one : e = o.other.replace("{{count}}", String(n)), t?.addSuffix ? t.comparison && t.comparison > 0 ? e + "内" : e + "前" : e;
67
67
  };
68
68
  export {
69
- c as formatDistance
69
+ u as formatDistance
70
70
  };
@@ -1,13 +1,13 @@
1
1
  import { buildLocalizeFn as e } from "../../_lib/buildLocalizeFn.js";
2
- const i = {
2
+ const a = {
3
3
  narrow: ["前", "公元"],
4
4
  abbreviated: ["前", "公元"],
5
5
  wide: ["公元前", "公元"]
6
- }, r = {
6
+ }, o = {
7
7
  narrow: ["1", "2", "3", "4"],
8
8
  abbreviated: ["第一季", "第二季", "第三季", "第四季"],
9
9
  wide: ["第一季度", "第二季度", "第三季度", "第四季度"]
10
- }, o = {
10
+ }, r = {
11
11
  narrow: [
12
12
  "一",
13
13
  "二",
@@ -117,9 +117,9 @@ const i = {
117
117
  evening: "晚上",
118
118
  night: "夜间"
119
119
  }
120
- }, g = (t, a) => {
120
+ }, g = (t, i) => {
121
121
  const n = Number(t);
122
- switch (a == null ? void 0 : a.unit) {
122
+ switch (i?.unit) {
123
123
  case "date":
124
124
  return n.toString() + "日";
125
125
  case "hour":
@@ -131,19 +131,19 @@ const i = {
131
131
  default:
132
132
  return "第 " + n.toString();
133
133
  }
134
- }, s = {
134
+ }, l = {
135
135
  ordinalNumber: g,
136
136
  era: e({
137
- values: i,
137
+ values: a,
138
138
  defaultWidth: "wide"
139
139
  }),
140
140
  quarter: e({
141
- values: r,
141
+ values: o,
142
142
  defaultWidth: "wide",
143
143
  argumentCallback: (t) => t - 1
144
144
  }),
145
145
  month: e({
146
- values: o,
146
+ values: r,
147
147
  defaultWidth: "wide"
148
148
  }),
149
149
  day: e({
@@ -158,5 +158,5 @@ const i = {
158
158
  })
159
159
  };
160
160
  export {
161
- s as localize
161
+ l as localize
162
162
  };
@@ -1,9 +1,9 @@
1
- import { toDate as e } from "./toDate.js";
2
- function u(a, t) {
3
- const r = e(a, t == null ? void 0 : t.in);
4
- return r.setHours(0, 0, 0, 0), r;
1
+ import { toDate as a } from "./toDate.js";
2
+ function n(o, r) {
3
+ const t = a(o, r?.in);
4
+ return t.setHours(0, 0, 0, 0), t;
5
5
  }
6
6
  export {
7
- u as default,
8
- u as startOfDay
7
+ n as default,
8
+ n as startOfDay
9
9
  };
@@ -1,11 +1,10 @@
1
- import { getDefaultOptions as m } from "./_lib/defaultOptions.js";
2
- import { toDate as n } from "./toDate.js";
3
- function x(D, e) {
4
- var c, O, l, k, u, d, s, w;
5
- const a = m(), r = (w = (s = (k = (l = e == null ? void 0 : e.weekStartsOn) != null ? l : (O = (c = e == null ? void 0 : e.locale) == null ? void 0 : c.options) == null ? void 0 : O.weekStartsOn) != null ? k : a.weekStartsOn) != null ? s : (d = (u = a.locale) == null ? void 0 : u.options) == null ? void 0 : d.weekStartsOn) != null ? w : 0, t = n(D, e == null ? void 0 : e.in), f = t.getDay(), S = (f < r ? 7 : 0) + f - r;
6
- return t.setDate(t.getDate() - S), t.setHours(0, 0, 0, 0), t;
1
+ import { getDefaultOptions as f } from "./_lib/defaultOptions.js";
2
+ import { toDate as c } from "./toDate.js";
3
+ function l(n, e) {
4
+ const a = f(), o = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0, t = c(n, e?.in), s = t.getDay(), r = (s < o ? 7 : 0) + s - o;
5
+ return t.setDate(t.getDate() - r), t.setHours(0, 0, 0, 0), t;
7
6
  }
8
7
  export {
9
- x as default,
10
- x as startOfWeek
8
+ l as default,
9
+ l as startOfWeek
11
10
  };
@@ -52,7 +52,7 @@ function zt(t, n) {
52
52
  }), s), {});
53
53
  }
54
54
  function Et(t, n) {
55
- return typeof n.MouseEvent != "undefined" && t instanceof n.MouseEvent;
55
+ return typeof n.MouseEvent < "u" && t instanceof n.MouseEvent;
56
56
  }
57
57
  function Zt(t, n) {
58
58
  const s = {
@@ -5,7 +5,7 @@ function a(n) {
5
5
  return y(n) || Array.isArray(n);
6
6
  }
7
7
  function p() {
8
- return !!(typeof window != "undefined" && window.document && window.document.createElement);
8
+ return !!(typeof window < "u" && window.document && window.document.createElement);
9
9
  }
10
10
  function l(n, t) {
11
11
  const e = Object.keys(n), c = Object.keys(t);
@@ -6,9 +6,9 @@ import { __module as t } from "../../_virtual/index5.js";
6
6
  */
7
7
  (function(n) {
8
8
  (function() {
9
- var e = !!(typeof window != "undefined" && window.document && window.document.createElement), o = {
9
+ var e = !!(typeof window < "u" && window.document && window.document.createElement), o = {
10
10
  canUseDOM: e,
11
- canUseWorkers: typeof Worker != "undefined",
11
+ canUseWorkers: typeof Worker < "u",
12
12
  canUseEventListeners: e && !!(window.addEventListener || window.attachEvent),
13
13
  canUseViewport: e && !!window.screen
14
14
  };
@@ -1,5 +1,5 @@
1
1
  var e = function() {
2
- if (typeof __webpack_nonce__ != "undefined")
2
+ if (typeof __webpack_nonce__ < "u")
3
3
  return __webpack_nonce__;
4
4
  };
5
5
  export {
@@ -10,7 +10,7 @@ function P() {
10
10
  var y = E(), t = {}, d = _();
11
11
  o = function(n) {
12
12
  var a = "Warning: " + n;
13
- typeof console != "undefined" && console.error(a);
13
+ typeof console < "u" && console.error(a);
14
14
  try {
15
15
  throw new Error(a);
16
16
  } catch {
@@ -39,7 +39,7 @@ function P() {
39
39
  t[r.message] = !0;
40
40
  var p = c ? c() : "";
41
41
  o(
42
- "Failed " + i + " type: " + r.message + (p != null ? p : "")
42
+ "Failed " + i + " type: " + r.message + (p ?? "")
43
43
  );
44
44
  }
45
45
  }
@@ -11,7 +11,7 @@ function oe() {
11
11
  };
12
12
  process.env.NODE_ENV !== "production" && (T = function(x) {
13
13
  var S = "Warning: " + x;
14
- typeof console != "undefined" && console.error(S);
14
+ typeof console < "u" && console.error(S);
15
15
  try {
16
16
  throw new Error(S);
17
17
  } catch {
@@ -65,7 +65,7 @@ function oe() {
65
65
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
66
66
  );
67
67
  throw l.name = "Invariant Violation", l;
68
- } else if (process.env.NODE_ENV !== "production" && typeof console != "undefined") {
68
+ } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
69
69
  var b = o + ":" + a;
70
70
  !r[b] && // Avoid spamming the console because they are often not actionable except for lib authors
71
71
  u < 3 && (T(
@@ -293,7 +293,7 @@ Valid keys: ` + JSON.stringify(Object.keys(e), null, " ")
293
293
  return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : Z(r, e) ? "symbol" : r;
294
294
  }
295
295
  function O(e) {
296
- if (typeof e == "undefined" || e === null)
296
+ if (typeof e > "u" || e === null)
297
297
  return "" + e;
298
298
  var r = g(e);
299
299
  if (r === "object") {
@@ -18,7 +18,7 @@ function _(e) {
18
18
  s.forEach((r) => {
19
19
  var o;
20
20
  const g = r.isIntersecting && c.some((d) => r.intersectionRatio >= d);
21
- e.trackVisibility && typeof r.isVisible == "undefined" && (r.isVisible = g), (o = u.get(r.target)) == null || o.forEach((d) => {
21
+ e.trackVisibility && typeof r.isVisible > "u" && (r.isVisible = g), (o = u.get(r.target)) == null || o.forEach((d) => {
22
22
  d(g, r);
23
23
  });
24
24
  });
@@ -32,7 +32,7 @@ function _(e) {
32
32
  return n;
33
33
  }
34
34
  function x(e, t, n = {}, u = M) {
35
- if (typeof window.IntersectionObserver == "undefined" && u !== void 0) {
35
+ if (typeof window.IntersectionObserver > "u" && u !== void 0) {
36
36
  const o = e.getBoundingClientRect();
37
37
  return t(u, {
38
38
  isIntersecting: u,
@@ -5,7 +5,7 @@ function l() {
5
5
  function p(t) {
6
6
  function e(o) {
7
7
  var n = this.constructor.getDerivedStateFromProps(t, o);
8
- return n != null ? n : null;
8
+ return n ?? null;
9
9
  }
10
10
  this.setState(e.bind(this));
11
11
  }
@@ -130,7 +130,7 @@ import { __exports as Y } from "../../../../_virtual/portalOpenInstances.js";
130
130
  }, e.contentHasFocus = function() {
131
131
  return document.activeElement === e.content || e.content.contains(document.activeElement);
132
132
  }, e.buildClassName = function(t, l) {
133
- var i = (typeof l == "undefined" ? "undefined" : A(l)) === "object" ? l : {
133
+ var i = (typeof l > "u" ? "undefined" : A(l)) === "object" ? l : {
134
134
  base: b[t],
135
135
  afterOpen: b[t] + "--after-open",
136
136
  beforeClose: b[t] + "--before-close"
@@ -30,7 +30,7 @@ import { t as _ } from "./tabbable.js";
30
30
  var b = /(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent), h = b != null && b[1] != "Chrome" && /\biPod\b|\biPad\b/g.exec(navigator.userAgent) == null;
31
31
  if (h) {
32
32
  var l = a.indexOf(i);
33
- if (l > -1 && (l += n ? -1 : 1), t = a[l], typeof t == "undefined") {
33
+ if (l > -1 && (l += n ? -1 : 1), t = a[l], typeof t > "u") {
34
34
  r.preventDefault(), t = n ? u : o, t.focus();
35
35
  return;
36
36
  }
@@ -1,5 +1,5 @@
1
1
  var r = !1;
2
- if (typeof window != "undefined")
2
+ if (typeof window < "u")
3
3
  try {
4
4
  var e = Object.defineProperty({}, "passive", {
5
5
  get: function() {
@@ -16,7 +16,7 @@ var p = function(e) {
16
16
  }, R = function(e, r) {
17
17
  var o = r.ownerDocument, t = r;
18
18
  do {
19
- typeof ShadowRoot != "undefined" && t instanceof ShadowRoot && (t = t.host);
19
+ typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
20
20
  var a = g(e, t);
21
21
  if (a) {
22
22
  var n = b(e, t), i = n[1], l = n[2];
@@ -9,7 +9,7 @@ var a = {
9
9
  var n = window.getComputedStyle(document.body), i = n[t === "padding" ? "paddingLeft" : "marginLeft"], r = n[t === "padding" ? "paddingTop" : "marginTop"], d = n[t === "padding" ? "paddingRight" : "marginRight"];
10
10
  return [e(i), e(r), e(d)];
11
11
  }, f = function(t) {
12
- if (t === void 0 && (t = "margin"), typeof window == "undefined")
12
+ if (t === void 0 && (t = "margin"), typeof window > "u")
13
13
  return a;
14
14
  var n = o(t), i = document.documentElement.clientWidth, r = window.innerWidth;
15
15
  return {
@@ -149,7 +149,7 @@ p.propTypes = process.env.NODE_ENV !== "production" ? {
149
149
  * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
150
150
  */
151
151
  nodeRef: o.shape({
152
- current: typeof Element == "undefined" ? o.any : function(d, u, a, i, e, t) {
152
+ current: typeof Element > "u" ? o.any : function(d, u, a, i, e, t) {
153
153
  var n = d[u];
154
154
  return o.instanceOf(n && "ownerDocument" in n ? n.ownerDocument.defaultView.Element : Element)(d, u, a, i, e, t);
155
155
  }
@@ -123,8 +123,8 @@ function H(i, n, e, r, a) {
123
123
  }
124
124
  var hi = function(i, n) {
125
125
  var e = i.setup.panning.excluded, r = i.isInitialized, a = i.wrapperComponent, o = n.target, t = "shadowRoot" in o && "composedPath" in n, l = t ? n.composedPath().some(function(u) {
126
- return u instanceof Element ? a == null ? void 0 : a.contains(u) : !1;
127
- }) : a == null ? void 0 : a.contains(o), s = r && o && l;
126
+ return u instanceof Element ? a?.contains(u) : !1;
127
+ }) : a?.contains(o), s = r && o && l;
128
128
  if (!s)
129
129
  return !1;
130
130
  var d = q(o, e);
@@ -244,7 +244,7 @@ function Ce(i) {
244
244
  if (i.isPanning) {
245
245
  var n = i.setup.panning.velocityDisabled, e = i.velocity, r = i.wrapperComponent, a = i.contentComponent;
246
246
  i.isPanning = !1, i.animate = !1, i.animation = null;
247
- var o = r == null ? void 0 : r.getBoundingClientRect(), t = a == null ? void 0 : a.getBoundingClientRect(), l = (o == null ? void 0 : o.width) || 0, s = (o == null ? void 0 : o.height) || 0, d = (t == null ? void 0 : t.width) || 0, u = (t == null ? void 0 : t.height) || 0, v = l < d || s < u, f = !n && e && (e == null ? void 0 : e.total) > 0.1 && v;
247
+ var o = r?.getBoundingClientRect(), t = a?.getBoundingClientRect(), l = o?.width || 0, s = o?.height || 0, d = t?.width || 0, u = t?.height || 0, v = l < d || s < u, f = !n && e && e?.total > 0.1 && v;
248
248
  f ? be(i) : zi(i);
249
249
  }
250
250
  }
@@ -360,7 +360,7 @@ var Q = {
360
360
  }, bi = function(i) {
361
361
  var n = _({}, M);
362
362
  return Object.keys(i).forEach(function(e) {
363
- var r = typeof i[e] != "undefined", a = typeof M[e] != "undefined";
363
+ var r = typeof i[e] < "u", a = typeof M[e] < "u";
364
364
  if (a && r) {
365
365
  var o = Object.prototype.toString.call(M[e]), t = o === "[object Object]", l = o === "[object Array]";
366
366
  t ? n[e] = _(_({}, M[e]), i[e]) : l ? n[e] = Pi(Pi([], M[e], !0), i[e]) : n[e] = i[e];
@@ -390,7 +390,7 @@ function Oi(i, n, e, r) {
390
390
  positionX: p.x,
391
391
  positionY: p.y
392
392
  };
393
- d === l.scale && u === l.positionX && v === l.positionY || (r == null || r(), D(i, m, n, e));
393
+ d === l.scale && u === l.positionX && v === l.positionY || (r?.(), D(i, m, n, e));
394
394
  }
395
395
  }
396
396
  function ye(i, n, e, r) {
@@ -613,7 +613,7 @@ var Ze = function(i, n, e, r, a) {
613
613
  }
614
614
  }, Je = function(i) {
615
615
  var n = i.pinchMidpoint;
616
- i.velocity = null, i.lastDistance = null, i.pinchMidpoint = null, i.pinchStartScale = null, i.pinchStartDistance = null, Ei(i, n == null ? void 0 : n.x, n == null ? void 0 : n.y);
616
+ i.velocity = null, i.lastDistance = null, i.pinchMidpoint = null, i.pinchStartScale = null, i.pinchStartDistance = null, Ei(i, n?.x, n?.y);
617
617
  }, Mi = function(i, n) {
618
618
  var e = i.props.onZoomStop, r = i.setup.doubleClick.animationTime;
619
619
  oi(i.doubleClickStopEventTimer), i.doubleClickStopEventTimer = setTimeout(function() {
@@ -646,7 +646,7 @@ function Ie(i, n) {
646
646
  }
647
647
  }
648
648
  var ir = function(i, n) {
649
- var e = i.isInitialized, r = i.setup, a = i.wrapperComponent, o = r.doubleClick, t = o.disabled, l = o.excluded, s = n.target, d = a == null ? void 0 : a.contains(s), u = e && s && d && !t;
649
+ var e = i.isInitialized, r = i.setup, a = i.wrapperComponent, o = r.doubleClick, t = o.disabled, l = o.excluded, s = n.target, d = a?.contains(s), u = e && s && d && !t;
650
650
  if (!u)
651
651
  return !1;
652
652
  var v = q(s, l);
@@ -663,11 +663,11 @@ var ir = function(i, n) {
663
663
  }, this.update = function(r) {
664
664
  e.props = r, Z(e, e.transformState.scale), e.setup = bi(r);
665
665
  }, this.initializeWindowEvents = function() {
666
- var r, a, o = ei(), t = (r = e.wrapperComponent) === null || r === void 0 ? void 0 : r.ownerDocument, l = t == null ? void 0 : t.defaultView;
667
- (a = e.wrapperComponent) === null || a === void 0 || a.addEventListener("wheel", e.onWheelPanning, o), l == null || l.addEventListener("mousedown", e.onPanningStart, o), l == null || l.addEventListener("mousemove", e.onPanning, o), l == null || l.addEventListener("mouseup", e.onPanningStop, o), t == null || t.addEventListener("mouseleave", e.clearPanning, o), l == null || l.addEventListener("keyup", e.setKeyUnPressed, o), l == null || l.addEventListener("keydown", e.setKeyPressed, o);
666
+ var r, a, o = ei(), t = (r = e.wrapperComponent) === null || r === void 0 ? void 0 : r.ownerDocument, l = t?.defaultView;
667
+ (a = e.wrapperComponent) === null || a === void 0 || a.addEventListener("wheel", e.onWheelPanning, o), l?.addEventListener("mousedown", e.onPanningStart, o), l?.addEventListener("mousemove", e.onPanning, o), l?.addEventListener("mouseup", e.onPanningStop, o), t?.addEventListener("mouseleave", e.clearPanning, o), l?.addEventListener("keyup", e.setKeyUnPressed, o), l?.addEventListener("keydown", e.setKeyPressed, o);
668
668
  }, this.cleanupWindowEvents = function() {
669
- var r, a, o = ei(), t = (r = e.wrapperComponent) === null || r === void 0 ? void 0 : r.ownerDocument, l = t == null ? void 0 : t.defaultView;
670
- l == null || l.removeEventListener("mousedown", e.onPanningStart, o), l == null || l.removeEventListener("mousemove", e.onPanning, o), l == null || l.removeEventListener("mouseup", e.onPanningStop, o), t == null || t.removeEventListener("mouseleave", e.clearPanning, o), l == null || l.removeEventListener("keyup", e.setKeyUnPressed, o), l == null || l.removeEventListener("keydown", e.setKeyPressed, o), document.removeEventListener("mouseleave", e.clearPanning, o), Y(e), (a = e.observer) === null || a === void 0 || a.disconnect();
669
+ var r, a, o = ei(), t = (r = e.wrapperComponent) === null || r === void 0 ? void 0 : r.ownerDocument, l = t?.defaultView;
670
+ l?.removeEventListener("mousedown", e.onPanningStart, o), l?.removeEventListener("mousemove", e.onPanning, o), l?.removeEventListener("mouseup", e.onPanningStop, o), t?.removeEventListener("mouseleave", e.clearPanning, o), l?.removeEventListener("keyup", e.setKeyUnPressed, o), l?.removeEventListener("keydown", e.setKeyPressed, o), document.removeEventListener("mouseleave", e.clearPanning, o), Y(e), (a = e.observer) === null || a === void 0 || a.disconnect();
671
671
  }, this.handleInitializeWrapperEvents = function(r) {
672
672
  var a = ei();
673
673
  r.addEventListener("wheel", e.onWheelZoom, a), r.addEventListener("dblclick", e.onDoubleClick, a), r.addEventListener("touchstart", e.onTouchPanningStart, a), r.addEventListener("touchmove", e.onTouchPanning, a), r.addEventListener("touchend", e.onTouchPanningStop, a);
@@ -843,7 +843,7 @@ k.forwardRef(function(i, n) {
843
843
  function nr(i, n) {
844
844
  n === void 0 && (n = {});
845
845
  var e = n.insertAt;
846
- if (typeof document != "undefined") {
846
+ if (!(typeof document > "u")) {
847
847
  var r = document.head || document.getElementsByTagName("head")[0], a = document.createElement("style");
848
848
  a.type = "text/css", e === "top" && r.firstChild ? r.insertBefore(a, r.firstChild) : r.appendChild(a), a.styleSheet ? a.styleSheet.cssText = i : a.appendChild(document.createTextNode(i));
849
849
  }
@@ -884,8 +884,8 @@ var lr = function(i) {
884
884
  var n = i.children, e = i.wrapperClass, r = e === void 0 ? "" : e, a = i.contentClass, o = a === void 0 ? "" : a, t = i.wrapperStyle, l = i.contentStyle, s = i.wrapperProps, d = s === void 0 ? {} : s, u = i.contentProps, v = u === void 0 ? {} : u, f = yi(ui), p = f.init, m = f.cleanupWindowEvents, h = R(null), c = R(null);
885
885
  return ti(function() {
886
886
  var P = h.current, b = c.current;
887
- return P !== null && b !== null && p && (p == null || p(P, b)), function() {
888
- m == null || m();
887
+ return P !== null && b !== null && p && p?.(P, b), function() {
888
+ m?.();
889
889
  };
890
890
  }, []), k.createElement(
891
891
  "div",
@@ -1,7 +1,7 @@
1
1
  import * as f from "react";
2
2
  import { assignRef as o } from "./assignRef.js";
3
3
  import { useCallbackRef as l } from "./useRef.js";
4
- var s = typeof window != "undefined" ? f.useLayoutEffect : f.useEffect, c = /* @__PURE__ */ new WeakMap();
4
+ var s = typeof window < "u" ? f.useLayoutEffect : f.useEffect, c = /* @__PURE__ */ new WeakMap();
5
5
  function v(e, m) {
6
6
  var t = l(null, function(n) {
7
7
  return e.forEach(function(u) {
@@ -1,6 +1,6 @@
1
1
  import { useRef as d, useEffect as c, useLayoutEffect as f } from "react";
2
2
  import "../../lodash.debounce/index.js";
3
- var a = typeof window != "undefined" ? f : c;
3
+ var a = typeof window < "u" ? f : c;
4
4
  function E(t, r, u, i) {
5
5
  const s = d(r);
6
6
  a(() => {
@@ -9,7 +9,7 @@ if (c) {
9
9
  var u = 0, t = "Warning: " + e.replace(/%s/g, function() {
10
10
  return r[u++];
11
11
  });
12
- typeof console != "undefined" && console.error(t);
12
+ typeof console < "u" && console.error(t);
13
13
  try {
14
14
  throw new Error(t);
15
15
  } catch {
@@ -80,7 +80,7 @@ function ee(t) {
80
80
  disconnect: l
81
81
  });
82
82
  }
83
- var te = 16 * 1.125, ne = typeof window != "undefined" && window.innerHeight || 800, T = [1, te, ne];
83
+ var te = 16 * 1.125, ne = typeof window < "u" && window.innerHeight || 800, T = [1, te, ne];
84
84
  function re(t) {
85
85
  var r = t.deltaX * T[t.deltaMode], a = t.deltaY * T[t.deltaMode], o = (t.deltaZ || 0) * T[t.deltaMode];
86
86
  return {
@@ -1,81 +1,81 @@
1
- import { jsxs as v, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as q } from "react";
3
- import z from "../../node_modules/classnames/index.js";
4
- import { getCommonProps as D, findChildrenOfType as F, findChildrenExcludingTypes as G } from "../../utils/index.js";
5
- import H from "../DetailList/DetailList.js";
6
- import c from "../../components/Detail/Detail.js";
7
- import { LotStatus as m, SupportedLanguages as J } from "../../types/commonTypes.js";
8
- import K from "../../components/Countdown/Countdown.js";
9
- import { CountdownVariants as Q } from "../../components/Countdown/types.js";
10
- import { BidStatusEnum as U } from "./types.js";
11
- import L from "./BidMessage.js";
12
- import { isAfter as w } from "../../node_modules/date-fns/isAfter.js";
13
- import { differenceInMinutes as X } from "../../node_modules/date-fns/differenceInMinutes.js";
14
- const Y = (o) => o === 1 ? `${o} bid` : `${o} bids`, Z = q(
1
+ import { jsxs as g, jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as V } from "react";
3
+ import k from "../../node_modules/classnames/index.js";
4
+ import { getCommonProps as q, findChildrenOfType as z, findChildrenExcludingTypes as D } from "../../utils/index.js";
5
+ import F from "../DetailList/DetailList.js";
6
+ import d from "../../components/Detail/Detail.js";
7
+ import { LotStatus as t, SupportedLanguages as G } from "../../types/commonTypes.js";
8
+ import H from "../../components/Countdown/Countdown.js";
9
+ import { CountdownVariants as J } from "../../components/Countdown/types.js";
10
+ import { BidStatusEnum as K } from "./types.js";
11
+ import S from "./BidMessage.js";
12
+ import { isAfter as v } from "../../node_modules/date-fns/isAfter.js";
13
+ import { differenceInMinutes as Q } from "../../node_modules/date-fns/differenceInMinutes.js";
14
+ const U = (o) => o === 1 ? `${o} bid` : `${o} bids`, X = V(
15
15
  ({
16
- lotStatus: o = m.ready,
17
- bidStatus: h,
18
- bidsLabelText: g = Y,
19
- children: $,
20
- className: C,
21
- closingText: x = "Closes in",
16
+ lotStatus: o = t.ready,
17
+ bidStatus: p,
18
+ bidsLabelText: L = U,
19
+ children: c,
20
+ className: w,
21
+ closingText: C = "Closes in",
22
22
  currency: r = "$",
23
- currentBid: s,
24
- currentBidText: N = "Current bid",
25
- formatDurationStr: T = (a) => a.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
26
- lang: W = "en",
23
+ currentBid: f,
24
+ currentBidText: x = "Current bid",
25
+ formatDurationStr: N = (s) => s.replace(/seconds?/, "sec").replace(/minutes?/, "min"),
26
+ lang: T = "en",
27
27
  saleCloseDate: i,
28
- lotCloseDate: p,
29
- numberOfBids: u = 0,
30
- startingBid: f,
28
+ lotCloseDate: l,
29
+ numberOfBids: h = 0,
30
+ startingBid: W,
31
31
  startingBidText: y = "Starting bid",
32
- soldPrice: e,
33
- soldForText: M = "Sold for",
34
- wonForText: j = "Won for",
35
- ...b
36
- }, E) => {
37
- const { className: a, ...R } = D(b, "BidSnapshot"), n = s !== null && u > 0, S = o === m.ready, t = o === m.live, _ = o === m.past, d = /* @__PURE__ */ new Date(), A = t && p && w(p, d) && i && (X(i, d) < 60 || w(d, i)), I = F($, L), V = G($, [L]), k = z(a, C, {
38
- [`${a}--live`]: t,
39
- [`${a}--has-bids`]: n
32
+ soldPrice: u,
33
+ soldForText: B = "Sold for",
34
+ wonForText: M = "Won for",
35
+ ...$
36
+ }, j) => {
37
+ const { className: s, ...E } = q($, "BidSnapshot"), a = f !== null && h > 0, b = o === t.ready, e = o === t.live, P = o === t.past, m = /* @__PURE__ */ new Date(), R = e && l && v(l, m) && i && (Q(i, m) < 60 || v(m, i)), _ = z(c, S), A = D(c, [S]), I = k(s, w, {
38
+ [`${s}--live`]: e,
39
+ [`${s}--has-bids`]: a
40
40
  });
41
- return /* @__PURE__ */ v("div", { ...R, ...b, ref: E, className: k, children: [
42
- /* @__PURE__ */ v(H, { hasSeparators: !0, className: `${a}__text`, children: [
43
- _ && n ? /* @__PURE__ */ l(
44
- c,
41
+ return /* @__PURE__ */ g("div", { ...E, ...$, ref: j, className: I, children: [
42
+ /* @__PURE__ */ g(F, { hasSeparators: !0, className: `${s}__text`, children: [
43
+ P && a ? /* @__PURE__ */ n(
44
+ d,
45
45
  {
46
- label: h === U.Won ? j : M,
47
- value: e ? `${r}${e == null ? void 0 : e.toLocaleString()}` : "",
46
+ label: p === K.Won ? M : B,
47
+ value: u ? `${r}${u?.toLocaleString()}` : "",
48
48
  hasWrap: !1
49
49
  }
50
50
  ) : null,
51
- t && n ? /* @__PURE__ */ l(
52
- c,
51
+ e && a ? /* @__PURE__ */ n(
52
+ d,
53
53
  {
54
- label: N,
55
- subLabel: `(${g(u)})`,
56
- value: `${r}${s == null ? void 0 : s.toLocaleString()}`,
54
+ label: x,
55
+ subLabel: `(${L(h)})`,
56
+ value: `${r}${f?.toLocaleString()}`,
57
57
  hasWrap: !1
58
58
  }
59
59
  ) : null,
60
- S || t && !n ? /* @__PURE__ */ l(c, { label: y, value: `${r}${f == null ? void 0 : f.toLocaleString()}`, hasWrap: !1 }) : null
60
+ b || e && !a ? /* @__PURE__ */ n(d, { label: y, value: `${r}${W?.toLocaleString()}`, hasWrap: !1 }) : null
61
61
  ] }),
62
- h && !S ? I : null,
63
- V,
64
- A ? /* @__PURE__ */ l(
65
- K,
62
+ p && !b ? _ : null,
63
+ A,
64
+ R ? /* @__PURE__ */ n(
65
+ H,
66
66
  {
67
- endDateTime: p,
68
- label: x,
69
- variant: Q.compact,
70
- locale: J[W],
71
- formatDurationStr: T,
67
+ endDateTime: l,
68
+ label: C,
69
+ variant: J.compact,
70
+ locale: G[T],
71
+ formatDurationStr: N,
72
72
  showBottomBorder: !1
73
73
  }
74
74
  ) : null
75
75
  ] });
76
76
  }
77
77
  );
78
- Z.displayName = "BidSnapshot";
78
+ X.displayName = "BidSnapshot";
79
79
  export {
80
- Z as default
80
+ X as default
81
81
  };