@mngh/jalali-datepicker 1.0.0 → 1.0.2

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.
Files changed (92) hide show
  1. package/README.md +665 -8
  2. package/dist/a11y/aria-helpers.d.ts +7 -0
  3. package/dist/a11y/aria-helpers.d.ts.map +1 -0
  4. package/dist/a11y/keyboard-navigation.d.ts +3 -0
  5. package/dist/a11y/keyboard-navigation.d.ts.map +1 -0
  6. package/dist/a11y/types.d.ts +20 -0
  7. package/dist/a11y/types.d.ts.map +1 -0
  8. package/dist/a11y/useCalendarKeyboard.d.ts +9 -0
  9. package/dist/a11y/useCalendarKeyboard.d.ts.map +1 -0
  10. package/dist/components/DayCell.d.ts +32 -0
  11. package/dist/components/DayCell.d.ts.map +1 -0
  12. package/dist/components/Header.d.ts +11 -0
  13. package/dist/components/Header.d.ts.map +1 -0
  14. package/dist/components/JalaliDatePicker.d.ts +52 -0
  15. package/dist/components/JalaliDatePicker.d.ts.map +1 -0
  16. package/dist/components/MonthYearPicker.d.ts +9 -0
  17. package/dist/components/MonthYearPicker.d.ts.map +1 -0
  18. package/dist/components/Weekdays.d.ts +10 -0
  19. package/dist/components/Weekdays.d.ts.map +1 -0
  20. package/dist/components/dual-calendar/DualMonthCalendar.d.ts +4 -0
  21. package/dist/components/dual-calendar/DualMonthCalendar.d.ts.map +1 -0
  22. package/dist/components/dual-calendar/index.d.ts +3 -0
  23. package/dist/components/dual-calendar/index.d.ts.map +1 -0
  24. package/dist/components/dual-calendar/types.d.ts +29 -0
  25. package/dist/components/dual-calendar/types.d.ts.map +1 -0
  26. package/dist/components/footer/CalendarFooter.d.ts +16 -0
  27. package/dist/components/footer/CalendarFooter.d.ts.map +1 -0
  28. package/dist/components/footer/types.d.ts +28 -0
  29. package/dist/components/footer/types.d.ts.map +1 -0
  30. package/dist/components/masked-input/MaskedDateInput.d.ts +4 -0
  31. package/dist/components/masked-input/MaskedDateInput.d.ts.map +1 -0
  32. package/dist/components/masked-input/index.d.ts +4 -0
  33. package/dist/components/masked-input/index.d.ts.map +1 -0
  34. package/dist/components/masked-input/mask-utils.d.ts +11 -0
  35. package/dist/components/masked-input/mask-utils.d.ts.map +1 -0
  36. package/dist/components/masked-input/types.d.ts +37 -0
  37. package/dist/components/masked-input/types.d.ts.map +1 -0
  38. package/dist/core/calendar-grid.d.ts +10 -0
  39. package/dist/core/calendar-grid.d.ts.map +1 -0
  40. package/dist/core/constants.d.ts +14 -0
  41. package/dist/core/constants.d.ts.map +1 -0
  42. package/dist/core/jalali-helpers.d.ts +35 -0
  43. package/dist/core/jalali-helpers.d.ts.map +1 -0
  44. package/dist/core/jalali-math.d.ts +27 -0
  45. package/dist/core/jalali-math.d.ts.map +1 -0
  46. package/dist/core/types.d.ts +62 -0
  47. package/dist/core/types.d.ts.map +1 -0
  48. package/dist/events/event-utils.d.ts +7 -0
  49. package/dist/events/event-utils.d.ts.map +1 -0
  50. package/dist/events/index.d.ts +3 -0
  51. package/dist/events/index.d.ts.map +1 -0
  52. package/dist/events/types.d.ts +17 -0
  53. package/dist/events/types.d.ts.map +1 -0
  54. package/dist/formatters/jalali-formatter.d.ts +18 -0
  55. package/dist/formatters/jalali-formatter.d.ts.map +1 -0
  56. package/dist/formatters/persian-digits.d.ts +9 -0
  57. package/dist/formatters/persian-digits.d.ts.map +1 -0
  58. package/dist/holidays/index.d.ts +3 -0
  59. package/dist/holidays/index.d.ts.map +1 -0
  60. package/dist/holidays/iran-holidays.d.ts +11 -0
  61. package/dist/holidays/iran-holidays.d.ts.map +1 -0
  62. package/dist/holidays/types.d.ts +21 -0
  63. package/dist/holidays/types.d.ts.map +1 -0
  64. package/dist/hooks/types.d.ts +53 -0
  65. package/dist/hooks/types.d.ts.map +1 -0
  66. package/dist/hooks/useJalaliDatePicker.d.ts +17 -0
  67. package/dist/hooks/useJalaliDatePicker.d.ts.map +1 -0
  68. package/dist/index.cjs +1 -1
  69. package/dist/index.cjs.map +1 -1
  70. package/dist/index.d.ts +27 -1
  71. package/dist/index.d.ts.map +1 -0
  72. package/dist/index.mjs +922 -1156
  73. package/dist/index.mjs.map +1 -1
  74. package/dist/plugins/time-picker/TimePicker.d.ts +21 -0
  75. package/dist/plugins/time-picker/TimePicker.d.ts.map +1 -0
  76. package/dist/plugins/time-picker/index.d.ts +4 -0
  77. package/dist/plugins/time-picker/index.d.ts.map +1 -0
  78. package/dist/plugins/time-picker/time-utils.d.ts +18 -0
  79. package/dist/plugins/time-picker/time-utils.d.ts.map +1 -0
  80. package/dist/plugins/time-picker/types.d.ts +36 -0
  81. package/dist/plugins/time-picker/types.d.ts.map +1 -0
  82. package/dist/theme/ThemeProvider.d.ts +15 -0
  83. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  84. package/dist/theme/style-slots.d.ts +46 -0
  85. package/dist/theme/style-slots.d.ts.map +1 -0
  86. package/dist/theme/tokens.d.ts +8 -0
  87. package/dist/theme/tokens.d.ts.map +1 -0
  88. package/dist/theme/types.d.ts +62 -0
  89. package/dist/theme/types.d.ts.map +1 -0
  90. package/package.json +39 -6
  91. package/dist/favicon.svg +0 -1
  92. package/dist/icons.svg +0 -24
