@blakesteve/roster 4.13.0 → 5.0.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.
- package/README.md +15 -7
- package/dist/components/atoms/Avatar/Avatar.cjs +1 -1
- package/dist/components/atoms/Avatar/Avatar.js +9 -8
- package/dist/components/atoms/AvatarStrip/AvatarStrip.cjs +1 -1
- package/dist/components/atoms/AvatarStrip/AvatarStrip.js +11 -10
- package/dist/components/atoms/Badge/Badge.cjs +1 -1
- package/dist/components/atoms/Badge/Badge.js +12 -11
- package/dist/components/atoms/Button/Button.cjs +1 -1
- package/dist/components/atoms/Button/Button.js +9 -8
- package/dist/components/atoms/Card/Card.cjs +1 -1
- package/dist/components/atoms/Card/Card.js +14 -13
- package/dist/components/atoms/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +10 -9
- package/dist/components/atoms/Chip/Chip.cjs +1 -1
- package/dist/components/atoms/Chip/Chip.js +1 -0
- package/dist/components/atoms/CollapsibleSection/CollapsibleSection.cjs +1 -1
- package/dist/components/atoms/CollapsibleSection/CollapsibleSection.js +1 -0
- package/dist/components/atoms/Combobox/Combobox.cjs +1 -1
- package/dist/components/atoms/Combobox/Combobox.js +20 -19
- package/dist/components/atoms/Disclosure/Disclosure.cjs +1 -1
- package/dist/components/atoms/Disclosure/Disclosure.js +5 -4
- package/dist/components/atoms/Eyebrow/Eyebrow.cjs +1 -1
- package/dist/components/atoms/Eyebrow/Eyebrow.js +9 -8
- package/dist/components/atoms/InlineCode/InlineCode.cjs +1 -1
- package/dist/components/atoms/InlineCode/InlineCode.js +7 -6
- package/dist/components/atoms/Input/Input.cjs +1 -1
- package/dist/components/atoms/Input/Input.js +12 -11
- package/dist/components/atoms/LabeledDivider/LabeledDivider.cjs +1 -1
- package/dist/components/atoms/LabeledDivider/LabeledDivider.js +6 -5
- package/dist/components/atoms/Link/Link.cjs +1 -1
- package/dist/components/atoms/Link/Link.js +10 -9
- package/dist/components/atoms/LiquidTabs/LiquidTabs.cjs +1 -1
- package/dist/components/atoms/LiquidTabs/LiquidTabs.js +1 -0
- package/dist/components/atoms/MultiSelect/MultiSelect.cjs +1 -1
- package/dist/components/atoms/MultiSelect/MultiSelect.js +1 -0
- package/dist/components/atoms/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/atoms/PasswordInput/PasswordInput.js +1 -0
- package/dist/components/atoms/Pill/Pill.cjs +1 -1
- package/dist/components/atoms/Pill/Pill.js +5 -4
- package/dist/components/atoms/SegmentBar/SegmentBar.cjs +1 -1
- package/dist/components/atoms/SegmentBar/SegmentBar.js +1 -0
- package/dist/components/atoms/Select/Select.cjs +1 -1
- package/dist/components/atoms/Select/Select.js +1 -0
- package/dist/components/atoms/Spinner/Spinner.cjs +1 -1
- package/dist/components/atoms/Spinner/Spinner.js +3 -2
- package/dist/components/atoms/Stat/Stat.cjs +1 -1
- package/dist/components/atoms/Stat/Stat.js +7 -6
- package/dist/components/atoms/Switch/Switch.cjs +1 -1
- package/dist/components/atoms/Switch/Switch.js +1 -0
- package/dist/components/atoms/Textarea/Textarea.cjs +1 -1
- package/dist/components/atoms/Textarea/Textarea.js +11 -10
- package/dist/components/atoms/ThemeToggle/ThemeToggle.cjs +1 -1
- package/dist/components/atoms/ThemeToggle/ThemeToggle.js +1 -0
- package/dist/components/atoms/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/atoms/Tooltip/Tooltip.js +4 -3
- package/dist/components/molecules/Accordion/Accordion.cjs +1 -1
- package/dist/components/molecules/Accordion/Accordion.js +5 -4
- package/dist/components/molecules/Alert/Alert.cjs +1 -1
- package/dist/components/molecules/Alert/Alert.js +1 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +4 -3
- package/dist/components/molecules/CallToAction/CallToAction.cjs +1 -1
- package/dist/components/molecules/CallToAction/CallToAction.js +1 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.cjs +1 -1
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +7 -6
- package/dist/components/molecules/DescriptionList/DescriptionList.cjs +1 -1
- package/dist/components/molecules/DescriptionList/DescriptionList.js +1 -0
- package/dist/components/molecules/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/molecules/EmptyState/EmptyState.js +1 -0
- package/dist/components/molecules/ErrorState/ErrorState.cjs +1 -1
- package/dist/components/molecules/ErrorState/ErrorState.js +5 -4
- package/dist/components/molecules/MatchupCard/MatchupCard.cjs +1 -1
- package/dist/components/molecules/MatchupCard/MatchupCard.js +1 -0
- package/dist/components/molecules/Pullquote/Pullquote.cjs +1 -1
- package/dist/components/molecules/Pullquote/Pullquote.js +6 -5
- package/dist/components/molecules/RadioGroup/RadioGroup.cjs +1 -1
- package/dist/components/molecules/RadioGroup/RadioGroup.js +1 -0
- package/dist/components/molecules/Toast/Toast.cjs +1 -1
- package/dist/components/molecules/Toast/Toast.js +1 -0
- package/dist/components/molecules/Toast/Toaster.cjs +1 -1
- package/dist/components/molecules/Toast/Toaster.js +1 -0
- package/dist/components/molecules/Toast/toast-api.cjs +1 -1
- package/dist/components/molecules/Toast/toast-api.js +11 -10
- package/dist/components/organisms/ActionBar/ActionBar.cjs +1 -1
- package/dist/components/organisms/ActionBar/ActionBar.js +5 -4
- package/dist/components/organisms/Countdown/Countdown.cjs +1 -1
- package/dist/components/organisms/Countdown/Countdown.js +1 -0
- package/dist/components/organisms/DataTable/DataTable.cjs +1 -1
- package/dist/components/organisms/DataTable/DataTable.js +1 -0
- package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +5 -4
- package/dist/components/organisms/Footer/Footer.cjs +1 -1
- package/dist/components/organisms/Footer/Footer.js +1 -0
- package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
- package/dist/components/organisms/Navbar/Navbar.js +1 -0
- package/dist/components/organisms/Table/Table.cjs +1 -1
- package/dist/components/organisms/Table/Table.js +20 -19
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.js +2 -3
- package/dist/hooks/useCountdown.cjs +1 -1
- package/dist/hooks/useCountdown.d.ts +9 -0
- package/dist/hooks/useCountdown.js +21 -23
- package/dist/hooks/useKeySequence.cjs +1 -1
- package/dist/hooks/useKeySequence.js +1 -0
- package/dist/internal/PopupOption.cjs +1 -1
- package/dist/internal/PopupOption.js +1 -0
- package/dist/internal/popup.cjs +1 -1
- package/dist/internal/popup.js +8 -7
- package/dist/meta.json +2 -2
- package/dist/roster.cjs +1 -1
- package/dist/roster.js +7 -8
- package/dist/utils.d.ts +11 -8
- package/package.json +6 -6
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blakesteve/roster",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "A production-grade atomic component library: accessible, theme-aware, and documented in Storybook. React 19, TypeScript, Tailwind CSS v4.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"dev": "vite",
|
|
58
|
-
"build": "tsc -b && vite build && node scripts/check-prefix.mjs && node scripts/check-classes-emit.mjs && node scripts/check-tokens.mjs",
|
|
58
|
+
"build": "tsc -b && vite build && node scripts/check-prefix.mjs && node scripts/check-classes-emit.mjs && node scripts/check-tokens.mjs && node scripts/check-client-boundary.mjs",
|
|
59
59
|
"lint": "eslint .",
|
|
60
60
|
"preview": "vite preview",
|
|
61
61
|
"storybook": "storybook dev -p 6006",
|
|
@@ -66,7 +66,8 @@
|
|
|
66
66
|
"check:prefix": "node scripts/check-prefix.mjs",
|
|
67
67
|
"check:classes-emit": "node scripts/check-classes-emit.mjs",
|
|
68
68
|
"prepack": "npm run build && node scripts/write-meta.mjs",
|
|
69
|
-
"check:tokens": "node scripts/check-tokens.mjs"
|
|
69
|
+
"check:tokens": "node scripts/check-tokens.mjs",
|
|
70
|
+
"check:client-boundary": "node scripts/check-client-boundary.mjs"
|
|
70
71
|
},
|
|
71
72
|
"peerDependencies": {
|
|
72
73
|
"@tanstack/react-table": "^9.1.2",
|
|
@@ -115,14 +116,14 @@
|
|
|
115
116
|
"postcss": "^8.5.6",
|
|
116
117
|
"react": "^19.2.4",
|
|
117
118
|
"react-dom": "^19.2.4",
|
|
119
|
+
"react-hot-toast": "^2.6.0",
|
|
118
120
|
"storybook": "^10.2.8",
|
|
119
121
|
"tailwindcss": "^4.1.18",
|
|
120
122
|
"typescript": "~5.9.3",
|
|
121
123
|
"typescript-eslint": "^8.46.4",
|
|
122
124
|
"vite": "^7.2.4",
|
|
123
125
|
"vite-plugin-dts": "^4.5.4",
|
|
124
|
-
"vitest": "^4.0.18"
|
|
125
|
-
"react-hot-toast": "^2.6.0"
|
|
126
|
+
"vitest": "^4.0.18"
|
|
126
127
|
},
|
|
127
128
|
"dependencies": {
|
|
128
129
|
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
@@ -132,7 +133,6 @@
|
|
|
132
133
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
133
134
|
"class-variance-authority": "^0.7.1",
|
|
134
135
|
"clsx": "^2.1.1",
|
|
135
|
-
"date-fns": "^4.1.0",
|
|
136
136
|
"tailwind-merge": "^3.4.0"
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(t){return e=>{const n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}exports.getRoundingMethod=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../toDate.cjs");function s(t){const e=o.toDate(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}exports.getTimezoneOffsetInMilliseconds=s;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { toDate as o } from "../toDate.js";
|
|
2
|
-
function l(t) {
|
|
3
|
-
const e = o(t), n = new Date(
|
|
4
|
-
Date.UTC(
|
|
5
|
-
e.getFullYear(),
|
|
6
|
-
e.getMonth(),
|
|
7
|
-
e.getDate(),
|
|
8
|
-
e.getHours(),
|
|
9
|
-
e.getMinutes(),
|
|
10
|
-
e.getSeconds(),
|
|
11
|
-
e.getMilliseconds()
|
|
12
|
-
)
|
|
13
|
-
);
|
|
14
|
-
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
l as getTimezoneOffsetInMilliseconds
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../constructFrom.cjs");function r(c,...t){const e=n.constructFrom.bind(null,t.find(o=>typeof o=="object"));return t.map(e)}exports.normalizeDates=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./normalizeDates.cjs");function o(t,e){const[r,n]=a.normalizeDates(t,e.start,e.end);return{start:r,end:n}}exports.normalizeInterval=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./addDays.cjs"),T=require("./addMonths.cjs"),q=require("./constructFrom.cjs"),A=require("./toDate.cjs");function M(t,r,l){const{years:o=0,months:s=0,weeks:d=0,days:e=0,hours:a=0,minutes:u=0,seconds:i=0}=r,n=A.toDate(t),c=s||o?T.addMonths(n,s+o*12):n,h=e||d?D.addDays(c,e+d*7):c,m=u+a*60,y=(i+m*60)*1e3;return q.constructFrom(t,+h+y)}exports.add=M;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { addDays as f } from "./addDays.js";
|
|
2
|
-
import { addMonths as y } from "./addMonths.js";
|
|
3
|
-
import { constructFrom as A } from "./constructFrom.js";
|
|
4
|
-
import { toDate as T } from "./toDate.js";
|
|
5
|
-
function F(o, e, D) {
|
|
6
|
-
const {
|
|
7
|
-
years: t = 0,
|
|
8
|
-
months: s = 0,
|
|
9
|
-
weeks: d = 0,
|
|
10
|
-
days: n = 0,
|
|
11
|
-
hours: m = 0,
|
|
12
|
-
minutes: a = 0,
|
|
13
|
-
seconds: i = 0
|
|
14
|
-
} = e, r = T(o), c = s || t ? y(r, s + t * 12) : r, h = n || d ? f(c, n + d * 7) : c, p = a + m * 60, u = (i + p * 60) * 1e3;
|
|
15
|
-
return A(o, +h + u);
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
F as add
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./constructFrom.cjs"),s=require("./toDate.cjs");function n(r,e,a){const t=s.toDate(r);return isNaN(e)?o.constructFrom(r,NaN):(e&&t.setDate(t.getDate()+e),t)}exports.addDays=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./constructFrom.cjs"),i=require("./toDate.cjs");function u(o,n,a){const t=i.toDate(o);if(isNaN(n))return s.constructFrom(o,NaN);if(!n)return t;const r=t.getDate(),e=s.constructFrom(o,t.getTime());e.setMonth(t.getMonth()+n+1,0);const c=e.getDate();return r>=c?e:(t.setFullYear(e.getFullYear(),e.getMonth(),r),t)}exports.addMonths=u;
|
|
@@ -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;
|