@blakesteve/roster 5.0.0 → 5.1.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/README.md +55 -8
- package/dist/components/atoms/Chip/Chip.cjs +1 -1
- package/dist/components/atoms/Chip/Chip.js +27 -27
- package/dist/components/atoms/Disclosure/Disclosure.cjs +1 -1
- package/dist/components/atoms/Disclosure/Disclosure.js +42 -44
- package/dist/components/atoms/Stat/Stat.cjs +1 -1
- package/dist/components/atoms/Stat/Stat.d.ts +27 -2
- package/dist/components/atoms/Stat/Stat.js +38 -13
- package/dist/components/atoms/Switch/Switch.cjs +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts +11 -1
- package/dist/components/atoms/Switch/Switch.js +38 -36
- package/dist/components/atoms/Switch/switch-variants.cjs +1 -1
- package/dist/components/atoms/Switch/switch-variants.js +1 -1
- package/dist/components/molecules/LiquidTabs/LiquidNav.cjs +1 -0
- package/dist/components/molecules/LiquidTabs/LiquidNav.d.ts +62 -0
- package/dist/components/molecules/LiquidTabs/LiquidNav.js +78 -0
- package/dist/components/molecules/LiquidTabs/LiquidTabs.cjs +1 -0
- package/dist/components/molecules/LiquidTabs/LiquidTabs.d.ts +69 -0
- package/dist/components/molecules/LiquidTabs/LiquidTabs.js +92 -0
- package/dist/components/molecules/LiquidTabs/liquid-pill.cjs +1 -0
- package/dist/components/molecules/LiquidTabs/liquid-pill.d.ts +56 -0
- package/dist/components/molecules/LiquidTabs/liquid-pill.js +129 -0
- package/dist/components/molecules/LiquidTabs/liquid-tab-id.cjs +1 -0
- package/dist/components/molecules/LiquidTabs/liquid-tab-id.d.ts +12 -0
- package/dist/components/molecules/LiquidTabs/liquid-tab-id.js +6 -0
- package/dist/components/molecules/Toast/Toaster.cjs +1 -1
- package/dist/components/molecules/Toast/Toaster.d.ts +7 -0
- package/dist/components/molecules/Toast/Toaster.js +67 -45
- package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +102 -79
- package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
- package/dist/components/organisms/Navbar/Navbar.js +157 -157
- package/dist/components/organisms/Sheet/Sheet.cjs +1 -0
- package/dist/components/organisms/Sheet/Sheet.d.ts +82 -0
- package/dist/components/organisms/Sheet/Sheet.js +303 -0
- package/dist/components/organisms/Sheet/sheet-drag.cjs +1 -0
- package/dist/components/organisms/Sheet/sheet-drag.d.ts +40 -0
- package/dist/components/organisms/Sheet/sheet-drag.js +22 -0
- package/dist/hooks/useCountdown.cjs +1 -1
- package/dist/hooks/useCountdown.d.ts +9 -0
- package/dist/hooks/useCountdown.js +20 -23
- package/dist/index.d.ts +4 -1
- package/dist/internal/motion.cjs +1 -0
- package/dist/internal/motion.d.ts +12 -0
- package/dist/internal/motion.js +21 -0
- package/dist/internal/page-inert.cjs +1 -0
- package/dist/internal/page-inert.d.ts +51 -0
- package/dist/internal/page-inert.js +36 -0
- package/dist/meta.json +3 -3
- package/dist/roster.cjs +1 -1
- package/dist/roster.css +1 -1
- package/dist/roster.js +128 -122
- package/package.json +3 -4
- package/dist/components/atoms/LiquidTabs/LiquidTabs.cjs +0 -1
- package/dist/components/atoms/LiquidTabs/LiquidTabs.d.ts +0 -39
- package/dist/components/atoms/LiquidTabs/LiquidTabs.js +0 -120
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.cjs +0 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +0 -9
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +0 -1
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -18
- package/dist/node_modules/date-fns/_lib/normalizeDates.cjs +0 -1
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
- package/dist/node_modules/date-fns/_lib/normalizeInterval.cjs +0 -1
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +0 -8
- package/dist/node_modules/date-fns/add.cjs +0 -1
- package/dist/node_modules/date-fns/add.js +0 -19
- package/dist/node_modules/date-fns/addDays.cjs +0 -1
- package/dist/node_modules/date-fns/addDays.js +0 -9
- package/dist/node_modules/date-fns/addMonths.cjs +0 -1
- package/dist/node_modules/date-fns/addMonths.js +0 -19
- package/dist/node_modules/date-fns/compareAsc.cjs +0 -1
- package/dist/node_modules/date-fns/compareAsc.js +0 -8
- package/dist/node_modules/date-fns/constants.cjs +0 -1
- package/dist/node_modules/date-fns/constants.js +0 -7
- package/dist/node_modules/date-fns/constructFrom.cjs +0 -1
- package/dist/node_modules/date-fns/constructFrom.js +0 -7
- package/dist/node_modules/date-fns/differenceInCalendarDays.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -15
- package/dist/node_modules/date-fns/differenceInCalendarMonths.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +0 -12
- package/dist/node_modules/date-fns/differenceInCalendarYears.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarYears.js +0 -12
- package/dist/node_modules/date-fns/differenceInDays.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInDays.js +0 -21
- package/dist/node_modules/date-fns/differenceInHours.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInHours.js +0 -14
- package/dist/node_modules/date-fns/differenceInMilliseconds.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +0 -7
- package/dist/node_modules/date-fns/differenceInMinutes.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInMinutes.js +0 -10
- package/dist/node_modules/date-fns/differenceInMonths.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInMonths.js +0 -23
- package/dist/node_modules/date-fns/differenceInSeconds.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInSeconds.js +0 -9
- package/dist/node_modules/date-fns/differenceInYears.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInYears.js +0 -16
- package/dist/node_modules/date-fns/endOfDay.cjs +0 -1
- package/dist/node_modules/date-fns/endOfDay.js +0 -8
- package/dist/node_modules/date-fns/endOfMonth.cjs +0 -1
- package/dist/node_modules/date-fns/endOfMonth.js +0 -8
- package/dist/node_modules/date-fns/intervalToDuration.cjs +0 -1
- package/dist/node_modules/date-fns/intervalToDuration.js +0 -25
- package/dist/node_modules/date-fns/isAfter.cjs +0 -1
- package/dist/node_modules/date-fns/isAfter.js +0 -7
- package/dist/node_modules/date-fns/isLastDayOfMonth.cjs +0 -1
- package/dist/node_modules/date-fns/isLastDayOfMonth.js +0 -10
- package/dist/node_modules/date-fns/startOfDay.cjs +0 -1
- package/dist/node_modules/date-fns/startOfDay.js +0 -8
- package/dist/node_modules/date-fns/toDate.cjs +0 -1
- package/dist/node_modules/date-fns/toDate.js +0 -7
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { constructFrom as s } from "./constructFrom.js";
|
|
2
|
-
import { toDate as f } from "./toDate.js";
|
|
3
|
-
function M(o, n, a) {
|
|
4
|
-
const t = f(o);
|
|
5
|
-
if (isNaN(n)) return s(o, NaN);
|
|
6
|
-
if (!n)
|
|
7
|
-
return t;
|
|
8
|
-
const r = t.getDate(), e = s(o, t.getTime());
|
|
9
|
-
e.setMonth(t.getMonth() + n + 1, 0);
|
|
10
|
-
const i = e.getDate();
|
|
11
|
-
return r >= i ? e : (t.setFullYear(
|
|
12
|
-
e.getFullYear(),
|
|
13
|
-
e.getMonth(),
|
|
14
|
-
r
|
|
15
|
-
), t);
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
M as addMonths
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./toDate.cjs");function c(r,o){const e=+t.toDate(r)-+t.toDate(o);return e<0?-1:e>0?1:e}exports.compareAsc=c;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=864e5,n=6e4,s=36e5,t=Symbol.for("constructDateFrom");exports.constructFromSymbol=t;exports.millisecondsInDay=o;exports.millisecondsInHour=s;exports.millisecondsInMinute=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./constants.cjs");function n(o,r){return typeof o=="function"?o(r):o&&typeof o=="object"&&t.constructFromSymbol in o?o[t.constructFromSymbol](r):o instanceof Date?new o.constructor(r):new Date(r)}exports.constructFrom=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./_lib/getTimezoneOffsetInMilliseconds.cjs"),D=require("./_lib/normalizeDates.cjs"),d=require("./constants.cjs"),a=require("./startOfDay.cjs");function m(r,s,i){const[o,l]=D.normalizeDates(i?.in,r,s),e=a.startOfDay(o),t=a.startOfDay(l),c=+e-n.getTimezoneOffsetInMilliseconds(e),f=+t-n.getTimezoneOffsetInMilliseconds(t);return Math.round((c-f)/d.millisecondsInDay)}exports.differenceInCalendarDays=m;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getTimezoneOffsetInMilliseconds as r } from "./_lib/getTimezoneOffsetInMilliseconds.js";
|
|
2
|
-
import { normalizeDates as c } from "./_lib/normalizeDates.js";
|
|
3
|
-
import { millisecondsInDay as D } from "./constants.js";
|
|
4
|
-
import { startOfDay as a } from "./startOfDay.js";
|
|
5
|
-
function u(o, n, i) {
|
|
6
|
-
const [m, s] = c(
|
|
7
|
-
i?.in,
|
|
8
|
-
o,
|
|
9
|
-
n
|
|
10
|
-
), t = a(m), e = a(s), f = +t - r(t), l = +e - r(e);
|
|
11
|
-
return Math.round((f - l) / D);
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
u as differenceInCalendarDays
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./_lib/normalizeDates.cjs");function s(n,r,a){const[e,t]=l.normalizeDates(a?.in,n,r),o=e.getFullYear()-t.getFullYear(),i=e.getMonth()-t.getMonth();return o*12+i}exports.differenceInCalendarMonths=s;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { normalizeDates as i } from "./_lib/normalizeDates.js";
|
|
2
|
-
function s(n, r, o) {
|
|
3
|
-
const [e, t] = i(
|
|
4
|
-
o?.in,
|
|
5
|
-
n,
|
|
6
|
-
r
|
|
7
|
-
), a = e.getFullYear() - t.getFullYear(), f = e.getMonth() - t.getMonth();
|
|
8
|
-
return a * 12 + f;
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
s as differenceInCalendarMonths
|
|
12
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./_lib/normalizeDates.cjs");function i(e,r,a){const[t,n]=l.normalizeDates(a?.in,e,r);return t.getFullYear()-n.getFullYear()}exports.differenceInCalendarYears=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./_lib/normalizeDates.cjs"),d=require("./differenceInCalendarDays.cjs");function l(e,n,t){const[s,o]=r.normalizeDates(t?.in,e,n),c=g(s,o),i=Math.abs(d.differenceInCalendarDays(s,o));s.setDate(s.getDate()-c*i);const f=+(g(s,o)===-c),u=c*(i-f);return u===0?0:u}function g(e,n){const t=e.getFullYear()-n.getFullYear()||e.getMonth()-n.getMonth()||e.getDate()-n.getDate()||e.getHours()-n.getHours()||e.getMinutes()-n.getMinutes()||e.getSeconds()-n.getSeconds()||e.getMilliseconds()-n.getMilliseconds();return t<0?-1:t>0?1:t}exports.differenceInDays=l;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { normalizeDates as r } from "./_lib/normalizeDates.js";
|
|
2
|
-
import { differenceInCalendarDays as d } from "./differenceInCalendarDays.js";
|
|
3
|
-
function l(n, t, s) {
|
|
4
|
-
const [o, e] = r(
|
|
5
|
-
s?.in,
|
|
6
|
-
n,
|
|
7
|
-
t
|
|
8
|
-
), c = u(o, e), g = Math.abs(
|
|
9
|
-
d(o, e)
|
|
10
|
-
);
|
|
11
|
-
o.setDate(o.getDate() - c * g);
|
|
12
|
-
const f = +(u(o, e) === -c), i = c * (g - f);
|
|
13
|
-
return i === 0 ? 0 : i;
|
|
14
|
-
}
|
|
15
|
-
function u(n, t) {
|
|
16
|
-
const s = n.getFullYear() - t.getFullYear() || n.getMonth() - t.getMonth() || n.getDate() - t.getDate() || n.getHours() - t.getHours() || n.getMinutes() - t.getMinutes() || n.getSeconds() - t.getSeconds() || n.getMilliseconds() - t.getMilliseconds();
|
|
17
|
-
return s < 0 ? -1 : s > 0 ? 1 : s;
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
l as differenceInDays
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./_lib/getRoundingMethod.cjs"),u=require("./_lib/normalizeDates.cjs"),c=require("./constants.cjs");function d(n,t,e){const[r,o]=u.normalizeDates(e?.in,n,t),i=(+r-+o)/c.millisecondsInHour;return s.getRoundingMethod(e?.roundingMethod)(i)}exports.differenceInHours=d;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { getRoundingMethod as f } from "./_lib/getRoundingMethod.js";
|
|
2
|
-
import { normalizeDates as m } from "./_lib/normalizeDates.js";
|
|
3
|
-
import { millisecondsInHour as d } from "./constants.js";
|
|
4
|
-
function l(e, o, r) {
|
|
5
|
-
const [n, t] = m(
|
|
6
|
-
r?.in,
|
|
7
|
-
e,
|
|
8
|
-
o
|
|
9
|
-
), i = (+n - +t) / d;
|
|
10
|
-
return f(r?.roundingMethod)(i);
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
l as differenceInHours
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./toDate.cjs");function i(t,n){return+e.toDate(t)-+e.toDate(n)}exports.differenceInMilliseconds=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./_lib/getRoundingMethod.cjs"),r=require("./constants.cjs"),d=require("./differenceInMilliseconds.cjs");function s(e,n,i){const t=d.differenceInMilliseconds(e,n)/r.millisecondsInMinute;return o.getRoundingMethod(i?.roundingMethod)(t)}exports.differenceInMinutes=s;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { getRoundingMethod as r } from "./_lib/getRoundingMethod.js";
|
|
2
|
-
import { millisecondsInMinute as t } from "./constants.js";
|
|
3
|
-
import { differenceInMilliseconds as f } from "./differenceInMilliseconds.js";
|
|
4
|
-
function s(n, e, i) {
|
|
5
|
-
const o = f(n, e) / t;
|
|
6
|
-
return r(i?.roundingMethod)(o);
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
s as differenceInMinutes
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./_lib/normalizeDates.cjs"),s=require("./compareAsc.cjs"),M=require("./differenceInCalendarMonths.cjs"),h=require("./isLastDayOfMonth.cjs");function d(o,f,l){const[a,e,t]=u.normalizeDates(l?.in,o,o,f),r=s.compareAsc(e,t),n=Math.abs(M.differenceInCalendarMonths(e,t));if(n<1)return 0;e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-r*n);let i=s.compareAsc(e,t)===-r;h.isLastDayOfMonth(a)&&n===1&&s.compareAsc(a,t)===1&&(i=!1);const c=r*(n-+i);return c===0?0:c}exports.differenceInMonths=d;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { normalizeDates as h } from "./_lib/normalizeDates.js";
|
|
2
|
-
import { compareAsc as r } from "./compareAsc.js";
|
|
3
|
-
import { differenceInCalendarMonths as l } from "./differenceInCalendarMonths.js";
|
|
4
|
-
import { isLastDayOfMonth as M } from "./isLastDayOfMonth.js";
|
|
5
|
-
function d(i, c, m) {
|
|
6
|
-
const [s, t, e] = h(
|
|
7
|
-
m?.in,
|
|
8
|
-
i,
|
|
9
|
-
i,
|
|
10
|
-
c
|
|
11
|
-
), o = r(t, e), n = Math.abs(
|
|
12
|
-
l(t, e)
|
|
13
|
-
);
|
|
14
|
-
if (n < 1) return 0;
|
|
15
|
-
t.getMonth() === 1 && t.getDate() > 27 && t.setDate(30), t.setMonth(t.getMonth() - o * n);
|
|
16
|
-
let a = r(t, e) === -o;
|
|
17
|
-
M(s) && n === 1 && r(s, e) === 1 && (a = !1);
|
|
18
|
-
const f = o * (n - +a);
|
|
19
|
-
return f === 0 ? 0 : f;
|
|
20
|
-
}
|
|
21
|
-
export {
|
|
22
|
-
d as differenceInMonths
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./_lib/getRoundingMethod.cjs"),t=require("./differenceInMilliseconds.cjs");function r(e,n,i){const o=t.differenceInMilliseconds(e,n)/1e3;return d.getRoundingMethod(i?.roundingMethod)(o)}exports.differenceInSeconds=r;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { getRoundingMethod as r } from "./_lib/getRoundingMethod.js";
|
|
2
|
-
import { differenceInMilliseconds as d } from "./differenceInMilliseconds.js";
|
|
3
|
-
function c(n, e, o) {
|
|
4
|
-
const i = d(n, e) / 1e3;
|
|
5
|
-
return r(o?.roundingMethod)(i);
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
c as differenceInSeconds
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./_lib/normalizeDates.cjs"),t=require("./compareAsc.cjs"),u=require("./differenceInCalendarYears.cjs");function d(s,c,i){const[e,r]=f.normalizeDates(i?.in,s,c),a=t.compareAsc(e,r),o=Math.abs(u.differenceInCalendarYears(e,r));e.setFullYear(1584),r.setFullYear(1584);const l=t.compareAsc(e,r)===-a,n=a*(o-+l);return n===0?0:n}exports.differenceInYears=d;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { normalizeDates as l } from "./_lib/normalizeDates.js";
|
|
2
|
-
import { compareAsc as n } from "./compareAsc.js";
|
|
3
|
-
import { differenceInCalendarYears as m } from "./differenceInCalendarYears.js";
|
|
4
|
-
function Y(o, s, i) {
|
|
5
|
-
const [e, r] = l(
|
|
6
|
-
i?.in,
|
|
7
|
-
o,
|
|
8
|
-
s
|
|
9
|
-
), t = n(e, r), c = Math.abs(m(e, r));
|
|
10
|
-
e.setFullYear(1584), r.setFullYear(1584);
|
|
11
|
-
const f = n(e, r) === -t, a = t * (c - +f);
|
|
12
|
-
return a === 0 ? 0 : a;
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
Y as differenceInYears
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./toDate.cjs");function n(e,r){const t=o.toDate(e);return t.setHours(23,59,59,999),t}exports.endOfDay=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./toDate.cjs");function r(e,s){const t=n.toDate(e),o=t.getMonth();return t.setFullYear(t.getFullYear(),o+1,0),t.setHours(23,59,59,999),t}exports.endOfMonth=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./_lib/normalizeInterval.cjs"),s=require("./add.cjs"),g=require("./differenceInDays.cjs"),M=require("./differenceInHours.cjs"),v=require("./differenceInMinutes.cjs"),D=require("./differenceInMonths.cjs"),S=require("./differenceInSeconds.cjs"),H=require("./differenceInYears.cjs");function T(y,h){const{start:r,end:n}=q.normalizeInterval(h?.in,y),e={},i=H.differenceInYears(n,r);i&&(e.years=i);const o=s.add(r,{years:e.years}),t=D.differenceInMonths(n,o);t&&(e.months=t);const c=s.add(o,{months:e.months}),d=g.differenceInDays(n,c);d&&(e.days=d);const a=s.add(c,{days:e.days}),f=M.differenceInHours(n,a);f&&(e.hours=f);const u=s.add(a,{hours:e.hours}),m=v.differenceInMinutes(n,u);m&&(e.minutes=m);const l=s.add(u,{minutes:e.minutes}),I=S.differenceInSeconds(n,l);return I&&(e.seconds=I),e}exports.intervalToDuration=T;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { normalizeInterval as g } from "./_lib/normalizeInterval.js";
|
|
2
|
-
import { add as s } from "./add.js";
|
|
3
|
-
import { differenceInDays as M } from "./differenceInDays.js";
|
|
4
|
-
import { differenceInHours as l } from "./differenceInHours.js";
|
|
5
|
-
import { differenceInMinutes as D } from "./differenceInMinutes.js";
|
|
6
|
-
import { differenceInMonths as v } from "./differenceInMonths.js";
|
|
7
|
-
import { differenceInSeconds as H } from "./differenceInSeconds.js";
|
|
8
|
-
import { differenceInYears as S } from "./differenceInYears.js";
|
|
9
|
-
function w(y, p) {
|
|
10
|
-
const { start: r, end: o } = g(p?.in, y), n = {}, e = S(o, r);
|
|
11
|
-
e && (n.years = e);
|
|
12
|
-
const i = s(r, { years: n.years }), t = v(o, i);
|
|
13
|
-
t && (n.months = t);
|
|
14
|
-
const m = s(i, { months: n.months }), f = M(o, m);
|
|
15
|
-
f && (n.days = f);
|
|
16
|
-
const c = s(m, { days: n.days }), a = l(o, c);
|
|
17
|
-
a && (n.hours = a);
|
|
18
|
-
const d = s(c, { hours: n.hours }), u = D(o, d);
|
|
19
|
-
u && (n.minutes = u);
|
|
20
|
-
const I = s(d, { minutes: n.minutes }), h = H(o, I);
|
|
21
|
-
return h && (n.seconds = h), n;
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
w as intervalToDuration
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./toDate.cjs");function o(e,r){return+t.toDate(e)>+t.toDate(r)}exports.isAfter=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./endOfDay.cjs"),o=require("./endOfMonth.cjs"),r=require("./toDate.cjs");function a(e,s){const t=r.toDate(e);return+n.endOfDay(t)==+o.endOfMonth(t)}exports.isLastDayOfMonth=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./toDate.cjs");function r(e,a){const t=o.toDate(e);return t.setHours(0,0,0,0),t}exports.startOfDay=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./constructFrom.cjs");function e(t,r){return o.constructFrom(t,t)}exports.toDate=e;
|