@@ -0,0 +1,7 @@
1
+ import { JalaliDate } from '../core/types';
2
+ /**
3
+ * Creates an accessible full Persian string for screen readers.
4
+ * Example: "شنبه، ۱ فروردین ۱۴۰۵"
5
+ */
6
+ export declare function getAriaDayLabel(date: JalaliDate): string;
7
+ //# sourceMappingURL=aria-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aria-helpers.d.ts","sourceRoot":"","sources":["../../src/a11y/aria-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CASxD"}
@@ -0,0 +1,3 @@
1
+ import { NavigateOptions, NavigationResult } from './types';
2
+ export declare function calculateNextFocusedDate(options: NavigateOptions): NavigationResult;
3
+ //# sourceMappingURL=keyboard-navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard-navigation.d.ts","sourceRoot":"","sources":["../../src/a11y/keyboard-navigation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEjE,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,eAAe,GACvB,gBAAgB,CA0FlB"}
@@ -0,0 +1,20 @@
1
+ import { JalaliDate, JalaliMonthIndex } from '../core/types';
2
+ export interface NavigateOptions {
3
+ currentFocused: JalaliDate;
4
+ key: string;
5
+ isRtl?: boolean;
6
+ }
7
+ export interface NavigationResult {
8
+ nextDate: JalaliDate;
9
+ viewChanged: boolean;
10
+ handled: boolean;
11
+ }
12
+ export interface UseCalendarKeyboardProps {
13
+ viewYear: number;
14
+ viewMonth: JalaliMonthIndex;
15
+ selectedDate?: JalaliDate | null;
16
+ onSelectDate: (date: JalaliDate) => void;
17
+ onViewChange: (year: number, month: JalaliMonthIndex) => void;
18
+ isRtl?: boolean;
19
+ }
20
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/a11y/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,UAAU,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,UAAU,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,YAAY,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC9D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,9 @@
1
+ import { JalaliDate } from '../core/types';
2
+ import { UseCalendarKeyboardProps } from './types';
3
+ export declare function useCalendarKeyboard(props: UseCalendarKeyboardProps): {
4
+ focusedDate: JalaliDate;
5
+ setFocusedDate: import('react').Dispatch<import('react').SetStateAction<JalaliDate>>;
6
+ handleKeyDown: (e: React.KeyboardEvent) => void;
7
+ getCellTabIndex: (cellDate: JalaliDate) => number;
8
+ };
9
+ //# sourceMappingURL=useCalendarKeyboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCalendarKeyboard.d.ts","sourceRoot":"","sources":["../../src/a11y/useCalendarKeyboard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB;;;uBAe3D,KAAK,CAAC,aAAa;gCA0BZ,UAAU,KAAG,MAAM;EAYjC"}
@@ -0,0 +1,32 @@
1
+ import { default as React } from 'react';
2
+ import { JalaliDate, JalaliCalendarCell } from '../core/types';
3
+ import { CalendarEvent } from '../events/types';
4
+ import { DatePickerClassNames, DatePickerStyles } from '../theme/style-slots';
5
+ export interface DayCellProps {
6
+ cell?: JalaliCalendarCell | (Partial<JalaliCalendarCell> & {
7
+ day?: number;
8
+ isHoliday?: boolean;
9
+ isDisabled?: boolean;
10
+ });
11
+ day?: number;
12
+ isCurrentMonth?: boolean;
13
+ isSelected?: boolean;
14
+ isToday?: boolean;
15
+ isHoliday?: boolean;
16
+ isInRange?: boolean;
17
+ isRangeStart?: boolean;
18
+ isRangeEnd?: boolean;
19
+ disabled?: boolean;
20
+ digitType?: "persian" | "latin";
21
+ holidayTitle?: string;
22
+ events?: CalendarEvent[];
23
+ tabIndex?: number;
24
+ classNames?: DatePickerClassNames;
25
+ styles?: DatePickerStyles;
26
+ onSelect?: (target: JalaliDate) => void;
27
+ onHover?: (target: JalaliDate | null) => void;
28
+ onFocus?: (target: JalaliDate) => void;
29
+ onClick?: () => void;
30
+ }
31
+ export declare const DayCell: React.FC<DayCellProps>;
32
+ //# sourceMappingURL=DayCell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DayCell.d.ts","sourceRoot":"","sources":["../../src/components/DayCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EACD,kBAAkB,GAClB,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAG;QAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC,CAAC;IACP,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAwG1C,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export interface HeaderProps {
3
+ year: number;
4
+ monthName: string;
5
+ onPrevMonth: () => void;
6
+ onNextMonth: () => void;
7
+ onTitleClick?: () => void;
8
+ isPickerOpen?: boolean;
9
+ }
10
+ export declare const Header: React.FC<HeaderProps>;
11
+ //# sourceMappingURL=Header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../src/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAgJxC,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { default as React } from 'react';
2
+ import { SelectionMode, SelectedDateValue } from '../hooks/types';
3
+ import { JalaliTime } from '../plugins/time-picker/types';
4
+ import { CalendarEvent } from '../events/types';
5
+ import { CustomHolidayRule } from '../holidays/types';
6
+ import { DatePickerClassNames, DatePickerStyles } from '../theme/style-slots';
7
+ export interface JalaliDatePickerProps<M extends SelectionMode = "single"> {
8
+ /** حالت انتخاب تاریخ: single | range | multiple */
9
+ mode?: M;
10
+ /** مقدار تاریخ کنترل‌شده (شیء Date جاوااسکریپت) */
11
+ value?: SelectedDateValue<M>;
12
+ /** مقدار اولیه غیرکنترل‌شده (شیء Date جاوااسکریپت) */
13
+ defaultValue?: SelectedDateValue<M>;
14
+ /** خروجی انتخاب تاریخ (شیء Date جاوااسکریپت) */
15
+ onChange?: (val: SelectedDateValue<M>) => void;
16
+ /** حداقل تاریخ مجاز */
17
+ minDate?: Date;
18
+ /** حداکثر تاریخ مجاز */
19
+ maxDate?: Date;
20
+ /** غیرفعال‌سازی روزها بر اساس شرط */
21
+ isDateDisabled?: (date: Date) => boolean;
22
+ /** نوع ارقام: persian یا latin */
23
+ digitType?: "persian" | "latin";
24
+ /** نوع نمایش: inline | popover | modal */
25
+ variant?: "inline" | "popover" | "modal";
26
+ /** متن Placeholder */
27
+ placeholder?: string;
28
+ /** شروع هفته (۰ = شنبه) */
29
+ firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
30
+ className?: string;
31
+ style?: React.CSSProperties;
32
+ classNames?: DatePickerClassNames;
33
+ styles?: DatePickerStyles;
34
+ showFooter?: boolean;
35
+ showStatusText?: boolean;
36
+ showActions?: boolean;
37
+ onConfirm?: () => void;
38
+ enableTime?: boolean;
39
+ timeValue?: JalaliTime | null;
40
+ defaultTimeValue?: JalaliTime;
41
+ onTimeChange?: (time: JalaliTime) => void;
42
+ minuteStep?: number;
43
+ hourStep?: number;
44
+ showSeconds?: boolean;
45
+ numberOfMonths?: 1 | 2;
46
+ useMaskedInput?: boolean;
47
+ events?: CalendarEvent[];
48
+ showHolidays?: boolean;
49
+ customHolidays?: CustomHolidayRule[];
50
+ }
51
+ export declare function JalaliDatePicker<M extends SelectionMode = "single">({ mode, value, defaultValue, onChange, minDate, maxDate, isDateDisabled, firstDayOfWeek, variant, placeholder, digitType, className, style, classNames, styles, showFooter, showStatusText, showActions, onConfirm, enableTime, timeValue, defaultTimeValue, onTimeChange, minuteStep, hourStep, showSeconds, numberOfMonths, useMaskedInput, events, showHolidays, customHolidays, }: JalaliDatePickerProps<M>): React.JSX.Element;
52
+ //# sourceMappingURL=JalaliDatePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JalaliDatePicker.d.ts","sourceRoot":"","sources":["../../src/components/JalaliDatePicker.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export interface MonthYearPickerProps {
3
+ currentYear: number;
4
+ currentMonth: number;
5
+ onSelectMonth: (month: number) => void;
6
+ onSelectYear: (year: number) => void;
7
+ }
8
+ export declare const MonthYearPicker: React.FC<MonthYearPickerProps>;
9
+ //# sourceMappingURL=MonthYearPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MonthYearPicker.d.ts","sourceRoot":"","sources":["../../src/components/MonthYearPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0I1D,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { JalaliDayOfWeek } from '../core/types';
3
+ import { DatePickerClassNames, DatePickerStyles } from '../theme/style-slots';
4
+ export interface WeekdaysProps {
5
+ firstDayOfWeek?: JalaliDayOfWeek;
6
+ classNames?: DatePickerClassNames;
7
+ styles?: DatePickerStyles;
8
+ }
9
+ export declare const Weekdays: React.FC<WeekdaysProps>;
10
+ //# sourceMappingURL=Weekdays.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Weekdays.d.ts","sourceRoot":"","sources":["../../src/components/Weekdays.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,aAAa;IAC5B,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0C5C,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { DualMonthCalendarProps } from './types';
3
+ export declare const DualMonthCalendar: React.FC<DualMonthCalendarProps>;
4
+ //# sourceMappingURL=DualMonthCalendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DualMonthCalendar.d.ts","sourceRoot":"","sources":["../../../src/components/dual-calendar/DualMonthCalendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAkBtD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAmR9D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './DualMonthCalendar';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dual-calendar/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { JalaliDate, JalaliMonthIndex, JalaliDayOfWeek } from '../../core/types';
2
+ import { JalaliDateRange } from '../../hooks/types';
3
+ /**
4
+ * Props for the DualMonthCalendar component.
5
+ */
6
+ export interface DualMonthCalendarProps {
7
+ /** Selected date range [start, end]. */
8
+ value?: JalaliDateRange;
9
+ /** Default uncontrolled range value. */
10
+ defaultValue?: JalaliDateRange;
11
+ /** Callback fired when range changes. */
12
+ onChange?: (range: JalaliDateRange) => void;
13
+ /** Initial view date (defaults to current date or range start). */
14
+ initialViewDate?: {
15
+ year: number;
16
+ month: JalaliMonthIndex;
17
+ };
18
+ /** First day of week (0 = Saturday / شنبه). */
19
+ firstDayOfWeek?: JalaliDayOfWeek;
20
+ /** Output digit type for day numbers. */
21
+ digitType?: "persian" | "latin";
22
+ /** Minimum selectable date (inclusive). */
23
+ minDate?: Date | JalaliDate;
24
+ /** Maximum selectable date (inclusive). */
25
+ maxDate?: Date | JalaliDate;
26
+ /** Custom disable rule predicate. */
27
+ isDateDisabled?: (jalali: JalaliDate, gregorian: Date) => boolean;
28
+ }
29
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/dual-calendar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,wCAAwC;IACxC,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,yCAAyC;IACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,mEAAmE;IACnE,eAAe,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,gBAAgB,CAAA;KAAE,CAAC;IAC5D,+CAA+C;IAC/C,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,yCAAyC;IACzC,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,2CAA2C;IAC3C,OAAO,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC;IAC5B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC;IAC5B,qCAAqC;IACrC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,KAAK,OAAO,CAAC;CACnE"}
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ export interface CalendarFooterProps {
3
+ onTodayClick?: () => void;
4
+ onClearClick?: () => void;
5
+ showClear?: boolean;
6
+ mode?: any;
7
+ digitType?: "persian" | "latin";
8
+ showStatusText?: boolean;
9
+ showActions?: boolean;
10
+ selectedDate?: any;
11
+ selectedRange?: any;
12
+ styles?: any;
13
+ [key: string]: any;
14
+ }
15
+ export declare const CalendarFooter: React.FC<CalendarFooterProps>;
16
+ //# sourceMappingURL=CalendarFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarFooter.d.ts","sourceRoot":"","sources":["../../../src/components/footer/CalendarFooter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAuExD,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { JalaliDate } from '../../core/types';
2
+ import { JalaliDateRange } from '../../hooks/types';
3
+ import { JalaliTime } from '../../plugins/time-picker/types';
4
+ export interface CalendarFooterProps {
5
+ /** Selected single date */
6
+ selectedDate?: JalaliDate | null;
7
+ /** Selected date range */
8
+ selectedRange?: JalaliDateRange;
9
+ /** Selected multiple dates */
10
+ selectedDates?: JalaliDate[];
11
+ /** Selected time if time picker is active */
12
+ selectedTime?: JalaliTime | null;
13
+ /** Current selection mode */
14
+ mode?: "single" | "range" | "multiple";
15
+ /** Number display format */
16
+ digitType?: "persian" | "latin";
17
+ /** Custom text/template or boolean to toggle status text */
18
+ showStatusText?: boolean;
19
+ /** Show action buttons (Clear, Today, Submit) */
20
+ showActions?: boolean;
21
+ /** Callback for 'Today' action */
22
+ onToday?: () => void;
23
+ /** Callback for 'Clear' action */
24
+ onClear?: () => void;
25
+ /** Callback for 'Confirm/Apply' action */
26
+ onConfirm?: () => void;
27
+ }
28
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/footer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,WAAW,mBAAmB;IAClC,2BAA2B;IAC3B,YAAY,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACjC,0BAA0B;IAC1B,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,8BAA8B;IAC9B,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7B,6CAA6C;IAC7C,YAAY,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACjC,6BAA6B;IAC7B,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;IACvC,4BAA4B;IAC5B,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,4DAA4D;IAC5D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB"}
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { MaskedDateInputProps } from './types';
3
+ export declare const MaskedDateInput: React.FC<MaskedDateInputProps>;
4
+ //# sourceMappingURL=MaskedDateInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MaskedDateInput.d.ts","sourceRoot":"","sources":["../../../src/components/masked-input/MaskedDateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAuB,MAAM,SAAS,CAAC;AAKzE,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgJ1D,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './types';
2
+ export * from './mask-utils';
3
+ export * from './MaskedDateInput';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/masked-input/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { JalaliDate } from '../../core/types';
2
+ import { DateParseResult } from './types';
3
+ /**
4
+ * Strips all non-digit characters and applies the 'YYYY/MM/DD' mask structure.
5
+ */
6
+ export declare function applyDateMask(rawInput: string, digitType?: "persian" | "latin"): string;
7
+ /**
8
+ * Validates and parses a masked string into a valid JalaliDate object.
9
+ */
10
+ export declare function parseAndValidateJalaliString(input: string, minDate?: JalaliDate, maxDate?: JalaliDate, isDateDisabled?: (date: JalaliDate) => boolean): DateParseResult;
11
+ //# sourceMappingURL=mask-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mask-utils.d.ts","sourceRoot":"","sources":["../../../src/components/masked-input/mask-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAQ/C;;GAEG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,SAAS,GAAG,OAAmB,GACzC,MAAM,CAgBR;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,UAAU,EACpB,OAAO,CAAC,EAAE,UAAU,EACpB,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,GAC7C,eAAe,CAmDjB"}
@@ -0,0 +1,37 @@
1
+ import { JalaliDate } from '../../core/types';
2
+ /**
3
+ * Validation error codes emitted on invalid manual input.
4
+ */
5
+ export type DateValidationError = "INVALID_FORMAT" | "INVALID_MONTH" | "INVALID_DAY" | "OUT_OF_MIN_BOUNDS" | "OUT_OF_MAX_BOUNDS" | "DISABLED_DATE";
6
+ /**
7
+ * Result structure returned by the date parser.
8
+ */
9
+ export interface DateParseResult {
10
+ isValid: boolean;
11
+ date: JalaliDate | null;
12
+ error?: DateValidationError;
13
+ }
14
+ /**
15
+ * Props for the MaskedDateInput component.
16
+ */
17
+ export interface MaskedDateInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange"> {
18
+ /** Controlled Jalali date value. */
19
+ value?: JalaliDate | null;
20
+ /** Default uncontrolled Jalali date value. */
21
+ defaultValue?: JalaliDate | null;
22
+ /** Callback fired when a valid date is typed or cleared. */
23
+ onChange?: (date: JalaliDate | null) => void;
24
+ /** Callback fired on validation state change. */
25
+ onValidationError?: (error: DateValidationError | null) => void;
26
+ /** Output digit presentation ('persian' or 'latin'). Defaults to 'persian'. */
27
+ digitType?: "persian" | "latin";
28
+ /** Minimum selectable date constraint (inclusive). */
29
+ minDate?: JalaliDate;
30
+ /** Maximum selectable date constraint (inclusive). */
31
+ maxDate?: JalaliDate;
32
+ /** Custom disable rule predicate. */
33
+ isDateDisabled?: (date: JalaliDate) => boolean;
34
+ /** Whether the input allows a clear button (X icon). */
35
+ clearable?: boolean;
36
+ }
37
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/masked-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAChD,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,OAAO,GAAG,cAAc,GAAG,UAAU,CACtC;IACC,oCAAoC;IACpC,KAAK,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,8CAA8C;IAC9C,YAAY,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACjC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,KAAK,IAAI,CAAC;IAChE,+EAA+E;IAC/E,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,sDAAsD;IACtD,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,sDAAsD;IACtD,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,qCAAqC;IACrC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC;IAC/C,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
@@ -0,0 +1,10 @@
1
+ import { JalaliCalendarCell, JalaliGridOptions, JalaliDate } from './types';
2
+ /**
3
+ * Normalizes input date (Date or JalaliDate) into JalaliDate object.
4
+ */
5
+ export declare function toJalaliDate(input: Date | JalaliDate): JalaliDate;
6
+ /**
7
+ * Generates a 42-cell (6 rows x 7 columns) matrix for a given Jalali month.
8
+ */
9
+ export declare function generateJalaliCalendarGrid(options: JalaliGridOptions): JalaliCalendarCell[];
10
+ //# sourceMappingURL=calendar-grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-grid.d.ts","sourceRoot":"","sources":["../../src/core/calendar-grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EAEX,MAAM,SAAS,CAAC;AASjB;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,GAAG,UAAU,GAAG,UAAU,CASjE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,iBAAiB,GACzB,kBAAkB,EAAE,CAkGtB"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Persian (Farsi) month names.
3
+ */
4
+ export declare const PERSIAN_MONTH_NAMES: readonly ["فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند"];
5
+ /**
6
+ * Phonetic English month names for Jalali calendar.
7
+ */
8
+ export declare const JALALI_MONTH_NAMES_EN: readonly ["Farvardin", "Ordibehesht", "Khordad", "Tir", "Mordad", "Shahrivar", "Mehr", "Aban", "Azar", "Dey", "Bahman", "Esfand"];
9
+ /**
10
+ * Persian weekday headers starting from Saturday (شنبه).
11
+ */
12
+ export declare const PERSIAN_WEEK_DAYS_SHORT: readonly ["ش", "ی", "د", "س", "چ", "پ", "ج"];
13
+ export declare const PERSIAN_WEEK_DAYS_LONG: readonly ["شنبه", "یکشنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه"];
14
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB,kHAatB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,qBAAqB,mIAaxB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,uBAAuB,8CAQ1B,CAAC;AACX,eAAO,MAAM,sBAAsB,kFAQzB,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { JalaliDate, JalaliDayOfWeek } from './types';
2
+ export declare function jsDateToJalali(d: Date): JalaliDate;
3
+ export declare function jalaliToJsDate(j: JalaliDate, hours?: number, minutes?: number, seconds?: number): Date;
4
+ /**
5
+ * Calculates day of week in Jalali calendar (0 = شنبه, ..., 6 = جمعه).
6
+ */
7
+ export declare function getJalaliDayOfWeek(year: number, month: number, day: number): JalaliDayOfWeek;
8
+ /**
9
+ * Adds or subtracts days to/from a Jalali date across month/year boundaries.
10
+ */
11
+ export declare function addDaysToJalali(date: JalaliDate, days: number): JalaliDate;
12
+ /**
13
+ * Alias for addDaysToJalali
14
+ */
15
+ export declare const addJalaliDays: typeof addDaysToJalali;
16
+ /**
17
+ * Compares two Jalali dates:
18
+ * - Returns -1 if d1 < d2
19
+ * - Returns 1 if d1 > d2
20
+ * - Returns 0 if d1 == d2
21
+ */
22
+ export declare function compareJalaliDates(d1: JalaliDate, d2: JalaliDate): number;
23
+ /**
24
+ * Checks if a target date falls strictly or inclusively between two dates.
25
+ */
26
+ export declare function isJalaliDateBetween(target: JalaliDate, start: JalaliDate, end: JalaliDate, inclusive?: boolean): boolean;
27
+ /**
28
+ * Calculates the full Jalali week range starting Saturday and ending Friday.
29
+ */
30
+ export declare function getJalaliWeekRange(date: JalaliDate): [JalaliDate, JalaliDate];
31
+ /**
32
+ * Calculates full month range from day 1 to last day of that month.
33
+ */
34
+ export declare function getJalaliMonthRange(date: JalaliDate): [JalaliDate, JalaliDate];
35
+ //# sourceMappingURL=jalali-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jalali-helpers.d.ts","sourceRoot":"","sources":["../../src/core/jalali-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAoB,MAAM,SAAS,CAAC;AAO7E,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,UAAU,CAElD;AAED,wBAAgB,cAAc,CAC5B,CAAC,EAAE,UAAU,EACb,KAAK,SAAI,EACT,OAAO,SAAI,EACX,OAAO,SAAI,GACV,IAAI,CAIN;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACV,eAAe,CAIjB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAK1E;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,wBAAkB,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,GAAG,MAAM,CAKzE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,UAAU,EACf,SAAS,UAAO,GACf,OAAO,CAWT;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAK7E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,UAAU,GACf,CAAC,UAAU,EAAE,UAAU,CAAC,CAS1B"}
@@ -0,0 +1,27 @@
1
+ import { JalaliDate, JalaliMonthIndex } from './types';
2
+ /**
3
+ * Determines if a Jalali year is a leap year (کبیسه).
4
+ * Uses the Birashk 2820-year cycle algorithm.
5
+ */
6
+ export declare function isJalaliLeapYear(year: number): boolean;
7
+ /**
8
+ * Returns the number of days in a specific Jalali month.
9
+ */
10
+ export declare function getDaysInJalaliMonth(year: number, month: JalaliMonthIndex): number;
11
+ /**
12
+ * Converts a Gregorian date (Year, Month, Day) to Jalali date.
13
+ */
14
+ export declare function gregorianToJalali(gy: number, gm: number, gd: number): JalaliDate;
15
+ /**
16
+ * Converts a Jalali date to a Gregorian Date.
17
+ */
18
+ export declare function jalaliToGregorian(jy: number, jm: JalaliMonthIndex, jd: number): Date;
19
+ /**
20
+ * Returns today's date in Jalali format.
21
+ */
22
+ export declare function getTodayJalali(): JalaliDate;
23
+ /**
24
+ * Checks if two Jalali dates are identical.
25
+ */
26
+ export declare function isSameJalaliDay(a?: JalaliDate | null, b?: JalaliDate | null): boolean;
27
+ //# sourceMappingURL=jalali-math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jalali-math.d.ts","sourceRoot":"","sources":["../../src/core/jalali-math.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE5D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CA0BtD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,gBAAgB,GACtB,MAAM,CAYR;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,UAAU,CAmDZ;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,gBAAgB,EACpB,EAAE,EAAE,MAAM,GACT,IAAI,CAuDN;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,UAAU,CAO3C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,EACrB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,GACpB,OAAO,CAGT"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Jalali month index: 0 (Farvardin) to 11 (Esfand).
3
+ */
4
+ export type JalaliMonthIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
5
+ /**
6
+ * Standard Day of Week where:
7
+ * 0 = Saturday (شنبه), 1 = Sunday (یکشنبه), ..., 6 = Friday (جمعه)
8
+ */
9
+ export type JalaliDayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
10
+ /**
11
+ * Clean data model for a Jalali date.
12
+ */
13
+ export interface JalaliDate {
14
+ year: number;
15
+ month: JalaliMonthIndex;
16
+ day: number;
17
+ }
18
+ /**
19
+ * Representation of a single calendar cell in the Jalali grid.
20
+ */
21
+ export interface JalaliCalendarCell {
22
+ /** The calculated Jalali date values. */
23
+ jalali: JalaliDate;
24
+ /** The corresponding native JS Gregorian Date instance (useful for forms/APIs). */
25
+ gregorianDate: Date;
26
+ /** Numerical day of the Jalali month (1-31). */
27
+ dayNumber: number;
28
+ /** Whether the cell belongs to the currently viewed Jalali month. */
29
+ isCurrentMonth: boolean;
30
+ /** Whether this cell represents today in Jalali calendar. */
31
+ isToday: boolean;
32
+ /** Whether this cell matches the active selection. */
33
+ isSelected: boolean;
34
+ /** Whether this date is disabled according to min/max/custom rules. */
35
+ isDisabled: boolean;
36
+ /** Range selection indicators. */
37
+ isInRange?: boolean;
38
+ isRangeStart?: boolean;
39
+ isRangeEnd?: boolean;
40
+ }
41
+ /**
42
+ * Configuration options for generating the Jalali month grid.
43
+ */
44
+ export interface JalaliGridOptions {
45
+ /** Jalali year (e.g. 1405). */
46
+ year: number;
47
+ /** Jalali month index (0 = Farvardin, 11 = Esfand). */
48
+ month: JalaliMonthIndex;
49
+ /** First day of week. Default is 0 (Saturday / شنبه). */
50
+ firstDayOfWeek?: JalaliDayOfWeek;
51
+ /** Selected Jalali date or Date object. */
52
+ selectedDate?: Date | JalaliDate | null;
53
+ /** Selected date range. */
54
+ selectedRange?: [Date | JalaliDate | null, Date | JalaliDate | null];
55
+ /** Minimum selectable date (Gregorian Date or JalaliDate). */
56
+ minDate?: Date | JalaliDate;
57
+ /** Maximum selectable date (Gregorian Date or JalaliDate). */
58
+ maxDate?: Date | JalaliDate;
59
+ /** Custom disable rule predicate. */
60
+ isDateDisabled?: (jalali: JalaliDate, gregorian: Date) => boolean;
61
+ }
62
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;AAE/E;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,gBAAgB,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,yCAAyC;IACzC,MAAM,EAAE,UAAU,CAAC;IACnB,mFAAmF;IACnF,aAAa,EAAE,IAAI,CAAC;IACpB,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,cAAc,EAAE,OAAO,CAAC;IACxB,6DAA6D;IAC7D,OAAO,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,UAAU,EAAE,OAAO,CAAC;IACpB,uEAAuE;IACvE,UAAU,EAAE,OAAO,CAAC;IACpB,kCAAkC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,KAAK,EAAE,gBAAgB,CAAC;IACxB,yDAAyD;IACzD,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,2CAA2C;IAC3C,YAAY,CAAC,EAAE,IAAI,GAAG,UAAU,GAAG,IAAI,CAAC;IACxC,2BAA2B;IAC3B,aAAa,CAAC,EAAE,CAAC,IAAI,GAAG,UAAU,GAAG,IAAI,EAAE,IAAI,GAAG,UAAU,GAAG,IAAI,CAAC,CAAC;IACrE,8DAA8D;IAC9D,OAAO,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC;IAC5B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC;IAC5B,qCAAqC;IACrC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,KAAK,OAAO,CAAC;CACnE"}
@@ -0,0 +1,7 @@
1
+ import { JalaliDate } from '../core/types';
2
+ import { CalendarEvent } from './types';
3
+ /**
4
+ * Filters and returns all events matching a specific Jalali date.
5
+ */
6
+ export declare function getEventsForDate(date: JalaliDate, events?: CalendarEvent[]): CalendarEvent[];
7
+ //# sourceMappingURL=event-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-utils.d.ts","sourceRoot":"","sources":["../../src/events/event-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,UAAU,EAChB,MAAM,CAAC,EAAE,aAAa,EAAE,GACvB,aAAa,EAAE,CAGjB"}
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './event-utils';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { JalaliDate } from '../core/types';
2
+ /**
3
+ * Event item definition associated with a specific Jalali date.
4
+ */
5
+ export interface CalendarEvent {
6
+ /** Unique identifier for the event */
7
+ id: string;
8
+ /** Target Jalali date */
9
+ date: JalaliDate;
10
+ /** Short title or subject of the event */
11
+ title: string;
12
+ /** Optional detailed description */
13
+ description?: string;
14
+ /** Custom badge dot color (e.g., '#3b82f6', '#10b981', '#f59e0b') */
15
+ color?: string;
16
+ }
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/events/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}