react-day-picker 9.1.3 → 9.2.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.
Files changed (294) hide show
  1. package/dist/cjs/DayPicker.js +34 -29
  2. package/dist/cjs/DayPicker.js.map +1 -1
  3. package/dist/cjs/classes/CalendarDay.d.ts +2 -4
  4. package/dist/cjs/classes/CalendarDay.js +2 -4
  5. package/dist/cjs/classes/CalendarDay.js.map +1 -1
  6. package/dist/cjs/classes/DateLib.d.ts +268 -0
  7. package/dist/cjs/classes/DateLib.js +360 -0
  8. package/dist/cjs/classes/DateLib.js.map +1 -0
  9. package/dist/cjs/classes/index.d.ts +1 -0
  10. package/dist/cjs/classes/index.js +1 -0
  11. package/dist/cjs/classes/index.js.map +1 -1
  12. package/dist/cjs/formatters/formatCaption.d.ts +2 -4
  13. package/dist/cjs/formatters/formatCaption.js +3 -5
  14. package/dist/cjs/formatters/formatCaption.js.map +1 -1
  15. package/dist/cjs/formatters/formatDay.d.ts +2 -4
  16. package/dist/cjs/formatters/formatDay.js +3 -5
  17. package/dist/cjs/formatters/formatDay.js.map +1 -1
  18. package/dist/cjs/formatters/formatMonthDropdown.d.ts +1 -1
  19. package/dist/cjs/formatters/formatMonthDropdown.js +2 -2
  20. package/dist/cjs/formatters/formatMonthDropdown.js.map +1 -1
  21. package/dist/cjs/formatters/formatWeekdayName.d.ts +2 -4
  22. package/dist/cjs/formatters/formatWeekdayName.js +3 -5
  23. package/dist/cjs/formatters/formatWeekdayName.js.map +1 -1
  24. package/dist/cjs/helpers/getDates.d.ts +3 -2
  25. package/dist/cjs/helpers/getDates.js +3 -9
  26. package/dist/cjs/helpers/getDates.js.map +1 -1
  27. package/dist/cjs/helpers/getDisplayMonths.d.ts +1 -1
  28. package/dist/cjs/helpers/getFocusableDate.d.ts +2 -2
  29. package/dist/cjs/helpers/getFocusableDate.js +3 -5
  30. package/dist/cjs/helpers/getFocusableDate.js.map +1 -1
  31. package/dist/cjs/helpers/getInitialMonth.d.ts +2 -1
  32. package/dist/cjs/helpers/getInitialMonth.js.map +1 -1
  33. package/dist/cjs/helpers/getMonthOptions.d.ts +2 -2
  34. package/dist/cjs/helpers/getMonthOptions.js +2 -2
  35. package/dist/cjs/helpers/getMonthOptions.js.map +1 -1
  36. package/dist/cjs/helpers/getMonths.d.ts +2 -2
  37. package/dist/cjs/helpers/getMonths.js +3 -15
  38. package/dist/cjs/helpers/getMonths.js.map +1 -1
  39. package/dist/cjs/helpers/getNavMonth.d.ts +2 -2
  40. package/dist/cjs/helpers/getNavMonth.js.map +1 -1
  41. package/dist/cjs/helpers/getNextFocus.d.ts +2 -2
  42. package/dist/cjs/helpers/getNextFocus.js.map +1 -1
  43. package/dist/cjs/helpers/getNextMonth.d.ts +1 -1
  44. package/dist/cjs/helpers/getPreviousMonth.d.ts +1 -1
  45. package/dist/cjs/helpers/getWeekdays.d.ts +5 -7
  46. package/dist/cjs/helpers/getWeekdays.js +5 -8
  47. package/dist/cjs/helpers/getWeekdays.js.map +1 -1
  48. package/dist/cjs/helpers/getYearOptions.d.ts +1 -1
  49. package/dist/cjs/index.d.ts +1 -2
  50. package/dist/cjs/index.js +3 -4
  51. package/dist/cjs/index.js.map +1 -1
  52. package/dist/cjs/labels/labelDayButton.d.ts +2 -4
  53. package/dist/cjs/labels/labelDayButton.js +3 -5
  54. package/dist/cjs/labels/labelDayButton.js.map +1 -1
  55. package/dist/cjs/labels/labelGrid.d.ts +2 -4
  56. package/dist/cjs/labels/labelGrid.js +3 -5
  57. package/dist/cjs/labels/labelGrid.js.map +1 -1
  58. package/dist/cjs/labels/labelGridcell.d.ts +2 -5
  59. package/dist/cjs/labels/labelGridcell.js +3 -5
  60. package/dist/cjs/labels/labelGridcell.js.map +1 -1
  61. package/dist/cjs/labels/labelMonthDropdown.d.ts +2 -2
  62. package/dist/cjs/labels/labelMonthDropdown.js.map +1 -1
  63. package/dist/cjs/labels/labelWeekNumber.d.ts +2 -2
  64. package/dist/cjs/labels/labelWeekNumber.js.map +1 -1
  65. package/dist/cjs/labels/labelWeekNumberHeader.d.ts +2 -2
  66. package/dist/cjs/labels/labelWeekNumberHeader.js.map +1 -1
  67. package/dist/cjs/labels/labelWeekday.d.ts +2 -4
  68. package/dist/cjs/labels/labelWeekday.js +3 -5
  69. package/dist/cjs/labels/labelWeekday.js.map +1 -1
  70. package/dist/cjs/labels/labelYearDropdown.d.ts +2 -2
  71. package/dist/cjs/labels/labelYearDropdown.js.map +1 -1
  72. package/dist/cjs/selection/useMulti.d.ts +1 -1
  73. package/dist/cjs/selection/useMulti.js.map +1 -1
  74. package/dist/cjs/selection/useRange.d.ts +1 -1
  75. package/dist/cjs/selection/useRange.js.map +1 -1
  76. package/dist/cjs/selection/useSingle.d.ts +1 -1
  77. package/dist/cjs/selection/useSingle.js.map +1 -1
  78. package/dist/cjs/types/props.d.ts +4 -8
  79. package/dist/cjs/useCalendar.d.ts +2 -3
  80. package/dist/cjs/useCalendar.js.map +1 -1
  81. package/dist/cjs/useFocus.d.ts +1 -2
  82. package/dist/cjs/useFocus.js.map +1 -1
  83. package/dist/cjs/useGetModifiers.d.ts +1 -2
  84. package/dist/cjs/useGetModifiers.js.map +1 -1
  85. package/dist/cjs/useSelection.d.ts +1 -1
  86. package/dist/cjs/utils/addToRange.d.ts +1 -1
  87. package/dist/cjs/utils/addToRange.js +2 -2
  88. package/dist/cjs/utils/addToRange.js.map +1 -1
  89. package/dist/cjs/utils/dateMatchModifiers.d.ts +1 -1
  90. package/dist/cjs/utils/dateMatchModifiers.js +2 -2
  91. package/dist/cjs/utils/dateMatchModifiers.js.map +1 -1
  92. package/dist/cjs/utils/rangeIncludesDate.d.ts +1 -4
  93. package/dist/cjs/utils/rangeIncludesDate.js +3 -5
  94. package/dist/cjs/utils/rangeIncludesDate.js.map +1 -1
  95. package/dist/cjs/utils/typeguards.d.ts +1 -1
  96. package/dist/esm/DayPicker.js +34 -29
  97. package/dist/esm/DayPicker.js.map +1 -1
  98. package/dist/esm/classes/CalendarDay.d.ts +2 -4
  99. package/dist/esm/classes/CalendarDay.js +2 -4
  100. package/dist/esm/classes/CalendarDay.js.map +1 -1
  101. package/dist/esm/classes/DateLib.d.ts +268 -0
  102. package/dist/esm/classes/DateLib.js +355 -0
  103. package/dist/esm/classes/DateLib.js.map +1 -0
  104. package/dist/esm/classes/index.d.ts +1 -0
  105. package/dist/esm/classes/index.js +1 -0
  106. package/dist/esm/classes/index.js.map +1 -1
  107. package/dist/esm/formatters/formatCaption.d.ts +2 -4
  108. package/dist/esm/formatters/formatCaption.js +3 -5
  109. package/dist/esm/formatters/formatCaption.js.map +1 -1
  110. package/dist/esm/formatters/formatDay.d.ts +2 -4
  111. package/dist/esm/formatters/formatDay.js +3 -5
  112. package/dist/esm/formatters/formatDay.js.map +1 -1
  113. package/dist/esm/formatters/formatMonthDropdown.d.ts +1 -1
  114. package/dist/esm/formatters/formatMonthDropdown.js +2 -2
  115. package/dist/esm/formatters/formatMonthDropdown.js.map +1 -1
  116. package/dist/esm/formatters/formatWeekdayName.d.ts +2 -4
  117. package/dist/esm/formatters/formatWeekdayName.js +3 -5
  118. package/dist/esm/formatters/formatWeekdayName.js.map +1 -1
  119. package/dist/esm/helpers/getDates.d.ts +3 -2
  120. package/dist/esm/helpers/getDates.js +3 -9
  121. package/dist/esm/helpers/getDates.js.map +1 -1
  122. package/dist/esm/helpers/getDisplayMonths.d.ts +1 -1
  123. package/dist/esm/helpers/getFocusableDate.d.ts +2 -2
  124. package/dist/esm/helpers/getFocusableDate.js +3 -5
  125. package/dist/esm/helpers/getFocusableDate.js.map +1 -1
  126. package/dist/esm/helpers/getInitialMonth.d.ts +2 -1
  127. package/dist/esm/helpers/getInitialMonth.js.map +1 -1
  128. package/dist/esm/helpers/getMonthOptions.d.ts +2 -2
  129. package/dist/esm/helpers/getMonthOptions.js +2 -2
  130. package/dist/esm/helpers/getMonthOptions.js.map +1 -1
  131. package/dist/esm/helpers/getMonths.d.ts +2 -2
  132. package/dist/esm/helpers/getMonths.js +3 -15
  133. package/dist/esm/helpers/getMonths.js.map +1 -1
  134. package/dist/esm/helpers/getNavMonth.d.ts +2 -2
  135. package/dist/esm/helpers/getNavMonth.js.map +1 -1
  136. package/dist/esm/helpers/getNextFocus.d.ts +2 -2
  137. package/dist/esm/helpers/getNextFocus.js.map +1 -1
  138. package/dist/esm/helpers/getNextMonth.d.ts +1 -1
  139. package/dist/esm/helpers/getPreviousMonth.d.ts +1 -1
  140. package/dist/esm/helpers/getWeekdays.d.ts +5 -7
  141. package/dist/esm/helpers/getWeekdays.js +5 -8
  142. package/dist/esm/helpers/getWeekdays.js.map +1 -1
  143. package/dist/esm/helpers/getYearOptions.d.ts +1 -1
  144. package/dist/esm/index.d.ts +1 -2
  145. package/dist/esm/index.js +1 -2
  146. package/dist/esm/index.js.map +1 -1
  147. package/dist/esm/labels/labelDayButton.d.ts +2 -4
  148. package/dist/esm/labels/labelDayButton.js +3 -5
  149. package/dist/esm/labels/labelDayButton.js.map +1 -1
  150. package/dist/esm/labels/labelGrid.d.ts +2 -4
  151. package/dist/esm/labels/labelGrid.js +3 -5
  152. package/dist/esm/labels/labelGrid.js.map +1 -1
  153. package/dist/esm/labels/labelGridcell.d.ts +2 -5
  154. package/dist/esm/labels/labelGridcell.js +3 -5
  155. package/dist/esm/labels/labelGridcell.js.map +1 -1
  156. package/dist/esm/labels/labelMonthDropdown.d.ts +2 -2
  157. package/dist/esm/labels/labelMonthDropdown.js.map +1 -1
  158. package/dist/esm/labels/labelWeekNumber.d.ts +2 -2
  159. package/dist/esm/labels/labelWeekNumber.js.map +1 -1
  160. package/dist/esm/labels/labelWeekNumberHeader.d.ts +2 -2
  161. package/dist/esm/labels/labelWeekNumberHeader.js.map +1 -1
  162. package/dist/esm/labels/labelWeekday.d.ts +2 -4
  163. package/dist/esm/labels/labelWeekday.js +3 -5
  164. package/dist/esm/labels/labelWeekday.js.map +1 -1
  165. package/dist/esm/labels/labelYearDropdown.d.ts +2 -2
  166. package/dist/esm/labels/labelYearDropdown.js.map +1 -1
  167. package/dist/esm/selection/useMulti.d.ts +1 -1
  168. package/dist/esm/selection/useMulti.js.map +1 -1
  169. package/dist/esm/selection/useRange.d.ts +1 -1
  170. package/dist/esm/selection/useRange.js.map +1 -1
  171. package/dist/esm/selection/useSingle.d.ts +1 -1
  172. package/dist/esm/selection/useSingle.js.map +1 -1
  173. package/dist/esm/types/props.d.ts +4 -8
  174. package/dist/esm/useCalendar.d.ts +2 -3
  175. package/dist/esm/useCalendar.js.map +1 -1
  176. package/dist/esm/useFocus.d.ts +1 -2
  177. package/dist/esm/useFocus.js.map +1 -1
  178. package/dist/esm/useGetModifiers.d.ts +1 -2
  179. package/dist/esm/useGetModifiers.js.map +1 -1
  180. package/dist/esm/useSelection.d.ts +1 -1
  181. package/dist/esm/utils/addToRange.d.ts +1 -1
  182. package/dist/esm/utils/addToRange.js +1 -1
  183. package/dist/esm/utils/addToRange.js.map +1 -1
  184. package/dist/esm/utils/dateMatchModifiers.d.ts +1 -1
  185. package/dist/esm/utils/dateMatchModifiers.js +1 -1
  186. package/dist/esm/utils/dateMatchModifiers.js.map +1 -1
  187. package/dist/esm/utils/rangeIncludesDate.d.ts +1 -4
  188. package/dist/esm/utils/rangeIncludesDate.js +2 -4
  189. package/dist/esm/utils/rangeIncludesDate.js.map +1 -1
  190. package/dist/esm/utils/typeguards.d.ts +1 -1
  191. package/examples/Formatters.tsx +2 -2
  192. package/examples/NumberingSystem.tsx +5 -2
  193. package/examples/RangeLong.tsx +22 -0
  194. package/examples/TestCase2511.test.tsx +14 -0
  195. package/examples/TestCase2511.tsx +19 -0
  196. package/examples/Utc.tsx +2 -3
  197. package/examples/index.ts +2 -0
  198. package/jalali.d.ts +1 -0
  199. package/jalali.js +4 -0
  200. package/locale.d.ts +1 -0
  201. package/locale.js +4 -0
  202. package/package.json +104 -84
  203. package/src/DayPicker.tsx +48 -53
  204. package/src/classes/CalendarDay.ts +1 -3
  205. package/src/classes/DateLib.ts +478 -0
  206. package/src/classes/index.ts +1 -0
  207. package/src/formatters/formatCaption.test.ts +12 -4
  208. package/src/formatters/formatCaption.ts +4 -9
  209. package/src/formatters/formatDay.ts +4 -6
  210. package/src/formatters/formatMonthDropdown.ts +3 -3
  211. package/src/formatters/formatWeekdayName.ts +4 -6
  212. package/src/helpers/getDates.test.ts +29 -20
  213. package/src/helpers/getDates.ts +6 -14
  214. package/src/helpers/getDisplayMonths.test.ts +4 -4
  215. package/src/helpers/getDisplayMonths.ts +1 -1
  216. package/src/helpers/getFocusableDate.ts +5 -8
  217. package/src/helpers/getFormatters.test.ts +9 -5
  218. package/src/helpers/getInitialMonth.test.ts +7 -6
  219. package/src/helpers/getInitialMonth.ts +2 -1
  220. package/src/helpers/getMonthOptions.test.ts +3 -4
  221. package/src/helpers/getMonthOptions.ts +2 -3
  222. package/src/helpers/getMonths.test.ts +7 -10
  223. package/src/helpers/getMonths.ts +5 -26
  224. package/src/helpers/getNavMonth.test.ts +9 -9
  225. package/src/helpers/getNavMonth.ts +1 -2
  226. package/src/helpers/getNextFocus.test.tsx +11 -12
  227. package/src/helpers/getNextFocus.tsx +2 -8
  228. package/src/helpers/getNextMonth.test.ts +9 -8
  229. package/src/helpers/getNextMonth.ts +1 -1
  230. package/src/helpers/getPossibleFocusDate.test.ts +6 -5
  231. package/src/helpers/getPreviousMonth.test.ts +7 -7
  232. package/src/helpers/getPreviousMonth.ts +1 -1
  233. package/src/helpers/getWeekdays.test.ts +8 -4
  234. package/src/helpers/getWeekdays.ts +6 -10
  235. package/src/helpers/getYearOptions.test.ts +4 -4
  236. package/src/helpers/getYearOptions.ts +1 -1
  237. package/src/index.ts +1 -3
  238. package/src/labels/labelDayButton.ts +4 -6
  239. package/src/labels/labelGrid.ts +4 -6
  240. package/src/labels/labelGridcell.ts +4 -7
  241. package/src/labels/labelMonthDropdown.ts +2 -2
  242. package/src/labels/labelWeekNumber.ts +2 -2
  243. package/src/labels/labelWeekNumberHeader.ts +2 -2
  244. package/src/labels/labelWeekday.ts +4 -6
  245. package/src/labels/labelYearDropdown.ts +2 -2
  246. package/src/selection/useMulti.test.tsx +3 -4
  247. package/src/selection/useMulti.tsx +1 -1
  248. package/src/selection/useRange.test.tsx +8 -8
  249. package/src/selection/useRange.tsx +1 -1
  250. package/src/selection/useSingle.test.tsx +3 -4
  251. package/src/selection/useSingle.tsx +1 -1
  252. package/src/style.css +2 -2
  253. package/src/style.module.css.d.ts +29 -0
  254. package/src/types/props.ts +4 -8
  255. package/src/useCalendar.ts +2 -3
  256. package/src/useFocus.ts +1 -2
  257. package/src/useGetModifiers.tsx +1 -2
  258. package/src/useSelection.ts +1 -1
  259. package/src/utils/addToRange.ts +1 -1
  260. package/src/utils/dateMatchModifiers.test.ts +21 -13
  261. package/src/utils/dateMatchModifiers.ts +1 -1
  262. package/src/utils/rangeIncludesDate.ts +2 -3
  263. package/src/utils/typeguards.test.ts +5 -5
  264. package/src/utils/typeguards.ts +1 -1
  265. package/website/docs/docs/styling.mdx +2 -2
  266. package/dist/cjs/helpers/getDateLib.d.ts +0 -3
  267. package/dist/cjs/helpers/getDateLib.js +0 -11
  268. package/dist/cjs/helpers/getDateLib.js.map +0 -1
  269. package/dist/cjs/lib/dateLib.d.ts +0 -138
  270. package/dist/cjs/lib/dateLib.js +0 -68
  271. package/dist/cjs/lib/dateLib.js.map +0 -1
  272. package/dist/cjs/lib/index.d.ts +0 -2
  273. package/dist/cjs/lib/index.js +0 -21
  274. package/dist/cjs/lib/index.js.map +0 -1
  275. package/dist/cjs/lib/locales.d.ts +0 -1
  276. package/dist/cjs/lib/locales.js +0 -6
  277. package/dist/cjs/lib/locales.js.map +0 -1
  278. package/dist/esm/helpers/getDateLib.d.ts +0 -3
  279. package/dist/esm/helpers/getDateLib.js +0 -8
  280. package/dist/esm/helpers/getDateLib.js.map +0 -1
  281. package/dist/esm/lib/dateLib.d.ts +0 -138
  282. package/dist/esm/lib/dateLib.js +0 -65
  283. package/dist/esm/lib/dateLib.js.map +0 -1
  284. package/dist/esm/lib/index.d.ts +0 -2
  285. package/dist/esm/lib/index.js +0 -3
  286. package/dist/esm/lib/index.js.map +0 -1
  287. package/dist/esm/lib/locales.d.ts +0 -1
  288. package/dist/esm/lib/locales.js +0 -2
  289. package/dist/esm/lib/locales.js.map +0 -1
  290. package/src/helpers/getDateLib.ts +0 -9
  291. package/src/lib/dateLib.ts +0 -175
  292. package/src/lib/index.ts +0 -2
  293. package/src/lib/locales.ts +0 -1
  294. package/src/style.css.d.ts +0 -38
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
 
