@phillips/seldon 1.110.0 → 1.110.2

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.
@@ -14,16 +14,16 @@ import { differenceInSeconds as F } from "../../node_modules/date-fns/difference
14
14
  const H = L(
15
15
  ({
16
16
  endDateTime: n,
17
- formatDurationStr: r,
17
+ formatDurationStr: s,
18
18
  label: l = "Lots Close in",
19
19
  intervalDescription: f,
20
20
  className: p,
21
21
  locale: h = "en",
22
22
  showBottomBorder: w = !0,
23
- variant: c = i.default,
24
- ...u
25
- }, C) => {
26
- const { className: s, ...y } = v(u, "Countdown"), [t, I] = b(/* @__PURE__ */ new Date()), a = h === $.zh ? j : z, o = {
23
+ variant: u = i.default,
24
+ ...c
25
+ }, y) => {
26
+ const { className: r, ...C } = v(c, "Countdown"), [t, I] = b(/* @__PURE__ */ new Date()), a = h === $.zh ? j : z, o = {
27
27
  days: P(n, t),
28
28
  hours: _(n, t) % 24,
29
29
  minutes: E(n, t) % 60,
@@ -34,28 +34,28 @@ const H = L(
34
34
  I(/* @__PURE__ */ new Date());
35
35
  }, 1e3);
36
36
  return () => clearInterval(N);
37
- }, [n]), /* @__PURE__ */ d(
37
+ }, [n]), o.days > 0 || o.hours > 0 || o.minutes > 0 || o.seconds > 0 ? /* @__PURE__ */ d(
38
38
  "div",
39
39
  {
40
- ...y,
41
- className: x(s, p, {
42
- [`${s}--compact`]: c === i.compact,
43
- [`${s}--show-bottom-border`]: w
40
+ ...C,
41
+ className: x(r, p, {
42
+ [`${r}--compact`]: u === i.compact,
43
+ [`${r}--show-bottom-border`]: w
44
44
  }),
45
- ...u,
46
- ref: C,
45
+ ...c,
46
+ ref: y,
47
47
  children: [
48
- /* @__PURE__ */ d("div", { className: `${s}__countdown-container`, role: "timer", "aria-label": l, children: [
48
+ /* @__PURE__ */ d("div", { className: `${r}__countdown-container`, role: "timer", "aria-label": l, children: [
49
49
  /* @__PURE__ */ e("span", { children: l }),
50
- o.days > 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "days", locale: a, formatDurationStr: r }) : null,
51
- o.days > 0 || o.hours > 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "hours", locale: a, formatDurationStr: r }) : null,
52
- o.days === 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "minutes", locale: a, formatDurationStr: r }) : null,
53
- o.days === 0 && o.hours === 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "seconds", locale: a, formatDurationStr: r }) : null
50
+ o.days > 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "days", locale: a, formatDurationStr: s }) : null,
51
+ o.days > 0 || o.hours > 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "hours", locale: a, formatDurationStr: s }) : null,
52
+ o.days === 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "minutes", locale: a, formatDurationStr: s }) : null,
53
+ o.days === 0 && o.hours === 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "seconds", locale: a, formatDurationStr: s }) : null
54
54
  ] }),
55
- c === i.default ? /* @__PURE__ */ e("span", { children: f }) : null
55
+ u === i.default ? /* @__PURE__ */ e("span", { children: f }) : null
56
56
  ]
57
57
  }
58
- );
58
+ ) : null;
59
59
  }
60
60
  );
61
61
  H.displayName = "Countdown";
@@ -16,4 +16,5 @@ export declare const Playground: {
16
16
  export declare const Days: (props: CountdownProps) => import("react/jsx-runtime").JSX.Element;
17
17
  export declare const Hours: (props: CountdownProps) => import("react/jsx-runtime").JSX.Element;
18
18
  export declare const Minutes: (props: CountdownProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const Seconds: (props: CountdownProps) => import("react/jsx-runtime").JSX.Element;
19
20
  export declare const Compact: (props: CountdownProps) => import("react/jsx-runtime").JSX.Element;
@@ -10,7 +10,7 @@
10
10
  gap: $spacing-micro;
11
11
  justify-content: center;
12
12
  margin-bottom: 0;
13
- padding: 0 $spacing-sm $spacing-sm;
13
+ padding-bottom: $spacing-sm;
14
14
  width: 100%;
15
15
 
16
16
  &--show-bottom-border {
@@ -23,6 +23,7 @@
23
23
 
24
24
  align-items: center;
25
25
  display: flex;
26
+ flex-shrink: 0;
26
27
  gap: $spacing-sm;
27
28
  justify-content: center;
28
29
  text-transform: inherit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.110.0",
3
+ "version": "1.110.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"