react-day-picker 9.0.0-beta.2 → 9.0.0-beta.3

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 (177) hide show
  1. package/dist/cjs/DayPicker.d.ts +1 -4
  2. package/dist/cjs/DayPicker.js +3 -6
  3. package/dist/cjs/DayPicker.js.map +1 -1
  4. package/dist/cjs/UI.d.ts +42 -26
  5. package/dist/cjs/UI.js +45 -27
  6. package/dist/cjs/UI.js.map +1 -1
  7. package/dist/cjs/components/Calendar.js +3 -2
  8. package/dist/cjs/components/Calendar.js.map +1 -1
  9. package/dist/cjs/components/Chevron.js +8 -2
  10. package/dist/cjs/components/Chevron.js.map +1 -1
  11. package/dist/cjs/components/Day.d.ts +7 -8
  12. package/dist/cjs/components/Day.js +6 -4
  13. package/dist/cjs/components/Day.js.map +1 -1
  14. package/dist/cjs/components/DayDate.d.ts +24 -0
  15. package/dist/cjs/components/DayDate.js +20 -0
  16. package/dist/cjs/components/DayDate.js.map +1 -0
  17. package/dist/cjs/components/DayWrapper.js +11 -3
  18. package/dist/cjs/components/DayWrapper.js.map +1 -1
  19. package/dist/cjs/components/MonthCaption.js +2 -2
  20. package/dist/cjs/components/MonthCaption.js.map +1 -1
  21. package/dist/cjs/components/MonthsDropdown.js +2 -2
  22. package/dist/cjs/components/MonthsDropdown.js.map +1 -1
  23. package/dist/cjs/components/WeekNumber.js +5 -1
  24. package/dist/cjs/components/WeekNumber.js.map +1 -1
  25. package/dist/cjs/components/YearsDropdown.js +2 -2
  26. package/dist/cjs/components/YearsDropdown.js.map +1 -1
  27. package/dist/cjs/components/custom-components.d.ts +5 -4
  28. package/dist/cjs/components/custom-components.js +5 -4
  29. package/dist/cjs/components/custom-components.js.map +1 -1
  30. package/dist/cjs/contexts/{index.d.ts → root.d.ts} +0 -5
  31. package/dist/cjs/contexts/{index.js → root.js} +1 -20
  32. package/dist/cjs/contexts/root.js.map +1 -0
  33. package/dist/cjs/contexts/selection.js +3 -3
  34. package/dist/cjs/contexts/selection.js.map +1 -1
  35. package/dist/cjs/helpers/getClassNames.d.ts +3 -0
  36. package/dist/cjs/helpers/getDefaultClassNames.d.ts +5 -1
  37. package/dist/cjs/helpers/getDefaultClassNames.js +13 -1
  38. package/dist/cjs/helpers/getDefaultClassNames.js.map +1 -1
  39. package/dist/cjs/helpers/getFromToDate.d.ts +1 -1
  40. package/dist/cjs/helpers/getFromToDate.js +3 -2
  41. package/dist/cjs/helpers/getFromToDate.js.map +1 -1
  42. package/dist/cjs/helpers/index.d.ts +1 -0
  43. package/dist/cjs/helpers/index.js +19 -0
  44. package/dist/cjs/helpers/index.js.map +1 -0
  45. package/dist/cjs/index.d.ts +5 -1
  46. package/dist/cjs/index.js +5 -1
  47. package/dist/cjs/index.js.map +1 -1
  48. package/dist/cjs/labels/index.d.ts +1 -0
  49. package/dist/cjs/labels/index.js +1 -0
  50. package/dist/cjs/labels/index.js.map +1 -1
  51. package/dist/cjs/labels/labelCaption.d.ts +8 -0
  52. package/dist/cjs/labels/labelCaption.js +14 -0
  53. package/dist/cjs/labels/labelCaption.js.map +1 -0
  54. package/dist/cjs/labels/labelDay.d.ts +5 -1
  55. package/dist/cjs/labels/labelDay.js +6 -3
  56. package/dist/cjs/labels/labelDay.js.map +1 -1
  57. package/dist/cjs/types-deprecated.d.ts +1 -1
  58. package/dist/cjs/types-deprecated.js +2 -2
  59. package/dist/cjs/types-deprecated.js.map +1 -1
  60. package/dist/cjs/types.d.ts +24 -12
  61. package/dist/esm/DayPicker.d.ts +1 -4
  62. package/dist/esm/DayPicker.js +2 -5
  63. package/dist/esm/DayPicker.js.map +1 -1
  64. package/dist/esm/UI.d.ts +42 -26
  65. package/dist/esm/UI.js +44 -26
  66. package/dist/esm/UI.js.map +1 -1
  67. package/dist/esm/components/Calendar.js +3 -2
  68. package/dist/esm/components/Calendar.js.map +1 -1
  69. package/dist/esm/components/Chevron.js +9 -3
  70. package/dist/esm/components/Chevron.js.map +1 -1
  71. package/dist/esm/components/Day.d.ts +7 -8
  72. package/dist/esm/components/Day.js +6 -4
  73. package/dist/esm/components/Day.js.map +1 -1
  74. package/dist/esm/components/DayDate.d.ts +24 -0
  75. package/dist/esm/components/DayDate.js +13 -0
  76. package/dist/esm/components/DayDate.js.map +1 -0
  77. package/dist/esm/components/DayWrapper.js +11 -3
  78. package/dist/esm/components/DayWrapper.js.map +1 -1
  79. package/dist/esm/components/MonthCaption.js +2 -2
  80. package/dist/esm/components/MonthCaption.js.map +1 -1
  81. package/dist/esm/components/MonthsDropdown.js +2 -2
  82. package/dist/esm/components/MonthsDropdown.js.map +1 -1
  83. package/dist/esm/components/WeekNumber.js +6 -2
  84. package/dist/esm/components/WeekNumber.js.map +1 -1
  85. package/dist/esm/components/YearsDropdown.js +2 -2
  86. package/dist/esm/components/YearsDropdown.js.map +1 -1
  87. package/dist/esm/components/custom-components.d.ts +5 -4
  88. package/dist/esm/components/custom-components.js +5 -4
  89. package/dist/esm/components/custom-components.js.map +1 -1
  90. package/dist/esm/contexts/{index.d.ts → root.d.ts} +0 -5
  91. package/dist/esm/contexts/{index.js → root.js} +1 -6
  92. package/dist/esm/contexts/root.js.map +1 -0
  93. package/dist/esm/contexts/selection.js +2 -2
  94. package/dist/esm/contexts/selection.js.map +1 -1
  95. package/dist/esm/helpers/getClassNames.d.ts +3 -0
  96. package/dist/esm/helpers/getDefaultClassNames.d.ts +5 -1
  97. package/dist/esm/helpers/getDefaultClassNames.js +14 -2
  98. package/dist/esm/helpers/getDefaultClassNames.js.map +1 -1
  99. package/dist/esm/helpers/getFromToDate.d.ts +1 -1
  100. package/dist/esm/helpers/getFromToDate.js +3 -2
  101. package/dist/esm/helpers/getFromToDate.js.map +1 -1
  102. package/dist/esm/helpers/index.d.ts +1 -0
  103. package/dist/esm/helpers/index.js +3 -0
  104. package/dist/esm/helpers/index.js.map +1 -0
  105. package/dist/esm/index.d.ts +5 -1
  106. package/dist/esm/index.js +5 -1
  107. package/dist/esm/index.js.map +1 -1
  108. package/dist/esm/labels/index.d.ts +1 -0
  109. package/dist/esm/labels/index.js +1 -0
  110. package/dist/esm/labels/index.js.map +1 -1
  111. package/dist/esm/labels/labelCaption.d.ts +8 -0
  112. package/dist/esm/labels/labelCaption.js +10 -0
  113. package/dist/esm/labels/labelCaption.js.map +1 -0
  114. package/dist/esm/labels/labelDay.d.ts +5 -1
  115. package/dist/esm/labels/labelDay.js +6 -3
  116. package/dist/esm/labels/labelDay.js.map +1 -1
  117. package/dist/esm/types-deprecated.d.ts +1 -1
  118. package/dist/esm/types-deprecated.js +1 -1
  119. package/dist/esm/types-deprecated.js.map +1 -1
  120. package/dist/esm/types.d.ts +24 -12
  121. package/examples/AccessibleDatePicker.tsx +33 -0
  122. package/examples/ContainerAttributes.tsx +0 -5
  123. package/examples/{CustomDayContent.test.tsx → CustomDayDate.test.tsx} +2 -2
  124. package/examples/CustomDayDate.tsx +16 -0
  125. package/examples/Dropdown.tsx +1 -1
  126. package/examples/DropdownMultipleMonths.tsx +1 -1
  127. package/examples/Fixedweeks.tsx +1 -8
  128. package/examples/FocusRecursive.test.tsx +2 -0
  129. package/examples/Footer.tsx +21 -0
  130. package/examples/HideNavigation.tsx +1 -1
  131. package/examples/OutsideDays.tsx +1 -1
  132. package/examples/RangeShiftKey.tsx +3 -3
  133. package/examples/TailwindCSS.tsx +30 -0
  134. package/examples/__snapshots__/Range.test.tsx.snap +504 -152
  135. package/examples/__snapshots__/StylingCssModules.test.tsx.snap +252 -76
  136. package/examples/index.ts +4 -1
  137. package/package.json +1 -1
  138. package/src/DayPicker.tsx +2 -5
  139. package/src/UI.ts +46 -26
  140. package/src/components/Calendar.tsx +1 -1
  141. package/src/components/Chevron.tsx +9 -3
  142. package/src/components/Day.tsx +33 -9
  143. package/src/components/DayDate.tsx +29 -0
  144. package/src/components/DayWrapper.tsx +20 -5
  145. package/src/components/MonthCaption.tsx +6 -11
  146. package/src/components/MonthsDropdown.tsx +2 -1
  147. package/src/components/WeekNumber.tsx +9 -4
  148. package/src/components/YearsDropdown.tsx +2 -1
  149. package/src/components/custom-components.ts +5 -4
  150. package/src/contexts/{index.tsx → root.tsx} +0 -6
  151. package/src/contexts/selection.tsx +2 -2
  152. package/src/helpers/getDefaultClassNames.test.ts +3 -0
  153. package/src/helpers/getDefaultClassNames.ts +22 -2
  154. package/src/helpers/getFromToDate.test.ts +30 -31
  155. package/src/helpers/getFromToDate.ts +4 -4
  156. package/src/helpers/index.ts +2 -0
  157. package/src/index.ts +5 -1
  158. package/src/labels/index.ts +1 -0
  159. package/src/labels/labelCaption.ts +14 -0
  160. package/src/labels/labelDay.test.ts +2 -4
  161. package/src/labels/labelDay.ts +6 -2
  162. package/src/style.css +129 -151
  163. package/src/style.css.d.ts +3 -0
  164. package/src/style.module.css +129 -151
  165. package/src/style.module.css.d.ts +3 -0
  166. package/src/types-deprecated.ts +1 -1
  167. package/src/types.ts +30 -11
  168. package/website/docs/advanced-guides/custom-components.mdx +9 -9
  169. package/website/docs/using-daypicker/accessibility.mdx +51 -2
  170. package/website/docs/using-daypicker/anatomy.mdx +40 -3
  171. package/website/docs/using-daypicker/customization.mdx +58 -33
  172. package/website/docs/using-daypicker/navigation.mdx +18 -2
  173. package/website/docs/using-daypicker/selection-modes.mdx +22 -4
  174. package/website/docs/using-daypicker/styling.mdx +118 -62
  175. package/dist/cjs/contexts/index.js.map +0 -1
  176. package/dist/esm/contexts/index.js.map +0 -1
  177. package/examples/CustomDay.tsx +0 -16