3
3
  import type { DeprecatedUI } from "../UI.js";
4
- import type { Locale, DateLib } from "../lib/dateLib.js";
4
+ import type { Locale, DateLib } from "../classes/DateLib.js";
5
5
 
6
6
  import type {
7
7
  ClassNames,
@@ -247,10 +247,6 @@ export interface PropsBase {
247
247
  * Use ISO week dates instead of the locale setting. Setting this prop will
248
248
  * ignore `weekStartsOn` and `firstWeekContainsDate`.
249
249
  *
250
- * Use the
251
- * [react-day-picker/utc](https://daypicker.dev/docs/localization#utc-dates)
252
- * to set the calendar to UTC.
253
- *
254
250
  * @see https://daypicker.dev/docs/localization#iso-week-dates
255
251
  * @see https://en.wikipedia.org/wiki/ISO_week_date
256
252
  */
@@ -435,13 +431,13 @@ export interface PropsBase {
435
431
  onDayMouseLeave?: DayEventHandler<React.MouseEvent>;
436
432
 
437
433
  /**
438
- * Replace the default date library with a custom one.
434
+ * Replace the default date library with a custom one. Experimental: not
435
+ * guaranteed to be stable (may not respect semver).
439
436
  *
440
- * @private
441
437
  * @since 9.0.0
442
438
  * @experimental
443
439
  */
444
- dateLib?: Partial<DateLib> | undefined;
440
+ dateLib?: Partial<typeof DateLib.prototype> | undefined;
445
441
 
446
442
  /**
447
443
  * @private
@@ -3,7 +3,8 @@ import { useEffect } from "react";
3
3
  import type {
4
4
  CalendarWeek,
5
5
  CalendarDay,
6
- CalendarMonth
6
+ CalendarMonth,
7
+ DateLib
7
8
  } from "./classes/index.js";
8
9
  import { getDates } from "./helpers/getDates.js";
9
10
  import { getDays } from "./helpers/getDays.js";
@@ -15,7 +16,6 @@ import { getNextMonth } from "./helpers/getNextMonth.js";
15
16
  import { getPreviousMonth } from "./helpers/getPreviousMonth.js";
16
17
  import { getWeeks } from "./helpers/getWeeks.js";
17
18
  import { useControlledValue } from "./helpers/useControlledValue.js";
18
- import type { DateLib } from "./lib/index.js";
19
19
  import type { DayPickerProps } from "./types/props.js";
20
20
 
21
21
  /**
@@ -75,7 +75,6 @@ export function useCalendar(
75
75
  | "today"
76
76
  | "fixedWeeks"
77
77
  | "ISOWeek"
78
- | "weekStartsOn"
79
78
  | "numberOfMonths"
80
79
  | "disableNavigation"
81
80
  | "onMonthChange"
package/src/useFocus.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import { useState } from "react";
2
2
 
3
- import type { CalendarDay } from "./classes/index.js";
3
+ import type { CalendarDay, DateLib } from "./classes/index.js";
4
4
  import { calculateFocusTarget } from "./helpers/calculateFocusTarget.js";
5
5
  import { getNextFocus } from "./helpers/getNextFocus.js";
6
- import type { DateLib } from "./lib/index.js";
7
6
  import type {
8
7
  MoveFocusBy,
9
8
  MoveFocusDir,
@@ -1,8 +1,7 @@
1
1
  import { TZDate } from "@date-fns/tz";
2
2
 
3
3
  import { DayFlag, SelectionState } from "./UI.js";
4
- import { CalendarDay } from "./classes/index.js";
5
- import type { DateLib } from "./lib/index.js";
4
+ import type { CalendarDay, DateLib } from "./classes/index.js";
6
5
  import type { DayPickerProps, Modifiers } from "./types/index.js";
7
6
  import { dateMatchModifiers } from "./utils/dateMatchModifiers.js";
8
7
 
@@ -1,4 +1,4 @@
1
- import { type DateLib } from "./lib/index.js";
1
+ import { type DateLib } from "./classes/DateLib.js";
2
2
  import { useMulti } from "./selection/useMulti.js";
3
3
  import { useRange } from "./selection/useRange.js";
4
4
  import { useSingle } from "./selection/useSingle.js";
@@ -1,4 +1,4 @@
1
- import { dateLib as defaultDateLib, type DateLib } from "../lib/index.js";
1
+ import { defaultDateLib, type DateLib } from "../classes/DateLib.js";
2
2
  import type { DateRange } from "../types/index.js";
3
3
 
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  import { addDays, subDays } from "date-fns";
2
2
 
3
- import { dateLib } from "../lib";
3
+ import { defaultDateLib } from "../classes/DateLib";
4
4
  import {
5
5
  DateAfter,
6
6
  DateBefore,
@@ -15,14 +15,14 @@ const testDay = new Date();
15
15
 
16
16
  describe("when the matcher is a boolean", () => {
17
17
  const matcher = true;
18
- const result = dateMatchModifiers(testDay, [matcher], dateLib);
18
+ const result = dateMatchModifiers(testDay, [matcher], defaultDateLib);
19
19
  test("should return the boolean", () => {
20
20
  expect(result).toBe(matcher);
21
21
  });
22
22
  });
23
23
  describe("when matching the same day", () => {
24
24
  const matcher = testDay;
25
- const result = dateMatchModifiers(testDay, [matcher], dateLib);
25
+ const result = dateMatchModifiers(testDay, [matcher], defaultDateLib);
26
26
  test("should return true", () => {
27
27
  expect(result).toBe(true);
28
28
  });
@@ -30,7 +30,7 @@ describe("when matching the same day", () => {
30
30
 
31
31
  describe("when matching an array of dates including the day", () => {
32
32
  const matcher = [addDays(testDay, -1), testDay, addDays(testDay, 1)];
33
- const result = dateMatchModifiers(testDay, [matcher], dateLib);
33
+ const result = dateMatchModifiers(testDay, [matcher], defaultDateLib);
34
34
  test("should return true", () => {
35
35
  expect(result).toBe(true);
36
36
  });
@@ -41,7 +41,7 @@ describe("when matching date range", () => {
41
41
  from: testDay,
42
42
  to: addDays(testDay, 1)
43
43
  };
44
- const result = dateMatchModifiers(testDay, [matcher], dateLib);
44
+ const result = dateMatchModifiers(testDay, [matcher], defaultDateLib);
45
45
  test("should return true", () => {
46
46
  expect(result).toBe(true);
47
47
  });
@@ -51,7 +51,7 @@ describe("when matching the day of week", () => {
51
51
  const matcher: DayOfWeek = {
52
52
  dayOfWeek: [testDay.getDay()]
53
53
  };
54
- const result = dateMatchModifiers(testDay, [matcher], dateLib);
54
+ const result = dateMatchModifiers(testDay, [matcher], defaultDateLib);
55
55
  test("should return true", () => {
56
56
  expect(result).toBe(true);
57
57
  });
@@ -62,7 +62,7 @@ describe("when matching date interval (closed)", () => {
62
62
  before: addDays(testDay, 5),
63
63
  after: subDays(testDay, 3)
64
64
  };
65
- const result = dateMatchModifiers(testDay, [matcher], dateLib);
65
+ const result = dateMatchModifiers(testDay, [matcher], defaultDateLib);
66
66
  test("should return true for the included day", () => {
67
67
  expect(result).toBe(true);
68
68
  });
@@ -74,22 +74,30 @@ describe("when matching date interval (open)", () => {
74
74
  after: addDays(testDay, 5)
75
75
  };
76
76
  test("should return false", () => {
77
- const result = dateMatchModifiers(testDay, [matcher], dateLib);
77
+ const result = dateMatchModifiers(testDay, [matcher], defaultDateLib);
78
78
  expect(result).toBe(false);
79
79
  });
80
80
  test("should return true for the days before", () => {
81
- const result = dateMatchModifiers(subDays(testDay, 8), [matcher], dateLib);
81
+ const result = dateMatchModifiers(
82
+ subDays(testDay, 8),
83
+ [matcher],
84
+ defaultDateLib
85
+ );
82
86
  expect(result).toBe(true);
83
87
  });
84
88
  test("should return true for the days after", () => {
85
- const result = dateMatchModifiers(addDays(testDay, 8), [matcher], dateLib);
89
+ const result = dateMatchModifiers(
90
+ addDays(testDay, 8),
91
+ [matcher],
92
+ defaultDateLib
93
+ );
86
94
  expect(result).toBe(true);
87
95
  });
88
96
  });
89
97
 
90
98
  describe("when matching the date after", () => {
91
99
  const matcher: DateAfter = { after: addDays(testDay, -1) };
92
- const result = dateMatchModifiers(testDay, [matcher], dateLib);
100
+ const result = dateMatchModifiers(testDay, [matcher], defaultDateLib);
93
101
  test("should return true", () => {
94
102
  expect(result).toBe(true);
95
103
  });
@@ -97,7 +105,7 @@ describe("when matching the date after", () => {
97
105
 
98
106
  describe("when matching the date before", () => {
99
107
  const matcher: DateBefore = { before: addDays(testDay, +1) };
100
- const result = dateMatchModifiers(testDay, [matcher], dateLib);
108
+ const result = dateMatchModifiers(testDay, [matcher], defaultDateLib);
101
109
  test("should return true", () => {
102
110
  expect(result).toBe(true);
103
111
  });
@@ -105,7 +113,7 @@ describe("when matching the date before", () => {
105
113
 
106
114
  describe("when the matcher is a function", () => {
107
115
  const matcher = () => true;
108
- const result = dateMatchModifiers(testDay, [matcher], dateLib);
116
+ const result = dateMatchModifiers(testDay, [matcher], defaultDateLib);
109
117
  test("should return the result of the function", () => {
110
118
  expect(result).toBe(true);
111
119
  });
@@ -1,4 +1,4 @@
1
- import { dateLib as defaultDateLib, type DateLib } from "../lib/dateLib.js";
1
+ import { type DateLib, defaultDateLib } from "../classes/DateLib.js";
2
2
  import type { Matcher } from "../types/index.js";
3
3
 
4
4
  import { rangeIncludesDate } from "./rangeIncludesDate.js";
@@ -1,4 +1,4 @@
1
- import { dateLib as defaultDateLib, type DateLib } from "../lib/index.js";
1
+ import { defaultDateLib } from "../classes/index.js";
2
2
  import type { DateRange } from "../types/index.js";
3
3
 
4
4
  /**
@@ -12,8 +12,7 @@ export function rangeIncludesDate(
12
12
  date: Date,
13
13
  /** If `true`, the ends of the range are excluded. */
14
14
  excludeEnds = false,
15
- /** @ignore */
16
- dateLib: DateLib = defaultDateLib
15
+ dateLib = defaultDateLib
17
16
  ): boolean {
18
17
  let { from, to } = range;
19
18
  const { differenceInCalendarDays, isSameDay } = dateLib;
@@ -1,4 +1,4 @@
1
- import { dateLib } from "../lib/dateLib.js";
1
+ import { defaultDateLib } from "../classes/DateLib.js";
2
2
  import type {
3
3
  DateInterval,
4
4
  DateRange,
@@ -73,11 +73,11 @@ test("isDayOfWeekType return false for invalid DayOfWeek", () => {
73
73
 
74
74
  test("isDatesArray return true for valid array of dates", () => {
75
75
  const validDatesArray: Date[] = [new Date(), new Date()];
76
- expect(isDatesArray(validDatesArray, dateLib)).toBe(true);
76
+ expect(isDatesArray(validDatesArray, defaultDateLib)).toBe(true);
77
77
  });
78
78
 
79
79
  test("isDatesArray return false for invalid array of dates", () => {
80
- expect(isDatesArray([{}, {}], dateLib)).toBe(false);
81
- expect(isDatesArray(null, dateLib)).toBe(false);
82
- expect(isDatesArray(undefined, dateLib)).toBe(false);
80
+ expect(isDatesArray([{}, {}], defaultDateLib)).toBe(false);
81
+ expect(isDatesArray(null, defaultDateLib)).toBe(false);
82
+ expect(isDatesArray(undefined, defaultDateLib)).toBe(false);
83
83
  });
@@ -1,4 +1,4 @@
1
- import type { DateLib } from "../lib/index.js";
1
+ import type { DateLib } from "../classes/DateLib.js";
2
2
  import type {
3
3
  DateAfter,
4
4
  DateBefore,
@@ -26,7 +26,7 @@ import "react-day-picker/style.css";
26
26
  <details>
27
27
  <summary>Copying the CSS file</summary>
28
28
 
29
- If you are not using a bundler, you can copy the CSS file to your project. See the [style.css](https://github.com/gpbl/react-day-picker/blob/main/src/style.css) file in the DayPicker repository for the source.
29
+ If you are not using a bundler, you can copy the CSS file to your project. See the [style.css](https://github.com/gpbl/react-day-picker/blob/main/style.css) file in the DayPicker repository for the source.
30
30
 
31
31
  ```html title="./public/index.html"
32
32
  <style>
@@ -152,7 +152,7 @@ If you are including [Tailwind CSS](https://tailwindcss.com) in your project, us
152
152
 
153
153
  - Add the class names you want to override to the `classNames` prop.
154
154
  - Extend the default class names with [`getDefaultClassNames`](../api/functions/getDefaultClassNames.md).
155
- - Read the [`style.css`](https://github.com/gpbl/react-day-picker/blob/main/src/style.css) file from the source and get familiar with the [UI elements](../docs/anatomy.mdx).
155
+ - Read the [`style.css`](https://github.com/gpbl/react-day-picker/blob/main/style.css) file from the source and get familiar with the [UI elements](../docs/anatomy.mdx).
156
156
  - Adopt [custom components](../guides/custom-components.mdx) to further customize the HTML elements.
157
157
 
158
158
  ```tsx
@@ -1,3 +0,0 @@
1
- import { type DateLib } from "../lib/dateLib.js";
2
- import type { DayPickerProps } from "../types/index.js";
3
- export declare function getDateLib(customLib: DayPickerProps["dateLib"]): DateLib;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDateLib = getDateLib;
4
- const dateLib_js_1 = require("../lib/dateLib.js");
5
- function getDateLib(customLib) {
6
- return {
7
- ...dateLib_js_1.dateLib,
8
- ...customLib
9
- };
10
- }
11
- //# sourceMappingURL=getDateLib.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDateLib.js","sourceRoot":"","sources":["../../../src/helpers/getDateLib.ts"],"names":[],"mappings":";;AAGA,gCAKC;AARD,kDAA0D;AAG1D,SAAgB,UAAU,CAAC,SAAoC;IAC7D,OAAO;QACL,GAAG,oBAAO;QACV,GAAG,SAAS;KACb,CAAC;AACJ,CAAC"}
@@ -1,138 +0,0 @@
1
- import type { FormatOptions as DateFnsFormatOptions, Locale as DateFnsLocale } from "date-fns";
2
- import { addDays } from "date-fns/addDays";
3
- import { addMonths } from "date-fns/addMonths";
4
- import { addWeeks } from "date-fns/addWeeks";
5
- import { addYears } from "date-fns/addYears";
6
- import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays";
7
- import { differenceInCalendarMonths } from "date-fns/differenceInCalendarMonths";
8
- import { endOfISOWeek } from "date-fns/endOfISOWeek";
9
- import { endOfMonth } from "date-fns/endOfMonth";
10
- import { endOfWeek } from "date-fns/endOfWeek";
11
- import { endOfYear } from "date-fns/endOfYear";
12
- import { format } from "date-fns/format";
13
- import { getISOWeek } from "date-fns/getISOWeek";
14
- import { getWeek } from "date-fns/getWeek";
15
- import { isAfter } from "date-fns/isAfter";
16
- import { isBefore } from "date-fns/isBefore";
17
- import { isDate } from "date-fns/isDate";
18
- import { isSameDay } from "date-fns/isSameDay";
19
- import { isSameMonth } from "date-fns/isSameMonth";
20
- import { isSameYear } from "date-fns/isSameYear";
21
- import { max } from "date-fns/max";
22
- import { min } from "date-fns/min";
23
- import { setMonth } from "date-fns/setMonth";
24
- import { setYear } from "date-fns/setYear";
25
- import { startOfDay } from "date-fns/startOfDay";
26
- import { startOfISOWeek } from "date-fns/startOfISOWeek";
27
- import { startOfMonth } from "date-fns/startOfMonth";
28
- import { startOfWeek } from "date-fns/startOfWeek";
29
- import { startOfYear } from "date-fns/startOfYear";
30
- /** The options for the {@link Formatters}. */
31
- export type FormatOptions = DateFnsFormatOptions;
32
- /** The options for the {@link Labels}. */
33
- export type LabelOptions = DateFnsFormatOptions;
34
- /** The locale used within DayPicker. */
35
- export type Locale = DateFnsLocale;
36
- export type { Month as DateFnsMonth } from "date-fns";
37
- /**
38
- * The date library used by DayPicker. It's a subset of the date-fns functions
39
- * plus an optional Date constructor.
40
- *
41
- * Override the default date library with the `dateLib` prop.
42
- */
43
- export type DateLib = {
44
- /** The constructor of the date object. */
45
- Date?: DateConstructor | undefined;
46
- /** Adds the specified number of days to the given date. */
47
- addDays: typeof addDays;
48
- /** Adds the specified number of months to the given date. */
49
- addMonths: typeof addMonths;
50
- /** Adds the specified number of weeks to the given date. */
51
- addWeeks: typeof addWeeks;
52
- /** Adds the specified number of years to the given date. */
53
- addYears: typeof addYears;
54
- /** Returns the number of calendar days between the given dates. */
55
- differenceInCalendarDays: typeof differenceInCalendarDays;
56
- /** Returns the number of calendar months between the given dates. */
57
- differenceInCalendarMonths: typeof differenceInCalendarMonths;
58
- /** Returns the end of an ISO week for the given date. */
59
- endOfISOWeek: typeof endOfISOWeek;
60
- /** Returns the end of the month for the given date. */
61
- endOfMonth: typeof endOfMonth;
62
- /** Returns the end of the week for the given date. */
63
- endOfWeek: typeof endOfWeek;
64
- /** Returns the end of the year for the given date. */
65
- endOfYear: typeof endOfYear;
66
- /** Formats the given date using the specified format string. */
67
- format: typeof format;
68
- /** Returns the ISO week number for the given date. */
69
- getISOWeek: typeof getISOWeek;
70
- /** Returns the week number for the given date. */
71
- getWeek: typeof getWeek;
72
- /** Checks if the first date is after the second date. */
73
- isAfter: typeof isAfter;
74
- /** Checks if the first date is before the second date. */
75
- isBefore: typeof isBefore;
76
- /** Checks if the given value is a date. */
77
- isDate: typeof isDate;
78
- /** Checks if the given dates are the same day. */
79
- isSameDay: typeof isSameDay;
80
- /** Checks if the given dates are in the same month. */
81
- isSameMonth: typeof isSameMonth;
82
- /** Checks if the given dates are in the same year. */
83
- isSameYear: typeof isSameYear;
84
- /** Returns the maximum of the given dates. */
85
- max: typeof max;
86
- /** Returns the minimum of the given dates. */
87
- min: typeof min;
88
- /** Sets the month for the given date. */
89
- setMonth: typeof setMonth;
90
- /** Sets the year for the given date. */
91
- setYear: typeof setYear;
92
- /** Returns the start of the day for the given date. */
93
- startOfDay: typeof startOfDay;
94
- /** Returns the start of an ISO week for the given date. */
95
- startOfISOWeek: typeof startOfISOWeek;
96
- /** Returns the start of the month for the given date. */
97
- startOfMonth: typeof startOfMonth;
98
- /** Returns the start of the week for the given date. */
99
- startOfWeek: typeof startOfWeek;
100
- /** Returns the start of the year for the given date. */
101
- startOfYear: typeof startOfYear;
102
- };
103
- /**
104
- * The default date library to use with the date picker.
105
- *
106
- * @private
107
- * @internal
108
- */
109
- export declare const dateLib: {
110
- addDays: typeof addDays;
111
- addMonths: typeof addMonths;
112
- addWeeks: typeof addWeeks;
113
- addYears: typeof addYears;
114
- differenceInCalendarDays: typeof differenceInCalendarDays;
115
- differenceInCalendarMonths: typeof differenceInCalendarMonths;
116
- endOfISOWeek: typeof endOfISOWeek;
117
- endOfMonth: typeof endOfMonth;
118
- endOfWeek: typeof endOfWeek;
119
- endOfYear: typeof endOfYear;
120
- format: typeof format;
121
- getISOWeek: typeof getISOWeek;
122
- getWeek: typeof getWeek;
123
- isAfter: typeof isAfter;
124
- isBefore: typeof isBefore;
125
- isDate: typeof isDate;
126
- isSameDay: typeof isSameDay;
127
- isSameMonth: typeof isSameMonth;
128
- isSameYear: typeof isSameYear;
129
- max: typeof max;
130
- min: typeof min;
131
- setMonth: typeof setMonth;
132
- setYear: typeof setYear;
133
- startOfDay: typeof startOfDay;
134
- startOfISOWeek: typeof startOfISOWeek;
135
- startOfMonth: typeof startOfMonth;
136
- startOfWeek: typeof startOfWeek;
137
- startOfYear: typeof startOfYear;
138
- };
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dateLib = void 0;
4
- const addDays_1 = require("date-fns/addDays");
5
- const addMonths_1 = require("date-fns/addMonths");
6
- const addWeeks_1 = require("date-fns/addWeeks");
7
- const addYears_1 = require("date-fns/addYears");
8
- const differenceInCalendarDays_1 = require("date-fns/differenceInCalendarDays");
9
- const differenceInCalendarMonths_1 = require("date-fns/differenceInCalendarMonths");
10
- const endOfISOWeek_1 = require("date-fns/endOfISOWeek");
11
- const endOfMonth_1 = require("date-fns/endOfMonth");
12
- const endOfWeek_1 = require("date-fns/endOfWeek");
13
- const endOfYear_1 = require("date-fns/endOfYear");
14
- const format_1 = require("date-fns/format");
15
- const getISOWeek_1 = require("date-fns/getISOWeek");
16
- const getWeek_1 = require("date-fns/getWeek");
17
- const isAfter_1 = require("date-fns/isAfter");
18
- const isBefore_1 = require("date-fns/isBefore");
19
- const isDate_1 = require("date-fns/isDate");
20
- const isSameDay_1 = require("date-fns/isSameDay");
21
- const isSameMonth_1 = require("date-fns/isSameMonth");
22
- const isSameYear_1 = require("date-fns/isSameYear");
23
- const max_1 = require("date-fns/max");
24
- const min_1 = require("date-fns/min");
25
- const setMonth_1 = require("date-fns/setMonth");
26
- const setYear_1 = require("date-fns/setYear");
27
- const startOfDay_1 = require("date-fns/startOfDay");
28
- const startOfISOWeek_1 = require("date-fns/startOfISOWeek");
29
- const startOfMonth_1 = require("date-fns/startOfMonth");
30
- const startOfWeek_1 = require("date-fns/startOfWeek");
31
- const startOfYear_1 = require("date-fns/startOfYear");
32
- /**
33
- * The default date library to use with the date picker.
34
- *
35
- * @private
36
- * @internal
37
- */
38
- exports.dateLib = {
39
- addDays: addDays_1.addDays,
40
- addMonths: addMonths_1.addMonths,
41
- addWeeks: addWeeks_1.addWeeks,
42
- addYears: addYears_1.addYears,
43
- differenceInCalendarDays: differenceInCalendarDays_1.differenceInCalendarDays,
44
- differenceInCalendarMonths: differenceInCalendarMonths_1.differenceInCalendarMonths,
45
- endOfISOWeek: endOfISOWeek_1.endOfISOWeek,
46
- endOfMonth: endOfMonth_1.endOfMonth,
47
- endOfWeek: endOfWeek_1.endOfWeek,
48
- endOfYear: endOfYear_1.endOfYear,
49
- format: format_1.format,
50
- getISOWeek: getISOWeek_1.getISOWeek,
51
- getWeek: getWeek_1.getWeek,
52
- isAfter: isAfter_1.isAfter,
53
- isBefore: isBefore_1.isBefore,
54
- isDate: isDate_1.isDate,
55
- isSameDay: isSameDay_1.isSameDay,
56
- isSameMonth: isSameMonth_1.isSameMonth,
57
- isSameYear: isSameYear_1.isSameYear,
58
- max: max_1.max,
59
- min: min_1.min,
60
- setMonth: setMonth_1.setMonth,
61
- setYear: setYear_1.setYear,
62
- startOfDay: startOfDay_1.startOfDay,
63
- startOfISOWeek: startOfISOWeek_1.startOfISOWeek,
64
- startOfMonth: startOfMonth_1.startOfMonth,
65
- startOfWeek: startOfWeek_1.startOfWeek,
66
- startOfYear: startOfYear_1.startOfYear
67
- };
68
- //# sourceMappingURL=dateLib.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dateLib.js","sourceRoot":"","sources":["../../../src/lib/dateLib.ts"],"names":[],"mappings":";;;AAIA,8CAA2C;AAC3C,kDAA+C;AAC/C,gDAA6C;AAC7C,gDAA6C;AAC7C,gFAA6E;AAC7E,oFAAiF;AACjF,wDAAqD;AACrD,oDAAiD;AACjD,kDAA+C;AAC/C,kDAA+C;AAC/C,4CAAyC;AACzC,oDAAiD;AACjD,8CAA2C;AAC3C,8CAA2C;AAC3C,gDAA6C;AAC7C,4CAAyC;AACzC,kDAA+C;AAC/C,sDAAmD;AACnD,oDAAiD;AACjD,sCAAmC;AACnC,sCAAmC;AACnC,gDAA6C;AAC7C,8CAA2C;AAC3C,oDAAiD;AACjD,4DAAyD;AACzD,wDAAqD;AACrD,sDAAmD;AACnD,sDAAmD;AA4GnD;;;;;GAKG;AACU,QAAA,OAAO,GAAG;IACrB,OAAO,EAAP,iBAAO;IACP,SAAS,EAAT,qBAAS;IACT,QAAQ,EAAR,mBAAQ;IACR,QAAQ,EAAR,mBAAQ;IACR,wBAAwB,EAAxB,mDAAwB;IACxB,0BAA0B,EAA1B,uDAA0B;IAC1B,YAAY,EAAZ,2BAAY;IACZ,UAAU,EAAV,uBAAU;IACV,SAAS,EAAT,qBAAS;IACT,SAAS,EAAT,qBAAS;IACT,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,uBAAU;IACV,OAAO,EAAP,iBAAO;IACP,OAAO,EAAP,iBAAO;IACP,QAAQ,EAAR,mBAAQ;IACR,MAAM,EAAN,eAAM;IACN,SAAS,EAAT,qBAAS;IACT,WAAW,EAAX,yBAAW;IACX,UAAU,EAAV,uBAAU;IACV,GAAG,EAAH,SAAG;IACH,GAAG,EAAH,SAAG;IACH,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAP,iBAAO;IACP,UAAU,EAAV,uBAAU;IACV,cAAc,EAAd,+BAAc;IACd,YAAY,EAAZ,2BAAY;IACZ,WAAW,EAAX,yBAAW;IACX,WAAW,EAAX,yBAAW;CACZ,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from "./dateLib.js";
2
- export { TZDate } from "@date-fns/tz";
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.TZDate = void 0;
18
- __exportStar(require("./dateLib.js"), exports);
19
- var tz_1 = require("@date-fns/tz");
20
- Object.defineProperty(exports, "TZDate", { enumerable: true, get: function () { return tz_1.TZDate; } });
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,mCAAsC;AAA7B,4FAAA,MAAM,OAAA"}
@@ -1 +0,0 @@
1
- export { enUS } from "date-fns/locale/en-US";
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.enUS = void 0;
4
- var en_US_1 = require("date-fns/locale/en-US");
5
- Object.defineProperty(exports, "enUS", { enumerable: true, get: function () { return en_US_1.enUS; } });
6
- //# sourceMappingURL=locales.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locales.js","sourceRoot":"","sources":["../../../src/lib/locales.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,6FAAA,IAAI,OAAA"}
@@ -1,3 +0,0 @@
1
- import { type DateLib } from "../lib/dateLib.js";
2
- import type { DayPickerProps } from "../types/index.js";
3
- export declare function getDateLib(customLib: DayPickerProps["dateLib"]): DateLib;
@@ -1,8 +0,0 @@
1
- import { dateLib } from "../lib/dateLib.js";
2
- export function getDateLib(customLib) {
3
- return {
4
- ...dateLib,
5
- ...customLib
6
- };
7
- }
8
- //# sourceMappingURL=getDateLib.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDateLib.js","sourceRoot":"","sources":["../../../src/helpers/getDateLib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,mBAAmB,CAAC;AAG1D,MAAM,UAAU,UAAU,CAAC,SAAoC;IAC7D,OAAO;QACL,GAAG,OAAO;QACV,GAAG,SAAS;KACb,CAAC;AACJ,CAAC"}