cattle-care-ui 0.1.21 → 0.1.26

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.
@@ -0,0 +1,25 @@
1
+ export type WeekStart = 0 | 1;
2
+ export declare function startOfDay(date: Date): Date;
3
+ export declare function addDays(date: Date, days: number): Date;
4
+ export declare function daysInMonth(year: number, month: number): number;
5
+ /** Moves by whole months, keeping the day of month where possible (Jan 31 + 1 → Feb 28/29). */
6
+ export declare function addMonths(date: Date, months: number): Date;
7
+ export declare function isSameDay(a: Date, b: Date): boolean;
8
+ /** Negative when `a` is an earlier calendar day than `b`, positive when later, 0 when the same day. */
9
+ export declare function compareDays(a: Date, b: Date): number;
10
+ export declare function isDayDisabled(date: Date, minDate?: Date, maxDate?: Date): boolean;
11
+ /** Pulls a day into [minDate, maxDate]. */
12
+ export declare function clampDay(date: Date, minDate?: Date, maxDate?: Date): Date;
13
+ /** First day of the week containing `date`. */
14
+ export declare function startOfWeek(date: Date, weekStartsOn: WeekStart): Date;
15
+ export declare function endOfWeek(date: Date, weekStartsOn: WeekStart): Date;
16
+ export interface GridDay {
17
+ date: Date;
18
+ /** False for the leading/trailing days that belong to a neighbouring month. */
19
+ inMonth: boolean;
20
+ }
21
+ /**
22
+ * Month page as six full weeks (a fixed height keeps the popup from jumping
23
+ * between months), padded with days of the neighbouring months.
24
+ */
25
+ export declare function getMonthGrid(year: number, month: number, weekStartsOn: WeekStart): GridDay[][];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cattle-care-ui",
3
- "version": "0.1.21",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,7 +39,8 @@
39
39
  "react-dom": "^19.0.0"
40
40
  },
41
41
  "dependencies": {
42
- "lucide-react": "^1.46.0"
42
+ "lucide-react": "^1.46.0",
43
+ "react-datepicker": "^9.1.0"
43
44
  },
44
45
  "devDependencies": {
45
46
  "@chromatic-com/storybook": "latest",