@@ -2,10 +2,7 @@ import React from "react";
2
2
  import type { DayPickerProps, Mode } from "./types";
3
3
  /**
4
4
  * DayPicker is a React component to create date pickers, calendars, and date
5
- * inputs for web applications. Use the `components` prop to swap this component
6
- * with a custom one.
7
- *
8
- * Use the `components` prop to swap this component with a custom one.
5
+ * inputs for web applications.
9
6
  *
10
7
  * @group Components
11
8
  * @see http://daypicker.dev
@@ -6,19 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.DayPicker = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const Calendar_1 = require("./components/Calendar");
9
- const contexts_1 = require("./contexts");
9
+ const root_1 = require("./contexts/root");
10
10
  /**
11
11
  * DayPicker is a React component to create date pickers, calendars, and date
12
- * inputs for web applications. Use the `components` prop to swap this component
13
- * with a custom one.
14
- *
15
- * Use the `components` prop to swap this component with a custom one.
12
+ * inputs for web applications.
16
13
  *
17
14
  * @group Components
18
15
  * @see http://daypicker.dev
19
16
  */
20
17
  function DayPicker(props) {
21
- return (react_1.default.createElement(contexts_1.ContextProviders, { ...props },
18
+ return (react_1.default.createElement(root_1.ContextProviders, { ...props },
22
19
  react_1.default.createElement(Calendar_1.Calendar, null)));
23
20
  }
24
21
  exports.DayPicker = DayPicker;
@@ -1 +1 @@
1
- {"version":3,"file":"DayPicker.js","sourceRoot":"","sources":["../../src/DayPicker.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,oDAAiD;AACjD,yCAA8C;AAG9C;;;;;;;;;GASG;AACH,SAAgB,SAAS,CACvB,KAAwB;IAExB,OAAO,CACL,8BAAC,2BAAgB,OAAK,KAAK;QACzB,8BAAC,mBAAQ,OAAG,CACK,CACpB,CAAC;AACJ,CAAC;AARD,8BAQC"}
1
+ {"version":3,"file":"DayPicker.js","sourceRoot":"","sources":["../../src/DayPicker.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,oDAAiD;AACjD,0CAAmD;AAGnD;;;;;;GAMG;AACH,SAAgB,SAAS,CACvB,KAAwB;IAExB,OAAO,CACL,8BAAC,uBAAgB,OAAK,KAAK;QACzB,8BAAC,mBAAQ,OAAG,CACK,CACpB,CAAC;AACJ,CAAC;AARD,8BAQC"}
package/dist/cjs/UI.d.ts CHANGED
@@ -1,57 +1,60 @@
1
1
  /**
2
- * The UI elements composing DayPicker.
3
- *
4
- * These elements are mapped to the components directory.
5
- */
6
- /**
7
- * The UI elements composing DayPicker.
8
- *
9
- * These elements are mapped to the components directory.
2
+ * The UI elements composing DayPicker. These elements are mapped to
3
+ * {@link CustomComponents}, the {@link ClassNames} and the {@link Styles} used by
4
+ * DayPicker.
10
5
  */
11
6
  export declare enum UI {
12
7
  /** The previous button in the navigation. */
13
8
  ButtonPrevious = "button_previous",
14
9
  /** The next button the navigation */
15
10
  ButtonNext = "button_next",
16
- /** The calendar element, the root of the component. */
11
+ /**
12
+ * The calendar element: the root component displaying the months and the
13
+ * navigation bar. Extended by {@link CalendarFlag}.
14
+ */
17
15
  Calendar = "calendar",
18
16
  /** The Chevron SVG element used by navigation buttons and dropdowns. */
19
17
  Chevron = "chevron",
20
- /** The gridcell with the day's date. */
18
+ /** The grid cell with the day's date. Extended by {@link DayModifier}. */
21
19
  Day = "day",
22
- /** The label of a caption. */
20
+ /** The element containing the formatted day's date, inside the grid cell. */
21
+ DayDate = "day_date",
22
+ /** The caption label of the month (when not showing the dropdown navigation). */
23
23
  CaptionLabel = "caption_label",
24
- /** The container of the dropdown navigation.. */
24
+ /** The container of the dropdown navigation (when enabled). */
25
25
  DropdownNav = "dropdown_nav",
26
- /** The dropdown used for years and months. */
26
+ /** The dropdown element to select for years and months. */
27
27
  Dropdown = "dropdown",
28
- /** The root element of the {@link Dropdown} component. */
28
+ /** The container element of the dropdown. */
29
29
  DropdownRoot = "dropdown_root",
30
- /** The root element of the {@link Footer} component. */
30
+ /** The root element of the footer. */
31
31
  Footer = "footer",
32
32
  /** The month grid. */
33
33
  Month = "month",
34
- /** The caption of a month. */
34
+ /** Contains the dropdown navigation or the caption label. */
35
35
  MonthCaption = "month_caption",
36
- /** The dropdown of months. */
36
+ /** The dropdown with the months. */
37
37
  MonthsDropdown = "months_dropdown",
38
- /** Wrapper of the month grid. */
38
+ /** Wrapper of the {@link} grid. */
39
39
  MonthWrapper = "month_wrapper",
40
- /** Container containing the months. */
40
+ /** The container of the displayed months. */
41
41
  Months = "months",
42
- /** The navigation element. */
42
+ /** The navigation bar with the previous and next buttons */
43
43
  Nav = "nav",
44
- /** The row in a week. */
44
+ /** The row containing the week. */
45
45
  Week = "week",
46
- /** The group of weeks in a month. */
46
+ /** The group of row weeks in a month. */
47
47
  Weeks = "weeks",
48
- /** The column's header with the weekday. */
48
+ /** The column header with the weekday. */
49
49
  Weekday = "weekday",
50
- /** The row grouping the weekdays. */
50
+ /** The row grouping the weekdays in the column headers. */
51
51
  Weekdays = "weekdays",
52
- /** The row header in a week number. */
52
+ /**
53
+ * The row header containing the week number. Extended by
54
+ * {@link WeekNumberFlag}.
55
+ */
53
56
  WeekNumber = "week_number",
54
- /** The dropdown of years. */
57
+ /** The dropdown with the years. */
55
58
  YearsDropdown = "years_dropdown"
56
59
  }
57
60
  /** The modifiers for the {@link UI.Day}. */
@@ -86,3 +89,16 @@ export declare enum CalendarFlag {
86
89
  /** Assigned when the calendar has multiple months. */
87
90
  hasMultipleMonths = "has_multiple_months"
88
91
  }
92
+ /** Flags that can be applied to the {@link UI.Chevron} element. */
93
+ export declare enum ChevronFlag {
94
+ /** Assigned when the week numbers are show. */
95
+ disabled = "chevron_disabled"
96
+ }
97
+ /** Flags that can be applied to the {@link UI.WeekNumber} element. */
98
+ export declare enum WeekNumberFlag {
99
+ /**
100
+ * Assigned when the week number is interactive, i.e. has an
101
+ * `onWeekNumberClick` event attached to it.
102
+ */
103
+ isInteractive = "week_number_interactive"
104
+ }
package/dist/cjs/UI.js CHANGED
@@ -1,15 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CalendarFlag = exports.DayModifier = exports.UI = void 0;
3
+ exports.WeekNumberFlag = exports.ChevronFlag = exports.CalendarFlag = exports.DayModifier = exports.UI = void 0;
4
4
  /**
5
- * The UI elements composing DayPicker.
6
- *
7
- * These elements are mapped to the components directory.
8
- */
9
- /**
10
- * The UI elements composing DayPicker.
11
- *
12
- * These elements are mapped to the components directory.
5
+ * The UI elements composing DayPicker. These elements are mapped to
6
+ * {@link CustomComponents}, the {@link ClassNames} and the {@link Styles} used by
7
+ * DayPicker.
13
8
  */
14
9
  var UI;
15
10
  (function (UI) {
@@ -17,45 +12,53 @@ var UI;
17
12
  UI["ButtonPrevious"] = "button_previous";
18
13
  /** The next button the navigation */
19
14
  UI["ButtonNext"] = "button_next";
20
- /** The calendar element, the root of the component. */
15
+ /**
16
+ * The calendar element: the root component displaying the months and the
17
+ * navigation bar. Extended by {@link CalendarFlag}.
18
+ */
21
19
  UI["Calendar"] = "calendar";
22
20
  /** The Chevron SVG element used by navigation buttons and dropdowns. */
23
21
  UI["Chevron"] = "chevron";
24
- /** The gridcell with the day's date. */
22
+ /** The grid cell with the day's date. Extended by {@link DayModifier}. */
25
23
  UI["Day"] = "day";
26
- /** The label of a caption. */
24
+ /** The element containing the formatted day's date, inside the grid cell. */
25
+ UI["DayDate"] = "day_date";
26
+ /** The caption label of the month (when not showing the dropdown navigation). */
27
27
  UI["CaptionLabel"] = "caption_label";
28
- /** The container of the dropdown navigation.. */
28
+ /** The container of the dropdown navigation (when enabled). */
29
29
  UI["DropdownNav"] = "dropdown_nav";
30
- /** The dropdown used for years and months. */
30
+ /** The dropdown element to select for years and months. */
31
31
  UI["Dropdown"] = "dropdown";
32
- /** The root element of the {@link Dropdown} component. */
32
+ /** The container element of the dropdown. */
33
33
  UI["DropdownRoot"] = "dropdown_root";
34
- /** The root element of the {@link Footer} component. */
34
+ /** The root element of the footer. */
35
35
  UI["Footer"] = "footer";
36
36
  /** The month grid. */
37
37
  UI["Month"] = "month";
38
- /** The caption of a month. */
38
+ /** Contains the dropdown navigation or the caption label. */
39
39
  UI["MonthCaption"] = "month_caption";
40
- /** The dropdown of months. */
40
+ /** The dropdown with the months. */
41
41
  UI["MonthsDropdown"] = "months_dropdown";
42
- /** Wrapper of the month grid. */
42
+ /** Wrapper of the {@link} grid. */
43
43
  UI["MonthWrapper"] = "month_wrapper";
44
- /** Container containing the months. */
44
+ /** The container of the displayed months. */
45
45
  UI["Months"] = "months";
46
- /** The navigation element. */
46
+ /** The navigation bar with the previous and next buttons */
47
47
  UI["Nav"] = "nav";
48
- /** The row in a week. */
48
+ /** The row containing the week. */
49
49
  UI["Week"] = "week";
50
- /** The group of weeks in a month. */
50
+ /** The group of row weeks in a month. */
51
51
  UI["Weeks"] = "weeks";
52
- /** The column's header with the weekday. */
52
+ /** The column header with the weekday. */
53
53
  UI["Weekday"] = "weekday";
54
- /** The row grouping the weekdays. */
54
+ /** The row grouping the weekdays in the column headers. */
55
55
  UI["Weekdays"] = "weekdays";
56
- /** The row header in a week number. */
56
+ /**
57
+ * The row header containing the week number. Extended by
58
+ * {@link WeekNumberFlag}.
59
+ */
57
60
  UI["WeekNumber"] = "week_number";
58
- /** The dropdown of years. */
61
+ /** The dropdown with the years. */
59
62
  UI["YearsDropdown"] = "years_dropdown";
60
63
  })(UI || (exports.UI = UI = {}));
61
64
  /** The modifiers for the {@link UI.Day}. */
@@ -92,4 +95,19 @@ var CalendarFlag;
92
95
  /** Assigned when the calendar has multiple months. */
93
96
  CalendarFlag["hasMultipleMonths"] = "has_multiple_months";
94
97
  })(CalendarFlag || (exports.CalendarFlag = CalendarFlag = {}));
98
+ /** Flags that can be applied to the {@link UI.Chevron} element. */
99
+ var ChevronFlag;
100
+ (function (ChevronFlag) {
101
+ /** Assigned when the week numbers are show. */
102
+ ChevronFlag["disabled"] = "chevron_disabled";
103
+ })(ChevronFlag || (exports.ChevronFlag = ChevronFlag = {}));
104
+ /** Flags that can be applied to the {@link UI.WeekNumber} element. */
105
+ var WeekNumberFlag;
106
+ (function (WeekNumberFlag) {
107
+ /**
108
+ * Assigned when the week number is interactive, i.e. has an
109
+ * `onWeekNumberClick` event attached to it.
110
+ */
111
+ WeekNumberFlag["isInteractive"] = "week_number_interactive";
112
+ })(WeekNumberFlag || (exports.WeekNumberFlag = WeekNumberFlag = {}));
95
113
  //# sourceMappingURL=UI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UI.js","sourceRoot":"","sources":["../../src/UI.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH;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CAAC,EArDW,EAAE,kBAAF,EAAE,QAqDb;AAED,4CAA4C;AAC5C,IAAY,WAqBX;AArBD,WAAY,WAAW;IACrB,0BAA0B;IAC1B,oCAAqB,CAAA;IACrB,wBAAwB;IACxB,gCAAiB,CAAA;IACjB,2CAA2C;IAC3C,kCAAmB,CAAA;IACnB,iDAAiD;IACjD,sCAAuB,CAAA;IACvB,oDAAoD;IACpD,4CAA6B,CAAA;IAC7B,mDAAmD;IACnD,0CAA2B,CAAA;IAC3B,2BAA2B;IAC3B,oCAAqB,CAAA;IACrB,4BAA4B;IAC5B,sCAAuB,CAAA;IACvB,0BAA0B;IAC1B,kCAAmB,CAAA;IACnB,wBAAwB;IACxB,8BAAe,CAAA;AACjB,CAAC,EArBW,WAAW,2BAAX,WAAW,QAqBtB;AAED,oEAAoE;AACpE,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,+CAA+C;IAC/C,mDAAmC,CAAA;IACnC,6CAA6C;IAC7C,0CAA0B,CAAA;IAC1B,sDAAsD;IACtD,yDAAyC,CAAA;AAC3C,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB;AAED,mEAAmE;AACnE,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,+CAA+C;IAC/C,4CAA6B,CAAA;AAC/B,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,sEAAsE;AACtE,IAAY,cAMX;AAND,WAAY,cAAc;IACxB;;;OAGG;IACH,2DAAyC,CAAA;AAC3C,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB"}
@@ -42,8 +42,9 @@ function Calendar() {
42
42
  const Month = components?.Month ?? Month_1.Month;
43
43
  const Footer = components?.Footer ?? Footer_1.Footer;
44
44
  return (react_1.default.createElement("div", { className: cssClassNames.join(" "), style: { ...styles?.[UI_1.UI.Calendar], ...style }, dir: dir, id: id, lang: lang, nonce: nonce, title: title, ...dataAttributes },
45
- react_1.default.createElement(Months, { className: classNames[UI_1.UI.Months], style: styles?.[UI_1.UI.Months] }, calendar.months.map((month, i) => (react_1.default.createElement(Month, { "aria-labelledby": id, key: i, index: i, month: month })))),
46
- !hideNavigation && react_1.default.createElement(Nav, null),
45
+ react_1.default.createElement(Months, { className: classNames[UI_1.UI.Months], style: styles?.[UI_1.UI.Months] },
46
+ !hideNavigation && react_1.default.createElement(Nav, null),
47
+ calendar.months.map((month, i) => (react_1.default.createElement(Month, { "aria-labelledby": id, key: i, index: i, month: month })))),
47
48
  footer && (react_1.default.createElement(Footer, { className: classNames[UI_1.UI.Footer], style: styles?.[UI_1.UI.Footer] }, footer))));
48
49
  }
49
50
  exports.Calendar = Calendar;
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../../src/components/Calendar.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,8BAAyC;AACzC,mDAAmD;AACnD,6CAA6C;AAE7C,qCAAmD;AACnD,mCAAgD;AAChD,qCAAmD;AACnD,+BAA0C;AAE1C;;;;;;;GAOG;AACH,SAAgB,QAAQ;IACtB,MAAM,EACJ,SAAS,EACT,UAAU,EACV,UAAU,EACV,cAAc,EACd,GAAG,EACH,MAAM,EACN,cAAc,EACd,cAAc,EACd,EAAE,EACF,IAAI,EACJ,KAAK,EACL,cAAc,EACd,cAAc,EACd,KAAK,EACL,MAAM,EACN,KAAK,EACN,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAEf,MAAM,QAAQ,GAAG,IAAA,sBAAW,GAAE,CAAC;IAE/B,sCAAsC;IACtC,MAAM,aAAa,GAAG,CAAC,UAAU,CAAC,OAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChD,IAAI,SAAS,EAAE,CAAC;QACd,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;IACD,IAAI,cAAc,GAAG,CAAC,EAAE,CAAC;QACvB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,iBAAY,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACjE,CAA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orientation = "left" } = props;
20
- const { classNames } = (0, props_1.useProps)();
21
- return (react_1.default.createElement("svg", { className: classNames[UI_1.UI.Chevron], width: size, height: size, viewBox: "0 0 24 24" },
20
+ const { classNames, disableNavigation } = (0, props_1.useProps)();
21
+ const svgClassName = [
22
+ classNames[UI_1.UI.Chevron],
23
+ disableNavigation ? classNames[UI_1.ChevronFlag.disabled] : ""
24
+ ]
25
+ .join(" ")
26
+ .trim();
27
+ return (react_1.default.createElement("svg", { className: svgClassName, width: size, height: size, viewBox: "0 0 24 24" },
22
28
  orientation === "up" && (react_1.default.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" })),
23
29
  orientation === "down" && (react_1.default.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" })),
24
30
  orientation === "left" && (react_1.default.createElement("polygon", { points: "15 17.23 9.43 11.5 15 5.76 13.28 4 6 11.5 13.28 19" })),
@@ -1 +1 @@
1
- {"version":3,"file":"Chevron.js","sourceRoot":"","sources":["../../../src/components/Chevron.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,8BAA2B;AAC3B,6CAA6C;AAE7C;;;;;;;GAOG;AACH,SAAgB,OAAO,CAAC,KAGvB;IACC,MAAM,EAAE,IAAI,GAAG,EAAE,EAAE,WAAW,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;IAClD,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAElC,OAAO,CACL,uCACE,SAAS,EAAE,UAAU,CAAC,OAAE,CAAC,OAAO,CAAC,EACjC,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,OAAO,EAAC,WAAW;QAElB,WAAW,KAAK,IAAI,IAAI,CACvB,2CAAS,MAAM,EAAC,qDAAqD,GAAG,CACzE;QACA,WAAW,KAAK,MAAM,IAAI,CACzB,2CAAS,MAAM,EAAC,kDAAkD,GAAG,CACtE;QACA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import React from "react";
2
- import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { ReactNode } from "react";
3
3
  import type { CalendarDay } from "../classes";
4
4
  import type { DayModifiers } from "../types";
5
5
  /**
6
- * Render the gridcell of a day in the calendar.
6
+ * Render the gridcell of a day in the calendar and handle the interaction and
7
+ * the focus with they day.
7
8
  *
8
- * Use the `components` prop to swap this component with a custom one.
9
+ * Use the `components` prop to swap this component with a custom one. If you
10
+ * need to just change the content of the day cell, consider swapping the
11
+ * `DayDate` component instead.
9
12
  *
10
13
  * @group Components
11
14
  * @see https://react-day-picker.js.org/advanced-guides/custom-components
12
15
  */
13
16
  export declare function Day(props: {
14
- /** The day to be rendered in the gridcell. */
15
17
  day: CalendarDay;
16
- /** Modifiers for the day. */
17
18
  modifiers: DayModifiers;
18
- /** HTML attributes for the gridcell. */
19
- htmlAttributes: HTMLAttributes<HTMLElement>;
20
- /** Children of the gridcell. */
21
19
  children?: ReactNode;
20
+ rootProps: Pick<JSX.IntrinsicElements["div"], "className" | "style" | "tabIndex" | "aria-colindex" | "aria-disabled" | "aria-hidden" | "aria-label" | "aria-selected" | "onClick" | "onBlur" | "onFocus" | "onKeyDown" | "onKeyPress" | "onKeyUp" | "onMouseEnter" | "onMouseLeave" | "onPointerEnter" | "onPointerLeave" | "onTouchCancel" | "onTouchEnd" | "onTouchMove" | "onTouchStart" | "ref" | "role">;
22
21
  }): React.JSX.Element;
23
22
  export type DayProps = Parameters<typeof Day>[0];
@@ -6,16 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Day = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  /**
9
- * Render the gridcell of a day in the calendar.
9
+ * Render the gridcell of a day in the calendar and handle the interaction and
10
+ * the focus with they day.
10
11
  *
11
- * Use the `components` prop to swap this component with a custom one.
12
+ * Use the `components` prop to swap this component with a custom one. If you
13
+ * need to just change the content of the day cell, consider swapping the
14
+ * `DayDate` component instead.
12
15
  *
13
16
  * @group Components
14
17
  * @see https://react-day-picker.js.org/advanced-guides/custom-components
15
18
  */
16
19
  function Day(props) {
17
- const { children, htmlAttributes } = props;
18
- return react_1.default.createElement("div", { ...htmlAttributes }, children);
20
+ return react_1.default.createElement("div", { ...props.rootProps }, props.children);
19
21
  }
20
22
  exports.Day = Day;
21
23
  //# sourceMappingURL=Day.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Day.js","sourceRoot":"","sources":["../../../src/components/Day.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAM1B;;;;;;;GAOG;AACH,SAAgB,GAAG,CAAC,KASnB;IACC,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAC3C,OAAO,0CAAS,cAAc,IAAG,QAAQ,CAAO,CAAC;AACnD,CAAC;AAZD,kBAYC"}
1
+ {"version":3,"file":"Day.js","sourceRoot":"","sources":["../../../src/components/Day.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAM1B;;;;;;;;;;GAUG;AACH,SAAgB,GAAG,CAAC,KA+BnB;IACC,OAAO,0CAAS,KAAK,CAAC,SAAS,IAAG,KAAK,CAAC,QAAQ,CAAO,CAAC;AAC1D,CAAC;AAjCD,kBAiCC"}
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import type { CalendarDay } from "../classes";
3
+ import type { DayModifiers } from "../types";
4
+ /**
5
+ * Render the date as string inside the day grid cell.
6
+ *
7
+ * Use the `components` prop to swap this component with a custom one.
8
+ *
9
+ * @group Components
10
+ * @see https://react-day-picker.js.org/advanced-guides/custom-components
11
+ */
12
+ export declare function DayDate(props: {
13
+ day: CalendarDay;
14
+ /** The date to display. */
15
+ formattedDate: string;
16
+ /** The modifiers for the day. */
17
+ modifiers: DayModifiers;
18
+ /** The HTML attributes for the root element. */
19
+ rootProps: {
20
+ className: string;
21
+ style?: React.CSSProperties;
22
+ };
23
+ }): React.JSX.Element;
24
+ export type DayDateProps = Parameters<typeof DayDate>[0];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DayDate = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ /**
9
+ * Render the date as string inside the day grid cell.
10
+ *
11
+ * Use the `components` prop to swap this component with a custom one.
12
+ *
13
+ * @group Components
14
+ * @see https://react-day-picker.js.org/advanced-guides/custom-components
15
+ */
16
+ function DayDate(props) {
17
+ return react_1.default.createElement("span", { ...props.rootProps }, props.formattedDate);
18
+ }
19
+ exports.DayDate = DayDate;
20
+ //# sourceMappingURL=DayDate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DayDate.js","sourceRoot":"","sources":["../../../src/components/DayDate.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAK1B;;;;;;;GAOG;AACH,SAAgB,OAAO,CAAC,KAWvB;IACC,OAAO,2CAAU,KAAK,CAAC,SAAS,IAAG,KAAK,CAAC,aAAa,CAAQ,CAAC;AACjE,CAAC;AAbD,0BAaC"}
@@ -16,6 +16,7 @@ const debounce_1 = require("../helpers/debounce");
16
16
  const getClassNamesForModifiers_1 = require("../helpers/getClassNamesForModifiers");
17
17
  const getStyleForModifiers_1 = require("../helpers/getStyleForModifiers");
18
18
  const Day_1 = require("./Day");
19
+ const DayDate_1 = require("./DayDate");
19
20
  /**
20
21
  * Provides a `Day` the day state and the html attributes. Developers may use a
21
22
  * `Day` component without the need to use hooks.
@@ -24,7 +25,7 @@ const Day_1 = require("./Day");
24
25
  */
25
26
  function DayWrapper(props) {
26
27
  const cellRef = (0, react_2.useRef)(null);
27
- const { classNames, components, dir, formatters: { formatDay }, locale, mode, modifiersClassNames = {}, modifiersStyles = {}, onDayFocus, onDayBlur, onDayClick, onDayKeyDown, onDayKeyPress, onDayKeyUp, onDayMouseEnter, onDayMouseLeave, onDayPointerEnter, onDayPointerLeave, onDayTouchCancel, onDayTouchEnd, onDayTouchMove, onDayTouchStart, styles = {} } = (0, props_1.useProps)();
28
+ const { classNames, components, dir, formatters: { formatDay }, labels: { labelDay }, locale, modifiersClassNames = {}, modifiersStyles = {}, onDayFocus, onDayBlur, onDayClick, onDayKeyDown, onDayKeyPress, onDayKeyUp, onDayMouseEnter, onDayMouseLeave, onDayPointerEnter, onDayPointerLeave, onDayTouchCancel, onDayTouchEnd, onDayTouchMove, onDayTouchStart, styles = {} } = (0, props_1.useProps)();
28
29
  const { isInteractive } = (0, calendar_1.useCalendar)();
29
30
  const { setSelected } = (0, selection_1.useSelection)();
30
31
  const { getModifiers } = (0, modifiers_1.useModifiers)();
@@ -144,12 +145,13 @@ function DayWrapper(props) {
144
145
  if (isFocused) {
145
146
  className.push(classNames[UI_1.DayModifier.focused]);
146
147
  }
147
- const htmlAttributes = {
148
+ const dayRootProps = {
148
149
  role: "gridcell",
149
150
  className: className.join(" "),
150
151
  style,
151
152
  tabIndex: isFocused || isAutoFocusTarget ? 0 : -1,
152
153
  ["aria-colindex"]: props["aria-colindex"],
154
+ ["aria-label"]: labelDay(props.day.date, modifiers, { locale }) ?? undefined,
153
155
  ["aria-disabled"]: modifiers.disabled || undefined,
154
156
  ["aria-hidden"]: modifiers.hidden || undefined,
155
157
  ["aria-selected"]: modifiers.selected || undefined,
@@ -181,7 +183,13 @@ function DayWrapper(props) {
181
183
  cellRef.current.focus();
182
184
  }, [focusedDay, modifiers.disabled, modifiers.hidden, props.day]);
183
185
  const Day = components?.Day ?? Day_1.Day;
184
- return (react_1.default.createElement(Day, { day: props.day, modifiers: modifiers, htmlAttributes: htmlAttributes }, formatDay(props.day.date, { locale })));
186
+ const dayDateRootProps = {
187
+ className: classNames[UI_1.UI.DayDate],
188
+ style: styles[UI_1.UI.DayDate]
189
+ };
190
+ const DayDate = components?.DayDate ?? DayDate_1.DayDate;
191
+ return (react_1.default.createElement(Day, { day: props.day, modifiers: modifiers, rootProps: dayRootProps },
192
+ react_1.default.createElement(DayDate, { day: props.day, modifiers: modifiers, formattedDate: formatDay(props.day.date, { locale }), rootProps: dayDateRootProps })));
185
193
  }
186
194
  exports.DayWrapper = DayWrapper;
187
195
  //# sourceMappingURL=DayWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DayWrapper.js","sourceRoot":"","sources":["../../../src/components/DayWrapper.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,iCAQe;AAEf,8BAAwC;AAExC,mDAAmD;AACnD,6CAA6C;AAC7C,qDAAqD;AACrD,6CAA6C;AAC7C,qDAAqD;AACrD,kDAA+C;AAC/C,oFAAiF;AACjF,0EAAuE;AAEvE,+BAA0C;AAE1C;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,KAI1B;IACC,MAAM,OAAO,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAE7C,MAAM,EACJ,UAAU,EACV,UAAU,EACV,GAAG,EACH,UAAU,EAAE,EAAE,SAAS,EAAE,EACzB,MAAM,EACN,IAAI,EACJ,mBAAmB,GAAG,EAAE,EACxB,eAAe,GAAG,EAAE,EACpB,UAAU,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,aAAa,EACb,UAAU,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,eAAe,EACf,MAAM,GAAG,EAAE,EACZ,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAEf,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,sBAAW,GAAE,CAAC;IACxC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,wBAAY,GAAE,CAAC;IACvC,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,wBAAY,GAAE,CAAC;IAExC,MAAM,EACJ,eAAe,EACf,UAAU,EACV,KAAK,EACL,IAAI,EACJ,cAAc,EACd,aAAa,EACb,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf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@ -17,8 +17,8 @@ const DropdownNav_1 = require("./DropdownNav");
17
17
  * @see https://react-day-picker.js.org/advanced-guides/custom-components
18
18
  */
19
19
  function MonthCaption(props) {
20
- const { classNames, dropdownNavigation, formatters: { formatCaption }, locale, styles } = (0, props_1.useProps)();
21
- return (react_1.default.createElement("div", { id: props.id, className: classNames[UI_1.UI.MonthCaption], style: styles?.[UI_1.UI.MonthCaption] }, dropdownNavigation ? (react_1.default.createElement(DropdownNav_1.DropdownNav, { month: props.month, index: props.index, showMonths: true, showYears: true })) : dropdownNavigation ? (react_1.default.createElement(DropdownNav_1.DropdownNav, { month: props.month, index: props.index, showMonths: dropdownNavigation === true || dropdownNavigation === "month", showYears: dropdownNavigation === true || dropdownNavigation === "year" })) : (react_1.default.createElement("span", { className: classNames[UI_1.UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption(props.month.date, { locale })))));
20
+ const { classNames, captionLayout, formatters: { formatCaption }, labels: { labelCaption }, locale, styles } = (0, props_1.useProps)();
21
+ return (react_1.default.createElement("div", { id: props.id, className: classNames[UI_1.UI.MonthCaption], style: styles?.[UI_1.UI.MonthCaption] }, captionLayout?.startsWith("dropdown") ? (react_1.default.createElement(DropdownNav_1.DropdownNav, { month: props.month, index: props.index, showMonths: captionLayout === "dropdown" || captionLayout === "dropdown-months", showYears: captionLayout === "dropdown" || captionLayout === "dropdown-years" })) : (react_1.default.createElement("span", { className: classNames[UI_1.UI.CaptionLabel], role: "status", "aria-live": "polite", "aria-label": labelCaption(props.month.date, { locale }) ?? undefined }, formatCaption(props.month.date, { locale })))));
22
22
  }
23
23
  exports.MonthCaption = MonthCaption;
24
24
  //# sourceMappingURL=MonthCaption.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MonthCaption.js","sourceRoot":"","sources":["../../../src/components/MonthCaption.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,8BAA2B;AAE3B,6CAA6C;AAE7C,+CAA4C;AAE5C;;;;;;;GAOG;AACH,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,EACV,aAAa,EACb,UAAU,EAAE,EAAE,aAAa,EAAE,EAC7B,MAAM,EAAE,EAAE,YAAY,EAAE,EACxB,MAAM,EACN,MAAM,EACP,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAEf,OAAO,CACL,uCACE,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,SAAS,EAAE,UAAU,CAAC,OAAE,CAAC,YAAY,CAAC,EACtC,KAAK,EAAE,MAAM,EAAE,CAAC,OAAE,CAAC,YAAY,CAAC,IAE/B,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACvC,8BAAC,yBAAW,IACV,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,UAAU,EACR,aAAa,KAAK,UAAU,IAAI,aAAa,KAAK,iBAAiB,EAErE,SAAS,EACP,aAAa,KAAK,UAAU,IAAI,aAAa,KAAK,gBAAgB,GAEpE,CACH,CAAC,CAAC,CAAC,CACF,wCACE,SAAS,EAAE,UAAU,CAAC,OAAE,CAAC,YAAY,CAAC,EACtC,IAAI,EAAC,QAAQ,eACH,QAAQ,gBACN,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,IAAI,SAAS,IAElE,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CACvC,CACR,CACG,CACP,CAAC;AACJ,CAAC;AA9CD,oCA8CC"}
@@ -20,7 +20,7 @@ const Dropdown_1 = require("./Dropdown");
20
20
  * @see https://react-day-picker.js.org/advanced-guides/custom-components
21
21
  */
22
22
  function MonthsDropdown(props) {
23
- const { classNames, components, labels: { labelMonthDropdown } } = (0, props_1.useProps)();
23
+ const { classNames, components, disableNavigation, labels: { labelMonthDropdown } } = (0, props_1.useProps)();
24
24
  const { dropdownOptions: dropdown, goToMonth } = (0, calendar_1.useCalendar)();
25
25
  const Dropdown = components?.Dropdown ?? Dropdown_1.Dropdown;
26
26
  const handleChange = (e) => {
@@ -28,7 +28,7 @@ function MonthsDropdown(props) {
28
28
  const month = (0, setMonth_1.setMonth)((0, startOfMonth_1.startOfMonth)(props.month.date), selectedMonth);
29
29
  goToMonth(month);
30
30
  };
31
- return (react_1.default.createElement(Dropdown, { name: "month", "aria-label": labelMonthDropdown(), rootClassName: classNames[UI_1.UI.MonthsDropdown], options: dropdown.months, value: props.month.date.getMonth(), onChange: handleChange }));
31
+ return (react_1.default.createElement(Dropdown, { "aria-label": labelMonthDropdown(), disabled: Boolean(disableNavigation), rootClassName: classNames[UI_1.UI.MonthsDropdown], options: dropdown.months, value: props.month.date.getMonth(), onChange: handleChange }));
32
32
  }
33
33
  exports.MonthsDropdown = MonthsDropdown;
34
34
  //# sourceMappingURL=MonthsDropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MonthsDropdown.js","sourceRoot":"","sources":["../../../src/components/MonthsDropdown.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,gDAA6C;AAC7C,wDAAqD;AAErD,8BAA2B;AAE3B,mDAAmD;AACnD,6CAA6C;AAE7C,yCAAyD;AAEzD;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,KAG9B;IACC,MAAM,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EAAE,EAAE,kBAAkB,EAAE,EAC/B,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAEf,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAA,sBAAW,GAAE,CAAC;IAE/D,MAAM,QAAQ,GAAG,UAAU,EAAE,QAAQ,IAAI,mBAAe,CAAC;IAEzD,MAAM,YAAY,GAA0C,CAAC,CAAC,EAAE,EAAE;QAChE,MAAM,aAAa,GAAG,MAAM,CAAE,CAAC,CAAC,MAA4B,CAAC,KAAK,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,IAAA,mBAAQ,EAAC,IAAA,2BAAY,EA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,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,QAAQ,kBACK,kBAAkB,EAAE,EAChC,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,EACpC,aAAa,EAAE,UAAU,CAAC,OAAE,CAAC,cAAc,CAAC,EAC5C,OAAO,EAAE,QAAQ,CAAC,MAAM,EACxB,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,EAClC,QAAQ,EAAE,YAAY,GACtB,CACH,CAAC;AACJ,CAAC;AA/BD,wCA+BC"}
@@ -17,7 +17,11 @@ const props_1 = require("../contexts/props");
17
17
  */
18
18
  function WeekNumber(props) {
19
19
  const { classNames, formatters: { formatWeekNumber }, labels: { labelWeekNumber }, locale, styles, onWeekNumberClick } = (0, props_1.useProps)();
20
- return (react_1.default.createElement("div", { role: "rowheader", "aria-colindex": 1, "aria-label": labelWeekNumber(props.week.weekNumber, { locale }), className: classNames[UI_1.UI.WeekNumber], style: styles?.[UI_1.UI.WeekNumber], tabIndex: onWeekNumberClick ? 0 : undefined, "data-onclick": onWeekNumberClick ? true : undefined, onClick: (e) => onWeekNumberClick?.(props.week.weekNumber, props.week.days.map((day) => day.date), e) }, formatWeekNumber(props.week.weekNumber, { locale })));
20
+ const isInteractive = Boolean(onWeekNumberClick);
21
+ return (react_1.default.createElement("div", { role: "rowheader", "aria-colindex": 1, "aria-label": labelWeekNumber(props.week.weekNumber, { locale }), className: [
22
+ classNames[UI_1.UI.WeekNumber],
23
+ isInteractive ? classNames[UI_1.WeekNumberFlag.isInteractive] : ""
24
+ ].join(" "), style: styles?.[UI_1.UI.WeekNumber], tabIndex: isInteractive ? 0 : undefined, onClick: (e) => onWeekNumberClick?.(props.week.weekNumber, props.week.days.map((day) => day.date), e) }, formatWeekNumber(props.week.weekNumber, { locale })));
21
25
  }
22
26
  exports.WeekNumber = WeekNumber;
23
27
  //# sourceMappingURL=WeekNumber.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WeekNumber.js","sourceRoot":"","sources":["../../../src/components/WeekNumber.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,8BAA2B;AAE3B,6CAA6C;AAE7C;;;;;;;GAOG;AACH,SAAgB,UAAU,CAAC,KAA6B;IACtD,MAAM,EACJ,UAAU,EACV,UAAU,EAAE,EAAE,gBAAgB,EAAE,EAChC,MAAM,EAAE,EAAE,eAAe,EAAE,EAC3B,MAAM,EACN,MAAM,EACN,iBAAiB,EAClB,GAAG,IAAA,gBAAQ,GAAE,CAAC;IACf,OAAO,CACL,uCACE,IAAI,EAAC,WAAW,mBACD,CAAC,gBACJ,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,EAC9D,SAAS,EAAE,UAAU,CAAC,OAAE,CAAC,UAAU,CAAC,EACpC,KAAK,EAAE,MAAM,EAAE,CAAC,OAAE,CAAC,UAAU,CAAC,EAC9B,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,kBAC7B,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAClD,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CACb,iBAAiB,EAAE,CACjB,KAAK,CAAC,IAAI,CAAC,UAAU,EACrB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EACtC,CAAC,CACF,IAGF,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,CAChD,CACP,CAAC;AACJ,CAAC;AA7BD,gCA6BC"}
1
+ {"version":3,"file":"WeekNumber.js","sourceRoot":"","sources":["../../../src/components/WeekNumber.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,8BAA2C;AAE3C,6CAA6C;AAE7C;;;;;;;GAOG;AACH,SAAgB,UAAU,CAAC,KAA6B;IACtD,MAAM,EACJ,UAAU,EACV,UAAU,EAAE,EAAE,gBAAgB,EAAE,EAChC,MAAM,EAAE,EAAE,eAAe,EAAE,EAC3B,MAAM,EACN,MAAM,EACN,iBAAiB,EAClB,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAEf,MAAM,aAAa,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEjD,OAAO,CACL,uCACE,IAAI,EAAC,WAAW,mBACD,CAAC,gBACJ,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,EAC9D,SAAS,EAAE;YACT,UAAU,CAAC,OAAE,CAAC,UAAU,CAAC;YACzB,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,mBAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE;SAC9D,CAAC,IAAI,CAAC,GAAG,CAAC,EACX,KAAK,EAAE,MAAM,EAAE,CAAC,OAAE,CAAC,UAAU,CAAC,EAC9B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EACvC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CACb,iBAAiB,EAAE,CACjB,KAAK,CAAC,IAAI,CAAC,UAAU,EACrB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EACtC,CAAC,CACF,IAGF,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,CAChD,CACP,CAAC;AACJ,CAAC;AAlCD,gCAkCC"}
@@ -20,14 +20,14 @@ const Dropdown_1 = require("./Dropdown");
20
20
  * @see https://react-day-picker.js.org/advanced-guides/custom-components
21
21
  */
22
22
  function YearsDropdown(props) {
23
- const { classNames, components, labels: { labelYearDropdown } } = (0, props_1.useProps)();
23
+ const { classNames, components, disableNavigation, labels: { labelYearDropdown } } = (0, props_1.useProps)();
24
24
  const { dropdownOptions: dropdown, goToMonth } = (0, calendar_1.useCalendar)();
25
25
  const handleChange = (e) => {
26
26
  const month = (0, setYear_1.setYear)((0, startOfMonth_1.startOfMonth)(props.month.date), Number(e.target.value));
27
27
  goToMonth(month);
28
28
  };
29
29
  const Dropdown = components?.Dropdown ?? Dropdown_1.Dropdown;
30
- return (react_1.default.createElement(Dropdown, { name: "year", "aria-label": labelYearDropdown(), rootClassName: classNames[UI_1.UI.YearsDropdown], options: dropdown.years, value: props.month.date.getFullYear(), onChange: handleChange }));
30
+ return (react_1.default.createElement(Dropdown, { "aria-label": labelYearDropdown(), disabled: Boolean(disableNavigation), rootClassName: classNames[UI_1.UI.YearsDropdown], options: dropdown.years, value: props.month.date.getFullYear(), onChange: handleChange }));
31
31
  }
32
32
  exports.YearsDropdown = YearsDropdown;
33
33
  //# sourceMappingURL=YearsDropdown.js.map