@phillips/seldon 1.109.2 → 1.110.1
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:
|
|
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:
|
|
24
|
-
...
|
|
25
|
-
},
|
|
26
|
-
const { className:
|
|
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
|
-
...
|
|
41
|
-
className: x(
|
|
42
|
-
[`${
|
|
43
|
-
[`${
|
|
40
|
+
...C,
|
|
41
|
+
className: x(r, p, {
|
|
42
|
+
[`${r}--compact`]: u === i.compact,
|
|
43
|
+
[`${r}--show-bottom-border`]: w
|
|
44
44
|
}),
|
|
45
|
-
...
|
|
46
|
-
ref:
|
|
45
|
+
...c,
|
|
46
|
+
ref: y,
|
|
47
47
|
children: [
|
|
48
|
-
/* @__PURE__ */ d("div", { className: `${
|
|
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:
|
|
51
|
-
o.days > 0 || o.hours > 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "hours", locale: a, formatDurationStr:
|
|
52
|
-
o.days === 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "minutes", locale: a, formatDurationStr:
|
|
53
|
-
o.days === 0 && o.hours === 0 ? /* @__PURE__ */ e(m, { duration: o, unit: "seconds", locale: a, formatDurationStr:
|
|
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
|
-
|
|
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;
|
package/dist/scss/_vars.scss
CHANGED
|
@@ -340,9 +340,9 @@ $snowflake-menu-padding: 1.25rem;
|
|
|
340
340
|
--spacing-micro: 0.5rem;
|
|
341
341
|
--spacing-xsm: 0.75rem;
|
|
342
342
|
--spacing-sm: 1.25rem;
|
|
343
|
-
--spacing-md: 2.
|
|
344
|
-
--spacing-lg: 3.
|
|
345
|
-
--spacing-xl:
|
|
343
|
+
--spacing-md: 2.25rem;
|
|
344
|
+
--spacing-lg: 3.25rem;
|
|
345
|
+
--spacing-xl: 4.25rem;
|
|
346
346
|
--spacing-xxl: 5.25rem;
|
|
347
347
|
--spacing-xxxl: 6.25rem;
|
|
348
348
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.110.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@testing-library/react": "^16.0.0",
|
|
86
86
|
"@testing-library/user-event": "^14.5.2",
|
|
87
87
|
"@types/color": "^3.0.6",
|
|
88
|
-
"@types/node": "^
|
|
88
|
+
"@types/node": "^22.12.0",
|
|
89
89
|
"@types/react": "^18.3.3",
|
|
90
90
|
"@types/react-dom": "^18.0.11",
|
|
91
91
|
"@types/react-modal": "^3.16.3",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"rimraf": "^6.0.1",
|
|
111
111
|
"rollup-plugin-copy": "^3.5.0",
|
|
112
112
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
113
|
-
"sass": "^1.83.
|
|
113
|
+
"sass": "^1.83.4",
|
|
114
114
|
"semantic-release": "^23.1.1",
|
|
115
115
|
"storybook": "^8.5.0",
|
|
116
116
|
"stylelint": "^16.8.1",
|