@phillips/seldon 1.254.1 → 1.256.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.
- package/dist/_virtual/index6.cjs +1 -1
- package/dist/_virtual/index6.js +5 -3
- package/dist/_virtual/index7.cjs +1 -1
- package/dist/_virtual/index7.js +3 -5
- package/dist/components/AddToCalendar/calendarLinks.cjs +1 -1
- package/dist/components/AddToCalendar/calendarLinks.js +1 -1
- package/dist/components/Countdown/Countdown.cjs +1 -1
- package/dist/components/Countdown/Countdown.d.ts +4 -0
- package/dist/components/Countdown/Countdown.js +101 -93
- package/dist/components/Countdown/Countdown.stories.d.ts +3 -0
- package/dist/node_modules/react-transition-group/esm/CSSTransition.cjs +1 -1
- package/dist/node_modules/react-transition-group/esm/CSSTransition.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.cjs +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.cjs +1 -1
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +1 -1
- package/dist/scss/components/Countdown/_countdown.scss +45 -14
- package/package.json +1 -1
package/dist/_virtual/index6.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./_commonjsHelpers.cjs"),r=require("../node_modules/prop-types/index.cjs");var o=r.__require();const t=e.getDefaultExportFromCjs(o);exports.default=t;
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as o } from "../node_modules/prop-types/index.js";
|
|
3
|
+
var p = /* @__PURE__ */ o();
|
|
4
|
+
const s = /* @__PURE__ */ r(p);
|
|
3
5
|
export {
|
|
4
|
-
|
|
6
|
+
s as default
|
|
5
7
|
};
|
package/dist/_virtual/index7.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../node_modules/ics/dist/index.cjs");var r=e.__require();exports.distExports=r;
|
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var p = /* @__PURE__ */ o();
|
|
4
|
-
const s = /* @__PURE__ */ r(p);
|
|
1
|
+
import { __require as r } from "../node_modules/ics/dist/index.js";
|
|
2
|
+
var i = r();
|
|
5
3
|
export {
|
|
6
|
-
|
|
4
|
+
i as d
|
|
7
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../_virtual/index7.cjs"),H=require("../../node_modules/date-fns/isValid.cjs"),m=require("../../node_modules/date-fns-tz/dist/esm/toZonedTime/index.cjs"),c=require("../../node_modules/date-fns/addHours.cjs"),a=require("../../node_modules/date-fns/format.cjs"),d={google:"https://calendar.google.com/calendar/u/0/r/eventedit",outlook:"https://outlook.office.com/calendar/0/deeplink/compose",yahoo:"https://calendar.yahoo.com/"},M=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return console.warn("Unable to determine user's timezone. Using UTC as a fallback."),"UTC"}},y=o=>new URLSearchParams(o),l=(o,t)=>{if(!t.start||!H.isValid(t.start))return console.error("Invalid event start date:",t),"#";const e=M(),n=m.toZonedTime(t.start,o==="google"?t.timezone:e),r=t.end?m.toZonedTime(t.end,o==="google"?t.timezone:e):null;switch(o){case"google":return h(n,r,t);case"outlook":return k(n,r,t);case"yahoo":return f(n,r,t);default:return console.error("Invalid calendar type:",o),"#"}},h=(o,t,e)=>{const n=y({text:e.title,dates:t?`${a.format(o,"yyyyMMdd'T'HHmmss")}/${a.format(t,"yyyyMMdd'T'HHmmss")}`:`${a.format(o,"yyyyMMdd'T'HHmmss")}/${a.format(c.addHours(o,1),"yyyyMMdd'T'HHmmss")}`,ctz:e.timezone,details:e.description,location:e.location}),r=new URL(d.google);return r.search=n.toString(),r.toString()},k=(o,t,e)=>{const n=y({path:"/calendar/action/compose",rru:"addevent",subject:e.title,startdt:a.format(o,"yyyy-MM-dd'T'HH:mm:ssXXX"),enddt:t?a.format(t,"yyyy-MM-dd'T'HH:mm:ssXXX"):a.format(c.addHours(o,1),"yyyy-MM-dd'T'HH:mm:ssXXX"),body:e.description,location:e.location,allday:"false"}),r=new URL(d.outlook);return r.search=n.toString(),r.toString()},f=(o,t,e)=>{const n=encodeURIComponent(e.title),r=encodeURIComponent(e.description),i=encodeURIComponent(e.location),s=a.format(o,"yyyyMMdd'T'HHmmss"),u=t?a.format(t,"yyyyMMdd'T'HHmmss"):a.format(c.addHours(o,1),"yyyyMMdd'T'HHmmss");return`${d.yahoo}?v=60&view=d&type=20&title=${n}&st=${s}&et=${u}&desc=${r}&in_loc=${i}`},p=o=>l("google",o),L=o=>l("outlook",o),C=o=>l("yahoo",o),U=o=>{if(!o.start){console.error("Invalid event start date:",o);return}const t=o.end?o.end:c.addHours(o.start,1);g.distExports.createEvent({title:o.title,description:o.description,start:[o.start.getFullYear(),o.start.getMonth()+1,o.start.getDate(),o.start.getHours(),o.start.getMinutes()],end:[t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes()],location:o.location},(e,n)=>{if(e)console.error("Error creating iCalendar event:",e);else{const r=new File([n],`${o.title}.ics`,{type:"text/calendar"}),i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=r.name,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i)}})};exports.generateCalendarFile=U;exports.generateGoogleCalendarLink=p;exports.generateOutlookOnlineLink=L;exports.generateYahooCalendarLink=C;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as u } from "../../_virtual/
|
|
1
|
+
import { d as u } from "../../_virtual/index7.js";
|
|
2
2
|
import { isValid as p } from "../../node_modules/date-fns/isValid.js";
|
|
3
3
|
import { toZonedTime as m } from "../../node_modules/date-fns-tz/dist/esm/toZonedTime/index.js";
|
|
4
4
|
import { addHours as i } from "../../node_modules/date-fns/addHours.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),f=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),f=require("react"),z=require("../../utils/index.cjs"),H=require("../../_virtual/index.cjs"),P=require("../../types/commonTypes.cjs"),i=require("./types.cjs"),m=require("./Duration.cjs"),x=require("../Text/types.cjs"),R=require("../Text/Text.cjs"),U=require("../../node_modules/date-fns/locale/zh-CN.cjs"),E=require("../../node_modules/date-fns/locale/en-US.cjs"),I=require("../../node_modules/date-fns/differenceInSeconds.cjs"),y=require("../../node_modules/date-fns/differenceInMinutes.cjs"),p=require("../../node_modules/date-fns/differenceInHours.cjs"),C=require("../../node_modules/date-fns/differenceInDays.cjs"),F=require("../../node_modules/date-fns/differenceInMilliseconds.cjs"),j=f.forwardRef(({endDateTime:e,formatDurationStr:a,label:h="Lots Close in",intervalDescription:g,className:M,locale:$="en",showBottomBorder:N=!0,variant:l=i.CountdownVariants.default,getCurrentDateTime:c=()=>new Date,centerAlign:V=!1,...q},b)=>{const{className:r,...S}=z.getCommonProps(q,"Countdown"),[s,_]=f.useState(c()||new Date),d=$===P.SupportedLanguages.zh?U.zhCN:E.enUS,n={days:C.differenceInDays(e,s)>0?C.differenceInDays(e,s):0,hours:p.differenceInHours(e,s)>0?p.differenceInHours(e,s)%24:0,minutes:y.differenceInMinutes(e,s)>0?y.differenceInMinutes(e,s)%60:0,seconds:(I.differenceInSeconds(e,s)>0?I.differenceInSeconds(e,s)%60:0)%60};f.useEffect(()=>{const t=setInterval(()=>{_(c()||new Date)},1e3);return()=>clearInterval(t)},[e,c]);const v=f.useMemo(()=>{const t=c();return!!t&&new Date(e).getTime()>t.getTime()},[e,c]),L=F.differenceInMilliseconds(e,s)<=180*1e3,u=l===i.CountdownVariants.sm?x.TextVariants.labelSmall:x.TextVariants.labelMedium,w=[n.days>0?o.jsx(m.Duration,{duration:n,unit:"days",locale:d,formatDurationStr:a,textVariant:u},"days"):null,n.days>0||n.hours>0?o.jsx(m.Duration,{duration:n,unit:"hours",locale:d,formatDurationStr:a,textVariant:u},"hours"):null,n.days===0?o.jsx(m.Duration,{duration:n,unit:"minutes",locale:d,formatDurationStr:a,textVariant:u},"minutes"):null,n.days===0&&n.hours===0?o.jsx(m.Duration,{duration:n,unit:"seconds",locale:d,formatDurationStr:a,textVariant:u},"seconds"):null].filter(t=>t!=null);return v?o.jsxs("div",{"data-chromatic":"ignore",...S,className:H.default(r,M,{[`${r}--compact`]:l===i.CountdownVariants.compact,[`${r}--sm`]:l===i.CountdownVariants.sm,[`${r}--show-bottom-border`]:N,[`${r}--closing-lot`]:L,[`${r}--center-align`]:V}),...q,ref:b,children:[o.jsxs("div",{className:`${r}__countdown-container`,role:"timer","aria-label":h,children:[o.jsx(R.default,{variant:u,children:h}),w.length>0?o.jsx("div",{className:`${r}__duration-group`,children:w}):null]}),l===i.CountdownVariants.default?o.jsx("span",{children:g}):null]}):null});j.displayName="Countdown";exports.default=j;
|
|
@@ -34,6 +34,10 @@ export interface CountdownProps extends ComponentProps<'div'> {
|
|
|
34
34
|
* Function to get the current date time
|
|
35
35
|
*/
|
|
36
36
|
getCurrentDateTime?: () => Date | null;
|
|
37
|
+
/**
|
|
38
|
+
* Centers label and durationwithin the countdown row
|
|
39
|
+
*/
|
|
40
|
+
centerAlign?: boolean;
|
|
37
41
|
}
|
|
38
42
|
/**
|
|
39
43
|
* ## Overview
|
|
@@ -1,112 +1,120 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import { SupportedLanguages as
|
|
6
|
-
import { CountdownVariants as
|
|
7
|
-
import { Duration as
|
|
8
|
-
import { TextVariants as
|
|
9
|
-
import
|
|
10
|
-
import { zhCN as
|
|
11
|
-
import { enUS as
|
|
12
|
-
import { differenceInSeconds as
|
|
13
|
-
import { differenceInMinutes as
|
|
14
|
-
import { differenceInHours as
|
|
15
|
-
import { differenceInDays as
|
|
16
|
-
import { differenceInMilliseconds as
|
|
17
|
-
const
|
|
1
|
+
import { jsx as t, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as P, useState as S, useEffect as E, useMemo as F } from "react";
|
|
3
|
+
import { getCommonProps as G } from "../../utils/index.js";
|
|
4
|
+
import H from "../../_virtual/index.js";
|
|
5
|
+
import { SupportedLanguages as R } from "../../types/commonTypes.js";
|
|
6
|
+
import { CountdownVariants as a } from "./types.js";
|
|
7
|
+
import { Duration as d } from "./Duration.js";
|
|
8
|
+
import { TextVariants as y } from "../Text/types.js";
|
|
9
|
+
import U from "../Text/Text.js";
|
|
10
|
+
import { zhCN as k } from "../../node_modules/date-fns/locale/zh-CN.js";
|
|
11
|
+
import { enUS as q } from "../../node_modules/date-fns/locale/en-US.js";
|
|
12
|
+
import { differenceInSeconds as g } from "../../node_modules/date-fns/differenceInSeconds.js";
|
|
13
|
+
import { differenceInMinutes as C } from "../../node_modules/date-fns/differenceInMinutes.js";
|
|
14
|
+
import { differenceInHours as I } from "../../node_modules/date-fns/differenceInHours.js";
|
|
15
|
+
import { differenceInDays as N } from "../../node_modules/date-fns/differenceInDays.js";
|
|
16
|
+
import { differenceInMilliseconds as A } from "../../node_modules/date-fns/differenceInMilliseconds.js";
|
|
17
|
+
const B = P(
|
|
18
18
|
({
|
|
19
19
|
endDateTime: o,
|
|
20
|
-
formatDurationStr:
|
|
21
|
-
label:
|
|
22
|
-
intervalDescription:
|
|
23
|
-
className:
|
|
24
|
-
locale:
|
|
25
|
-
showBottomBorder:
|
|
26
|
-
variant:
|
|
27
|
-
getCurrentDateTime:
|
|
20
|
+
formatDurationStr: i,
|
|
21
|
+
label: f = "Lots Close in",
|
|
22
|
+
intervalDescription: $,
|
|
23
|
+
className: x,
|
|
24
|
+
locale: b = "en",
|
|
25
|
+
showBottomBorder: L = !0,
|
|
26
|
+
variant: m = a.default,
|
|
27
|
+
getCurrentDateTime: l = () => /* @__PURE__ */ new Date(),
|
|
28
|
+
centerAlign: M = !1,
|
|
28
29
|
...p
|
|
29
|
-
},
|
|
30
|
-
const { className:
|
|
31
|
-
days:
|
|
32
|
-
hours:
|
|
33
|
-
minutes:
|
|
34
|
-
seconds: (
|
|
30
|
+
}, _) => {
|
|
31
|
+
const { className: r, ...v } = G(p, "Countdown"), [n, V] = S(l() || /* @__PURE__ */ new Date()), u = b === R.zh ? k : q, s = {
|
|
32
|
+
days: N(o, n) > 0 ? N(o, n) : 0,
|
|
33
|
+
hours: I(o, n) > 0 ? I(o, n) % 24 : 0,
|
|
34
|
+
minutes: C(o, n) > 0 ? C(o, n) % 60 : 0,
|
|
35
|
+
seconds: (g(o, n) > 0 ? g(o, n) % 60 : 0) % 60
|
|
35
36
|
};
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
V(
|
|
37
|
+
E(() => {
|
|
38
|
+
const e = setInterval(() => {
|
|
39
|
+
V(l() || /* @__PURE__ */ new Date());
|
|
39
40
|
}, 1e3);
|
|
40
|
-
return () => clearInterval(
|
|
41
|
-
}, [o,
|
|
42
|
-
const j =
|
|
43
|
-
const
|
|
44
|
-
return !!
|
|
45
|
-
}, [o,
|
|
46
|
-
|
|
41
|
+
return () => clearInterval(e);
|
|
42
|
+
}, [o, l]);
|
|
43
|
+
const j = F(() => {
|
|
44
|
+
const e = l();
|
|
45
|
+
return !!e && new Date(o).getTime() > e.getTime();
|
|
46
|
+
}, [o, l]), z = A(o, n) <= 180 * 1e3, c = m === a.sm ? y.labelSmall : y.labelMedium, h = [
|
|
47
|
+
s.days > 0 ? /* @__PURE__ */ t(
|
|
48
|
+
d,
|
|
49
|
+
{
|
|
50
|
+
duration: s,
|
|
51
|
+
unit: "days",
|
|
52
|
+
locale: u,
|
|
53
|
+
formatDurationStr: i,
|
|
54
|
+
textVariant: c
|
|
55
|
+
},
|
|
56
|
+
"days"
|
|
57
|
+
) : null,
|
|
58
|
+
s.days > 0 || s.hours > 0 ? /* @__PURE__ */ t(
|
|
59
|
+
d,
|
|
60
|
+
{
|
|
61
|
+
duration: s,
|
|
62
|
+
unit: "hours",
|
|
63
|
+
locale: u,
|
|
64
|
+
formatDurationStr: i,
|
|
65
|
+
textVariant: c
|
|
66
|
+
},
|
|
67
|
+
"hours"
|
|
68
|
+
) : null,
|
|
69
|
+
s.days === 0 ? /* @__PURE__ */ t(
|
|
70
|
+
d,
|
|
71
|
+
{
|
|
72
|
+
duration: s,
|
|
73
|
+
unit: "minutes",
|
|
74
|
+
locale: u,
|
|
75
|
+
formatDurationStr: i,
|
|
76
|
+
textVariant: c
|
|
77
|
+
},
|
|
78
|
+
"minutes"
|
|
79
|
+
) : null,
|
|
80
|
+
s.days === 0 && s.hours === 0 ? /* @__PURE__ */ t(
|
|
81
|
+
d,
|
|
82
|
+
{
|
|
83
|
+
duration: s,
|
|
84
|
+
unit: "seconds",
|
|
85
|
+
locale: u,
|
|
86
|
+
formatDurationStr: i,
|
|
87
|
+
textVariant: c
|
|
88
|
+
},
|
|
89
|
+
"seconds"
|
|
90
|
+
) : null
|
|
91
|
+
].filter((e) => e != null);
|
|
92
|
+
return j ? /* @__PURE__ */ w(
|
|
47
93
|
"div",
|
|
48
94
|
{
|
|
49
95
|
"data-chromatic": "ignore",
|
|
50
|
-
...
|
|
51
|
-
className:
|
|
52
|
-
[`${
|
|
53
|
-
[`${
|
|
54
|
-
[`${
|
|
55
|
-
[`${
|
|
96
|
+
...v,
|
|
97
|
+
className: H(r, x, {
|
|
98
|
+
[`${r}--compact`]: m === a.compact,
|
|
99
|
+
[`${r}--sm`]: m === a.sm,
|
|
100
|
+
[`${r}--show-bottom-border`]: L,
|
|
101
|
+
[`${r}--closing-lot`]: z,
|
|
102
|
+
[`${r}--center-align`]: M
|
|
56
103
|
}),
|
|
57
104
|
...p,
|
|
58
|
-
ref:
|
|
105
|
+
ref: _,
|
|
59
106
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */ t(
|
|
62
|
-
|
|
63
|
-
f,
|
|
64
|
-
{
|
|
65
|
-
duration: s,
|
|
66
|
-
unit: "days",
|
|
67
|
-
locale: i,
|
|
68
|
-
formatDurationStr: m,
|
|
69
|
-
textVariant: l
|
|
70
|
-
}
|
|
71
|
-
) : null,
|
|
72
|
-
s.days > 0 || s.hours > 0 ? /* @__PURE__ */ t(
|
|
73
|
-
f,
|
|
74
|
-
{
|
|
75
|
-
duration: s,
|
|
76
|
-
unit: "hours",
|
|
77
|
-
locale: i,
|
|
78
|
-
formatDurationStr: m,
|
|
79
|
-
textVariant: l
|
|
80
|
-
}
|
|
81
|
-
) : null,
|
|
82
|
-
s.days === 0 ? /* @__PURE__ */ t(
|
|
83
|
-
f,
|
|
84
|
-
{
|
|
85
|
-
duration: s,
|
|
86
|
-
unit: "minutes",
|
|
87
|
-
locale: i,
|
|
88
|
-
formatDurationStr: m,
|
|
89
|
-
textVariant: l
|
|
90
|
-
}
|
|
91
|
-
) : null,
|
|
92
|
-
s.days === 0 && s.hours === 0 ? /* @__PURE__ */ t(
|
|
93
|
-
f,
|
|
94
|
-
{
|
|
95
|
-
duration: s,
|
|
96
|
-
unit: "seconds",
|
|
97
|
-
locale: i,
|
|
98
|
-
formatDurationStr: m,
|
|
99
|
-
textVariant: l
|
|
100
|
-
}
|
|
101
|
-
) : null
|
|
107
|
+
/* @__PURE__ */ w("div", { className: `${r}__countdown-container`, role: "timer", "aria-label": f, children: [
|
|
108
|
+
/* @__PURE__ */ t(U, { variant: c, children: f }),
|
|
109
|
+
h.length > 0 ? /* @__PURE__ */ t("div", { className: `${r}__duration-group`, children: h }) : null
|
|
102
110
|
] }),
|
|
103
|
-
|
|
111
|
+
m === a.default ? /* @__PURE__ */ t("span", { children: $ }) : null
|
|
104
112
|
]
|
|
105
113
|
}
|
|
106
114
|
) : null;
|
|
107
115
|
}
|
|
108
116
|
);
|
|
109
|
-
|
|
117
|
+
B.displayName = "Countdown";
|
|
110
118
|
export {
|
|
111
|
-
|
|
119
|
+
B as default
|
|
112
120
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("../../@babel/runtime/helpers/esm/extends.cjs"),x=require("../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.cjs"),N=require("../../@babel/runtime/helpers/esm/inheritsLoose.cjs"),f=require("../../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("../../@babel/runtime/helpers/esm/extends.cjs"),x=require("../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.cjs"),N=require("../../@babel/runtime/helpers/esm/inheritsLoose.cjs"),f=require("../../../_virtual/index6.cjs"),A=require("../../dom-helpers/esm/addClass.cjs"),q=require("../../dom-helpers/esm/removeClass.cjs"),m=require("react"),g=require("./Transition.cjs"),_=require("./utils/PropTypes.cjs"),$=require("./utils/reflow.cjs");var S=function(i,l){return i&&l&&l.split(" ").forEach(function(e){return A.default(i,e)})},v=function(i,l){return i&&l&&l.split(" ").forEach(function(e){return q.default(i,e)})},C=(function(c){N.default(i,c);function i(){for(var e,t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=c.call.apply(c,[this].concat(o))||this,e.appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(s,r){var n=e.resolveArguments(s,r),u=n[0],p=n[1];e.removeClasses(u,"exit"),e.addClass(u,p?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(s,r)},e.onEntering=function(s,r){var n=e.resolveArguments(s,r),u=n[0],p=n[1],d=p?"appear":"enter";e.addClass(u,d,"active"),e.props.onEntering&&e.props.onEntering(s,r)},e.onEntered=function(s,r){var n=e.resolveArguments(s,r),u=n[0],p=n[1],d=p?"appear":"enter";e.removeClasses(u,d),e.addClass(u,d,"done"),e.props.onEntered&&e.props.onEntered(s,r)},e.onExit=function(s){var r=e.resolveArguments(s),n=r[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(s)},e.onExiting=function(s){var r=e.resolveArguments(s),n=r[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(s)},e.onExited=function(s){var r=e.resolveArguments(s),n=r[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(s)},e.resolveArguments=function(s,r){return e.props.nodeRef?[e.props.nodeRef.current,s]:[s,r]},e.getClassNames=function(s){var r=e.props.classNames,n=typeof r=="string",u=n&&r?r+"-":"",p=n?""+u+s:r[s],d=n?p+"-active":r[s+"Active"],h=n?p+"-done":r[s+"Done"];return{baseClassName:p,activeClassName:d,doneClassName:h}},e}var l=i.prototype;return l.addClass=function(t,o,a){var s=this.getClassNames(o)[a+"ClassName"],r=this.getClassNames("enter"),n=r.doneClassName;o==="appear"&&a==="done"&&n&&(s+=" "+n),a==="active"&&t&&$.forceReflow(t),s&&(this.appliedClasses[o][a]=s,S(t,s))},l.removeClasses=function(t,o){var a=this.appliedClasses[o],s=a.base,r=a.active,n=a.done;this.appliedClasses[o]={},s&&v(t,s),r&&v(t,r),n&&v(t,n)},l.render=function(){var t=this.props;t.classNames;var o=x.default(t,["classNames"]);return m.createElement(g.default,E.default({},o,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},i})(m.Component);C.defaultProps={classNames:""};C.propTypes=process.env.NODE_ENV!=="production"?E.default({},g.default.propTypes,{classNames:_.classNamesShape,onEnter:f.default.func,onEntering:f.default.func,onEntered:f.default.func,onExit:f.default.func,onExiting:f.default.func,onExited:f.default.func}):{};exports.default=C;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import C from "../../@babel/runtime/helpers/esm/extends.js";
|
|
2
2
|
import x from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
|
|
3
3
|
import N from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
|
|
4
|
-
import v from "../../../_virtual/
|
|
4
|
+
import v from "../../../_virtual/index6.js";
|
|
5
5
|
import A from "../../dom-helpers/esm/addClass.js";
|
|
6
6
|
import _ from "../../dom-helpers/esm/removeClass.js";
|
|
7
7
|
import c from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const D=require("../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.cjs"),C=require("../../@babel/runtime/helpers/esm/inheritsLoose.cjs"),o=require("../../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const D=require("../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.cjs"),C=require("../../@babel/runtime/helpers/esm/inheritsLoose.cjs"),o=require("../../../_virtual/index6.cjs"),v=require("react"),N=require("react-dom"),S=require("./config.cjs"),R=require("./utils/PropTypes.cjs"),O=require("./TransitionGroupContext.cjs"),k=require("./utils/reflow.cjs");var x="unmounted",f="exited",d="entering",p="entered",T="exiting",l=(function(c){C.default(u,c);function u(i,e){var t;t=c.call(this,i,e)||this;var n=e,r=n&&!n.isMounting?i.enter:i.appear,s;return t.appearStatus=null,i.in?r?(s=f,t.appearStatus=d):s=p:i.unmountOnExit||i.mountOnEnter?s=x:s=f,t.state={status:s},t.nextCallback=null,t}u.getDerivedStateFromProps=function(e,t){var n=e.in;return n&&t.status===x?{status:f}:null};var a=u.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==d&&n!==p&&(t=d):(n===d||n===p)&&(t=T)}this.updateStatus(!1,t)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var e=this.props.timeout,t,n,r;return t=n=r=e,e!=null&&typeof e!="number"&&(t=e.exit,n=e.enter,r=e.appear!==void 0?e.appear:n),{exit:t,enter:n,appear:r}},a.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===d){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:N.findDOMNode(this);n&&k.forceReflow(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===f&&this.setState({status:x})},a.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,s=this.props.nodeRef?[r]:[N.findDOMNode(this),r],E=s[0],m=s[1],b=this.getTimeouts(),g=r?b.appear:b.enter;if(!e&&!n||S.default.disabled){this.safeSetState({status:p},function(){t.props.onEntered(E)});return}this.props.onEnter(E,m),this.safeSetState({status:d},function(){t.props.onEntering(E,m),t.onTransitionEnd(g,function(){t.safeSetState({status:p},function(){t.props.onEntered(E,m)})})})},a.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:N.findDOMNode(this);if(!t||S.default.disabled){this.safeSetState({status:f},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:T},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:f},function(){e.props.onExited(r)})})})},a.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},a.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:N.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],E=s[0],m=s[1];this.props.addEndListener(E,m)}e!=null&&setTimeout(this.nextCallback,e)},a.render=function(){var e=this.state.status;if(e===x)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=D.default(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return v.createElement(O.default.Provider,{value:null},typeof n=="function"?n(e,r):v.cloneElement(v.Children.only(n),r))},u})(v.Component);l.contextType=O.default;l.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:o.default.shape({current:typeof Element>"u"?o.default.any:function(c,u,a,i,e,t){var n=c[u];return o.default.instanceOf(n&&"ownerDocument"in n?n.ownerDocument.defaultView.Element:Element)(c,u,a,i,e,t)}}),children:o.default.oneOfType([o.default.func.isRequired,o.default.element.isRequired]).isRequired,in:o.default.bool,mountOnEnter:o.default.bool,unmountOnExit:o.default.bool,appear:o.default.bool,enter:o.default.bool,exit:o.default.bool,timeout:function(u){var a=R.timeoutsShape;u.addEndListener||(a=a.isRequired);for(var i=arguments.length,e=new Array(i>1?i-1:0),t=1;t<i;t++)e[t-1]=arguments[t];return a.apply(void 0,[u].concat(e))},addEndListener:o.default.func,onEnter:o.default.func,onEntering:o.default.func,onEntered:o.default.func,onExit:o.default.func,onExiting:o.default.func,onExited:o.default.func}:{};function h(){}l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:h,onEntering:h,onEntered:h,onExit:h,onExiting:h,onExited:h};l.UNMOUNTED=x;l.EXITED=f;l.ENTERING=d;l.ENTERED=p;l.EXITING=T;exports.ENTERED=p;exports.ENTERING=d;exports.EXITED=f;exports.EXITING=T;exports.UNMOUNTED=x;exports.default=l;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import C from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
|
|
2
2
|
import D from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
|
|
3
|
-
import o from "../../../_virtual/
|
|
3
|
+
import o from "../../../_virtual/index6.js";
|
|
4
4
|
import v from "react";
|
|
5
5
|
import b from "react-dom";
|
|
6
6
|
import T from "./config.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/index6.cjs");var t=process.env.NODE_ENV!=="production"?e.default.oneOfType([e.default.number,e.default.shape({enter:e.default.number,exit:e.default.number,appear:e.default.number}).isRequired]):null,a=process.env.NODE_ENV!=="production"?e.default.oneOfType([e.default.string,e.default.shape({enter:e.default.string,exit:e.default.string,active:e.default.string}),e.default.shape({enter:e.default.string,enterDone:e.default.string,enterActive:e.default.string,exit:e.default.string,exitDone:e.default.string,exitActive:e.default.string})]):null;exports.classNamesShape=a;exports.timeoutsShape=t;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use '../../allPartials' as *;
|
|
2
2
|
|
|
3
3
|
.#{$px}-countdown {
|
|
4
|
-
align-items:
|
|
4
|
+
align-items: stretch;
|
|
5
5
|
border-bottom: none;
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
@@ -10,38 +10,69 @@
|
|
|
10
10
|
padding-bottom: $spacing-sm;
|
|
11
11
|
width: 100%;
|
|
12
12
|
|
|
13
|
+
&--closing-lot {
|
|
14
|
+
.#{$px}-duration,
|
|
15
|
+
.#{$px}-duration .#{$px}-text {
|
|
16
|
+
color: $warning-default;
|
|
17
|
+
font-variation-settings: 'wght' 600;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
&--show-bottom-border {
|
|
14
22
|
border-bottom: 1px solid $light-gray;
|
|
15
23
|
margin-bottom: 1.5rem;
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
&__countdown-container {
|
|
19
|
-
align-items:
|
|
27
|
+
align-items: flex-start;
|
|
28
|
+
gap: $spacing-micro $spacing-sm;
|
|
20
29
|
display: flex;
|
|
21
|
-
flex-
|
|
22
|
-
|
|
23
|
-
justify-content: center;
|
|
30
|
+
flex-flow: row wrap;
|
|
31
|
+
justify-content: flex-start;
|
|
24
32
|
text-transform: inherit;
|
|
33
|
+
width: 100%;
|
|
25
34
|
|
|
26
|
-
.#{$px}-text {
|
|
35
|
+
> .#{$px}-text {
|
|
36
|
+
flex-shrink: 0;
|
|
27
37
|
font-variation-settings: 'wght' 600;
|
|
28
38
|
}
|
|
39
|
+
}
|
|
29
40
|
|
|
30
|
-
|
|
31
|
-
|
|
41
|
+
&--center-align {
|
|
42
|
+
.#{$px}-countdown__countdown-container {
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
text-align: center;
|
|
32
46
|
}
|
|
47
|
+
|
|
48
|
+
.#{$px}-countdown__duration-group {
|
|
49
|
+
justify-content: center;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__duration-group {
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 0 $spacing-sm;
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-flow: row wrap;
|
|
58
|
+
justify-content: flex-start;
|
|
33
59
|
}
|
|
34
60
|
|
|
35
61
|
&--compact {
|
|
36
62
|
.#{$px}-countdown__countdown-container {
|
|
37
|
-
gap: $spacing-xsm;
|
|
63
|
+
column-gap: $spacing-xsm;
|
|
38
64
|
}
|
|
39
|
-
}
|
|
40
65
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
66
|
+
.#{$px}-countdown__duration-group {
|
|
67
|
+
column-gap: $spacing-xsm;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&--closing-lot {
|
|
71
|
+
.#{$px}-duration,
|
|
72
|
+
.#{$px}-duration .#{$px}-text {
|
|
73
|
+
color: $warning-default;
|
|
74
|
+
font-variation-settings: 'wght' 600;
|
|
75
|
+
}
|
|
45
76
|
}
|
|
46
77
|
}
|
|
47
78
|
}
|