@skbkontur/react-ui 4.23.0 → 4.25.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 (264) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/cjs/components/Calendar/Calendar.d.ts +40 -5
  3. package/cjs/components/Calendar/Calendar.js +92 -36
  4. package/cjs/components/Calendar/Calendar.js.map +1 -1
  5. package/cjs/components/Calendar/Calendar.md +42 -1
  6. package/cjs/components/Calendar/Calendar.styles.js +1 -1
  7. package/cjs/components/Calendar/Calendar.styles.js.map +1 -1
  8. package/cjs/components/Calendar/CalendarContext.d.ts +12 -0
  9. package/cjs/components/Calendar/CalendarContext.js +16 -0
  10. package/cjs/components/Calendar/CalendarContext.js.map +1 -0
  11. package/cjs/components/Calendar/CalendarDateShape.d.ts +4 -2
  12. package/cjs/components/Calendar/CalendarDateShape.js +13 -3
  13. package/cjs/components/Calendar/CalendarDateShape.js.map +1 -1
  14. package/cjs/components/Calendar/CalendarDay.d.ts +12 -0
  15. package/cjs/components/Calendar/CalendarDay.js +77 -0
  16. package/cjs/components/Calendar/CalendarDay.js.map +1 -0
  17. package/cjs/components/Calendar/CalendarDay.md +70 -0
  18. package/cjs/components/Calendar/CalendarUtils.d.ts +2 -1
  19. package/cjs/components/Calendar/CalendarUtils.js +4 -6
  20. package/cjs/components/Calendar/CalendarUtils.js.map +1 -1
  21. package/cjs/components/Calendar/DayCellView.d.ts +4 -12
  22. package/cjs/components/Calendar/DayCellView.js +20 -43
  23. package/cjs/components/Calendar/DayCellView.js.map +1 -1
  24. package/cjs/components/Calendar/DayCellView.styles.d.ts +2 -5
  25. package/cjs/components/Calendar/DayCellView.styles.js +17 -24
  26. package/cjs/components/Calendar/DayCellView.styles.js.map +1 -1
  27. package/cjs/components/Calendar/Month.d.ts +0 -10
  28. package/cjs/components/Calendar/Month.js +33 -86
  29. package/cjs/components/Calendar/Month.js.map +1 -1
  30. package/cjs/components/Calendar/MonthView.d.ts +3 -2
  31. package/cjs/components/Calendar/MonthView.js +47 -37
  32. package/cjs/components/Calendar/MonthView.js.map +1 -1
  33. package/cjs/components/Calendar/MonthView.styles.d.ts +3 -0
  34. package/cjs/components/Calendar/MonthView.styles.js +45 -7
  35. package/cjs/components/Calendar/MonthView.styles.js.map +1 -1
  36. package/cjs/components/Calendar/MonthViewModel.js +24 -6
  37. package/cjs/components/Calendar/MonthViewModel.js.map +1 -1
  38. package/cjs/components/Calendar/config.js +12 -6
  39. package/cjs/components/Calendar/config.js.map +1 -1
  40. package/cjs/components/Calendar/index.d.ts +1 -0
  41. package/cjs/components/Calendar/index.js +2 -1
  42. package/cjs/components/Calendar/index.js.map +1 -1
  43. package/cjs/components/DatePicker/DatePicker.d.ts +4 -1
  44. package/cjs/components/DatePicker/DatePicker.js +71 -44
  45. package/cjs/components/DatePicker/DatePicker.js.map +1 -1
  46. package/cjs/components/DatePicker/DatePicker.md +36 -1
  47. package/cjs/components/DatePicker/DatePickerHelpers.js +2 -1
  48. package/cjs/components/DatePicker/DatePickerHelpers.js.map +1 -1
  49. package/cjs/components/DatePicker/MobilePicker.d.ts +10 -0
  50. package/cjs/components/DatePicker/MobilePicker.js +118 -0
  51. package/cjs/components/DatePicker/MobilePicker.js.map +1 -0
  52. package/cjs/components/DatePicker/MobilePicker.styles.d.ts +3 -0
  53. package/cjs/components/DatePicker/MobilePicker.styles.js +8 -0
  54. package/cjs/components/DatePicker/MobilePicker.styles.js.map +1 -0
  55. package/cjs/components/DatePicker/getMobilePickerTheme.d.ts +2 -0
  56. package/cjs/components/DatePicker/getMobilePickerTheme.js +19 -0
  57. package/cjs/components/DatePicker/getMobilePickerTheme.js.map +1 -0
  58. package/cjs/components/Input/Input.js +1 -1
  59. package/cjs/components/Input/Input.js.map +1 -1
  60. package/cjs/components/Input/Input.styles.d.ts +1 -1
  61. package/cjs/components/Input/Input.styles.js +3 -2
  62. package/cjs/components/Input/Input.styles.js.map +1 -1
  63. package/cjs/components/Input/InputLayout/InputLayout.styles.d.ts +1 -1
  64. package/cjs/components/Input/InputLayout/InputLayout.styles.js +3 -2
  65. package/cjs/components/Input/InputLayout/InputLayout.styles.js.map +1 -1
  66. package/cjs/components/Input/InputLayout/InputLayoutAsideIcon.js +1 -1
  67. package/cjs/components/Input/InputLayout/InputLayoutAsideIcon.js.map +1 -1
  68. package/cjs/internal/DateSelect/DateSelect.d.ts +2 -0
  69. package/cjs/internal/DateSelect/DateSelect.js +50 -4
  70. package/cjs/internal/DateSelect/DateSelect.js.map +1 -1
  71. package/cjs/internal/DateSelect/DateSelect.styles.d.ts +1 -0
  72. package/cjs/internal/DateSelect/DateSelect.styles.js +15 -1
  73. package/cjs/internal/DateSelect/DateSelect.styles.js.map +1 -1
  74. package/cjs/internal/DateSelect/locale/locales/en.js +2 -1
  75. package/cjs/internal/DateSelect/locale/locales/en.js.map +1 -1
  76. package/cjs/internal/DateSelect/locale/locales/ru.js +2 -1
  77. package/cjs/internal/DateSelect/locale/locales/ru.js.map +1 -1
  78. package/cjs/internal/DateSelect/locale/types.d.ts +1 -0
  79. package/cjs/internal/InputLikeText/InputLikeText.js +1 -1
  80. package/cjs/internal/InputLikeText/InputLikeText.js.map +1 -1
  81. package/cjs/internal/MobilePopup/MobilePopup.d.ts +4 -0
  82. package/cjs/internal/MobilePopup/MobilePopup.js +8 -2
  83. package/cjs/internal/MobilePopup/MobilePopup.js.map +1 -1
  84. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.d.ts +7 -0
  85. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js +32 -0
  86. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js.map +1 -0
  87. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.d.ts +4 -0
  88. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js +15 -0
  89. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js.map +1 -0
  90. package/cjs/internal/MobilePopup/MobilePopupFooter/index.d.ts +1 -0
  91. package/cjs/internal/MobilePopup/MobilePopupFooter/index.js +1 -0
  92. package/cjs/internal/MobilePopup/MobilePopupFooter/index.js.map +1 -0
  93. package/cjs/internal/NativeDateInput/utils.js +3 -2
  94. package/cjs/internal/NativeDateInput/utils.js.map +1 -1
  95. package/cjs/internal/ThemePlayground/ThemeContextPlayground.js +9 -6
  96. package/cjs/internal/ThemePlayground/ThemeContextPlayground.js.map +1 -1
  97. package/cjs/internal/ThemePlayground/constants.js +2 -1
  98. package/cjs/internal/ThemePlayground/constants.js.map +1 -1
  99. package/cjs/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
  100. package/cjs/internal/themes/DarkTheme.d.ts +2 -0
  101. package/cjs/internal/themes/DarkTheme.js +6 -1
  102. package/cjs/internal/themes/DarkTheme.js.map +1 -1
  103. package/cjs/internal/themes/DefaultTheme.d.ts +18 -0
  104. package/cjs/internal/themes/DefaultTheme.js +32 -4
  105. package/cjs/internal/themes/DefaultTheme.js.map +1 -1
  106. package/cjs/lib/date/InternalDate.d.ts +2 -0
  107. package/cjs/lib/date/InternalDate.js +8 -1
  108. package/cjs/lib/date/InternalDate.js.map +1 -1
  109. package/cjs/lib/date/InternalDateTransformer.d.ts +3 -0
  110. package/cjs/lib/date/InternalDateTransformer.js +23 -0
  111. package/cjs/lib/date/InternalDateTransformer.js.map +1 -1
  112. package/cjs/lib/date/InternalDateValidator.js +2 -1
  113. package/cjs/lib/date/InternalDateValidator.js.map +1 -1
  114. package/cjs/lib/date/comparison.d.ts +6 -0
  115. package/cjs/lib/date/comparison.js +44 -0
  116. package/cjs/lib/date/comparison.js.map +1 -0
  117. package/cjs/lib/locale/constants.d.ts +3 -0
  118. package/cjs/lib/locale/constants.js +6 -2
  119. package/cjs/lib/locale/constants.js.map +1 -1
  120. package/cjs/lib/theming/ThemeContext.md +3 -1
  121. package/cjs/lib/theming/themes/Theme2022DarkUpdate2024.d.ts +30 -0
  122. package/cjs/lib/theming/themes/Theme2022DarkUpdate2024.js +50 -0
  123. package/cjs/lib/theming/themes/Theme2022DarkUpdate2024.js.map +1 -0
  124. package/cjs/lib/theming/themes/Theme2022Update2024.d.ts +46 -0
  125. package/cjs/lib/theming/themes/Theme2022Update2024.js +75 -0
  126. package/cjs/lib/theming/themes/Theme2022Update2024.js.map +1 -0
  127. package/components/Calendar/Calendar/Calendar.js +81 -64
  128. package/components/Calendar/Calendar/Calendar.js.map +1 -1
  129. package/components/Calendar/Calendar.d.ts +40 -5
  130. package/components/Calendar/Calendar.md +42 -1
  131. package/components/Calendar/Calendar.styles/Calendar.styles.js +1 -1
  132. package/components/Calendar/Calendar.styles/Calendar.styles.js.map +1 -1
  133. package/components/Calendar/CalendarContext/CalendarContext.js +2 -0
  134. package/components/Calendar/CalendarContext/CalendarContext.js.map +1 -0
  135. package/components/Calendar/CalendarContext/package.json +6 -0
  136. package/components/Calendar/CalendarContext.d.ts +12 -0
  137. package/components/Calendar/CalendarDateShape/CalendarDateShape.js +23 -1
  138. package/components/Calendar/CalendarDateShape/CalendarDateShape.js.map +1 -1
  139. package/components/Calendar/CalendarDateShape.d.ts +4 -2
  140. package/components/Calendar/CalendarDay/CalendarDay.js +62 -0
  141. package/components/Calendar/CalendarDay/CalendarDay.js.map +1 -0
  142. package/components/Calendar/CalendarDay/package.json +6 -0
  143. package/components/Calendar/CalendarDay.d.ts +12 -0
  144. package/components/Calendar/CalendarDay.md +70 -0
  145. package/components/Calendar/CalendarUtils/CalendarUtils.js +5 -4
  146. package/components/Calendar/CalendarUtils/CalendarUtils.js.map +1 -1
  147. package/components/Calendar/CalendarUtils.d.ts +2 -1
  148. package/components/Calendar/DayCellView/DayCellView.js +32 -46
  149. package/components/Calendar/DayCellView/DayCellView.js.map +1 -1
  150. package/components/Calendar/DayCellView.d.ts +4 -12
  151. package/components/Calendar/DayCellView.styles/DayCellView.styles.js +10 -13
  152. package/components/Calendar/DayCellView.styles/DayCellView.styles.js.map +1 -1
  153. package/components/Calendar/DayCellView.styles.d.ts +2 -5
  154. package/components/Calendar/Month/Month.js +45 -80
  155. package/components/Calendar/Month/Month.js.map +1 -1
  156. package/components/Calendar/Month.d.ts +0 -10
  157. package/components/Calendar/MonthView/MonthView.js +49 -44
  158. package/components/Calendar/MonthView/MonthView.js.map +1 -1
  159. package/components/Calendar/MonthView.d.ts +3 -2
  160. package/components/Calendar/MonthView.styles/MonthView.styles.js +20 -6
  161. package/components/Calendar/MonthView.styles/MonthView.styles.js.map +1 -1
  162. package/components/Calendar/MonthView.styles.d.ts +3 -0
  163. package/components/Calendar/MonthViewModel/MonthViewModel.js +9 -6
  164. package/components/Calendar/MonthViewModel/MonthViewModel.js.map +1 -1
  165. package/components/Calendar/config/config.js +6 -4
  166. package/components/Calendar/config/config.js.map +1 -1
  167. package/components/Calendar/index/index.js +2 -1
  168. package/components/Calendar/index/index.js.map +1 -1
  169. package/components/Calendar/index.d.ts +1 -0
  170. package/components/DatePicker/DatePicker/DatePicker.js +60 -38
  171. package/components/DatePicker/DatePicker/DatePicker.js.map +1 -1
  172. package/components/DatePicker/DatePicker.d.ts +4 -1
  173. package/components/DatePicker/DatePicker.md +36 -1
  174. package/components/DatePicker/DatePickerHelpers/DatePickerHelpers.js +2 -1
  175. package/components/DatePicker/DatePickerHelpers/DatePickerHelpers.js.map +1 -1
  176. package/components/DatePicker/MobilePicker/MobilePicker.js +91 -0
  177. package/components/DatePicker/MobilePicker/MobilePicker.js.map +1 -0
  178. package/components/DatePicker/MobilePicker/package.json +6 -0
  179. package/components/DatePicker/MobilePicker.d.ts +10 -0
  180. package/components/DatePicker/MobilePicker.styles/MobilePicker.styles.js +10 -0
  181. package/components/DatePicker/MobilePicker.styles/MobilePicker.styles.js.map +1 -0
  182. package/components/DatePicker/MobilePicker.styles/package.json +6 -0
  183. package/components/DatePicker/MobilePicker.styles.d.ts +3 -0
  184. package/components/DatePicker/getMobilePickerTheme/getMobilePickerTheme.js +14 -0
  185. package/components/DatePicker/getMobilePickerTheme/getMobilePickerTheme.js.map +1 -0
  186. package/components/DatePicker/getMobilePickerTheme/package.json +6 -0
  187. package/components/DatePicker/getMobilePickerTheme.d.ts +2 -0
  188. package/components/Input/Input/Input.js +1 -1
  189. package/components/Input/Input/Input.js.map +1 -1
  190. package/components/Input/Input.styles/Input.styles.js +2 -2
  191. package/components/Input/Input.styles/Input.styles.js.map +1 -1
  192. package/components/Input/Input.styles.d.ts +1 -1
  193. package/components/Input/InputLayout/InputLayout.styles/InputLayout.styles.js +2 -2
  194. package/components/Input/InputLayout/InputLayout.styles/InputLayout.styles.js.map +1 -1
  195. package/components/Input/InputLayout/InputLayout.styles.d.ts +1 -1
  196. package/components/Input/InputLayout/InputLayoutAsideIcon/InputLayoutAsideIcon.js +1 -1
  197. package/components/Input/InputLayout/InputLayoutAsideIcon/InputLayoutAsideIcon.js.map +1 -1
  198. package/internal/DateSelect/DateSelect/DateSelect.js +56 -4
  199. package/internal/DateSelect/DateSelect/DateSelect.js.map +1 -1
  200. package/internal/DateSelect/DateSelect.d.ts +2 -0
  201. package/internal/DateSelect/DateSelect.styles/DateSelect.styles.js +4 -1
  202. package/internal/DateSelect/DateSelect.styles/DateSelect.styles.js.map +1 -1
  203. package/internal/DateSelect/DateSelect.styles.d.ts +1 -0
  204. package/internal/DateSelect/locale/locales/en/en.js +2 -1
  205. package/internal/DateSelect/locale/locales/en/en.js.map +1 -1
  206. package/internal/DateSelect/locale/locales/ru/ru.js +2 -1
  207. package/internal/DateSelect/locale/locales/ru/ru.js.map +1 -1
  208. package/internal/DateSelect/locale/types.d.ts +1 -0
  209. package/internal/InputLikeText/InputLikeText/InputLikeText.js +1 -1
  210. package/internal/InputLikeText/InputLikeText/InputLikeText.js.map +1 -1
  211. package/internal/MobilePopup/MobilePopup/MobilePopup.js +2 -1
  212. package/internal/MobilePopup/MobilePopup/MobilePopup.js.map +1 -1
  213. package/internal/MobilePopup/MobilePopup.d.ts +4 -0
  214. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter/MobilePopupFooter.js +37 -0
  215. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter/MobilePopupFooter.js.map +1 -0
  216. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter/package.json +6 -0
  217. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.d.ts +7 -0
  218. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles/MobilePopupFooter.styles.js +11 -0
  219. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles/MobilePopupFooter.styles.js.map +1 -0
  220. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles/package.json +6 -0
  221. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.d.ts +4 -0
  222. package/internal/MobilePopup/MobilePopupFooter/index/index.js +1 -0
  223. package/internal/MobilePopup/MobilePopupFooter/index/index.js.map +1 -0
  224. package/internal/MobilePopup/MobilePopupFooter/index/package.json +6 -0
  225. package/internal/MobilePopup/MobilePopupFooter/index.d.ts +1 -0
  226. package/internal/MobilePopup/MobilePopupFooter/package.json +6 -0
  227. package/internal/NativeDateInput/utils/utils.js +2 -1
  228. package/internal/NativeDateInput/utils/utils.js.map +1 -1
  229. package/internal/ThemePlayground/ThemeContextPlayground/ThemeContextPlayground.js +8 -5
  230. package/internal/ThemePlayground/ThemeContextPlayground/ThemeContextPlayground.js.map +1 -1
  231. package/internal/ThemePlayground/constants/constants.js +3 -0
  232. package/internal/ThemePlayground/constants/constants.js.map +1 -1
  233. package/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
  234. package/internal/themes/DarkTheme/DarkTheme.js +2 -0
  235. package/internal/themes/DarkTheme/DarkTheme.js.map +1 -1
  236. package/internal/themes/DarkTheme.d.ts +2 -0
  237. package/internal/themes/DefaultTheme/DefaultTheme.js +32 -1
  238. package/internal/themes/DefaultTheme/DefaultTheme.js.map +1 -1
  239. package/internal/themes/DefaultTheme.d.ts +18 -0
  240. package/lib/date/InternalDate/InternalDate.js +7 -1
  241. package/lib/date/InternalDate/InternalDate.js.map +1 -1
  242. package/lib/date/InternalDate.d.ts +2 -0
  243. package/lib/date/InternalDateTransformer/InternalDateTransformer.js +30 -0
  244. package/lib/date/InternalDateTransformer/InternalDateTransformer.js.map +1 -1
  245. package/lib/date/InternalDateTransformer.d.ts +3 -0
  246. package/lib/date/InternalDateValidator/InternalDateValidator.js +6 -1
  247. package/lib/date/InternalDateValidator/InternalDateValidator.js.map +1 -1
  248. package/lib/date/comparison/comparison.js +45 -0
  249. package/lib/date/comparison/comparison.js.map +1 -0
  250. package/lib/date/comparison/package.json +6 -0
  251. package/lib/date/comparison.d.ts +6 -0
  252. package/lib/locale/constants/constants.js +4 -1
  253. package/lib/locale/constants/constants.js.map +1 -1
  254. package/lib/locale/constants.d.ts +3 -0
  255. package/lib/theming/ThemeContext.md +3 -1
  256. package/lib/theming/themes/Theme2022DarkUpdate2024/Theme2022DarkUpdate2024.js +33 -0
  257. package/lib/theming/themes/Theme2022DarkUpdate2024/Theme2022DarkUpdate2024.js.map +1 -0
  258. package/lib/theming/themes/Theme2022DarkUpdate2024/package.json +6 -0
  259. package/lib/theming/themes/Theme2022DarkUpdate2024.d.ts +30 -0
  260. package/lib/theming/themes/Theme2022Update2024/Theme2022Update2024.js +50 -0
  261. package/lib/theming/themes/Theme2022Update2024/Theme2022Update2024.js.map +1 -0
  262. package/lib/theming/themes/Theme2022Update2024/package.json +6 -0
  263. package/lib/theming/themes/Theme2022Update2024.d.ts +46 -0
  264. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["DayCellView.styles.ts"],"names":["css","memoizeStyle","prefix","resetButton","globalClasses","todayCaption","styles","cell","t","calendarCellBg","calendarCellSize","calendarCellLineHeight","calendarCellHoverBgColor","calendarCellHoverColor","calendarCellActiveHoverColor","selected","calendarCellSelectedBgColor","calendarCellSelectedFontColor","weekend","calendarCellWeekendColor","today","calendarCellTodayBorder","today2022"],"mappings":"8MAAA,SAASA,G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D,GAjEgC,EAAD,CAA3B","sourcesContent":["import { css, memoizeStyle, prefix } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\nimport { resetButton } from '../../lib/styles/Mixins';\n\nexport const globalClasses = prefix('day-cell-view')({\n todayCaption: 'today-caption',\n});\n\nexport const styles = memoizeStyle({\n cell(t: Theme) {\n return css`\n ${resetButton()};\n\n background: ${t.calendarCellBg};\n border: 1px solid transparent;\n display: inline-block;\n font-size: 14px;\n padding: 0;\n text-align: center;\n user-select: none;\n position: relative;\n\n width: ${t.calendarCellSize};\n height: ${t.calendarCellSize};\n line-height: ${t.calendarCellLineHeight};\n border-radius: 50%;\n\n &:hover {\n background-color: ${t.calendarCellHoverBgColor};\n color: ${t.calendarCellHoverColor};\n cursor: pointer;\n }\n &:disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n &:active:hover:enabled {\n color: ${t.calendarCellActiveHoverColor};\n }\n `;\n },\n\n selected(t: Theme) {\n return css`\n background-color: ${t.calendarCellSelectedBgColor};\n color: ${t.calendarCellSelectedFontColor};\n `;\n },\n\n weekend(t: Theme) {\n return css`\n color: ${t.calendarCellWeekendColor};\n `;\n },\n\n today(t: Theme) {\n return css`\n border: ${t.calendarCellTodayBorder};\n `;\n },\n\n today2022(t: Theme) {\n return css`\n .${globalClasses.todayCaption} {\n border-bottom: ${t.calendarCellTodayBorder};\n }\n `;\n },\n\n todayCaption() {\n return css`\n padding-bottom: 2px;\n `;\n },\n});\n"]}
1
+ {"version":3,"sources":["DayCellView.styles.ts"],"names":["css","memoizeStyle","resetButton","styles","cell","t","calendarCellWidth","calendarCellHeight","day","calendarCellBg","calendarCellFontSize","calendarCellLineHeight","calendarCellBorderRadius","calendarCellHoverBgColor","calendarCellHoverColor","calendarCellActiveHoverColor","selected","calendarCellSelectedBgColor","calendarCellSelectedFontColor","weekend","calendarCellWeekendColor","today","calendarCellTodayBorder","todayCaption2022"],"mappings":"8MAAA,SAASA,GAAT,EAAcC,YAAd,QAAkC,2BAAlC;;AAEA,SAASC,WAAT,QAA4B,yBAA5B;;AAEA,OAAO,IAAMC,MAAM,GAAGF,YAAY,CAAC;AACjCG,EAAAA,IADiC,gBAC5BC,CAD4B,EAClB;AACb,WAAOL,GAAP;AACcK,IAAAA,CAAC,CAACC,iBADhB;AAEYD,IAAAA,CAAC,CAACE,kBAFd;;AAID,GANgC;AAOjCC,EAAAA,GAPiC,eAO7BH,CAP6B,EAOnB;AACZ,WAAOL,GAAP;AACIE,IAAAA,WAAW,EADf;;;;AAKgBG,IAAAA,CAAC,CAACI,cALlB;;AAOeJ,IAAAA,CAAC,CAACK,oBAPjB;;;;;AAYiBL,IAAAA,CAAC,CAACM,sBAZnB;AAamBN,IAAAA,CAAC,CAACO,wBAbrB;;;AAgBwBP,IAAAA,CAAC,CAACQ,wBAhB1B;AAiBaR,IAAAA,CAAC,CAACS,sBAjBf;;;;;;;;AAyBaT,IAAAA,CAAC,CAACU,4BAzBf;;;AA4BD,GApCgC;;AAsCjCC,EAAAA,QAtCiC,oBAsCxBX,CAtCwB,EAsCd;AACjB,WAAOL,GAAP;AACsBK,IAAAA,CAAC,CAACY,2BADxB;AAEWZ,IAAAA,CAAC,CAACa,6BAFb;;AAID,GA3CgC;;AA6CjCC,EAAAA,OA7CiC,mBA6CzBd,CA7CyB,EA6Cf;AAChB,WAAOL,GAAP;AACWK,IAAAA,CAAC,CAACe,wBADb;;AAGD,GAjDgC;;AAmDjCC,EAAAA,KAnDiC,iBAmD3BhB,CAnD2B,EAmDjB;AACd,WAAOL,GAAP;AACYK,IAAAA,CAAC,CAACiB,uBADd;;AAGD,GAvDgC;;AAyDjCC,EAAAA,gBAzDiC,4BAyDhBlB,CAzDgB,EAyDN;AACzB,WAAOL,GAAP;;AAEmBK,IAAAA,CAAC,CAACiB,uBAFrB;;AAID,GA9DgC,EAAD,CAA3B","sourcesContent":["import { css, memoizeStyle } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\nimport { resetButton } from '../../lib/styles/Mixins';\n\nexport const styles = memoizeStyle({\n cell(t: Theme) {\n return css`\n flex: 1 1 ${t.calendarCellWidth};\n height: ${t.calendarCellHeight};\n `;\n },\n day(t: Theme) {\n return css`\n ${resetButton()};\n width: 100%;\n height: 100%;\n\n background: ${t.calendarCellBg};\n border: 1px solid transparent;\n font-size: ${t.calendarCellFontSize};\n padding: 0;\n text-align: center;\n user-select: none;\n position: relative;\n line-height: ${t.calendarCellLineHeight};\n border-radius: ${t.calendarCellBorderRadius};\n\n &:hover {\n background-color: ${t.calendarCellHoverBgColor};\n color: ${t.calendarCellHoverColor};\n cursor: pointer;\n }\n &:disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n &:active:hover:enabled {\n color: ${t.calendarCellActiveHoverColor};\n }\n `;\n },\n\n selected(t: Theme) {\n return css`\n background-color: ${t.calendarCellSelectedBgColor};\n color: ${t.calendarCellSelectedFontColor};\n `;\n },\n\n weekend(t: Theme) {\n return css`\n color: ${t.calendarCellWeekendColor};\n `;\n },\n\n today(t: Theme) {\n return css`\n border: ${t.calendarCellTodayBorder};\n `;\n },\n\n todayCaption2022(t: Theme) {\n return css`\n padding-bottom: 2px;\n border-bottom: ${t.calendarCellTodayBorder};\n `;\n },\n});\n"]}
@@ -1,12 +1,9 @@
1
1
  import { Theme } from '../../lib/theming/Theme';
2
- export declare const globalClasses: {
3
- todayCaption: string;
4
- };
5
2
  export declare const styles: {
6
3
  cell(t: Theme): string;
4
+ day(t: Theme): string;
7
5
  selected(t: Theme): string;
8
6
  weekend(t: Theme): string;
9
7
  today(t: Theme): string;
10
- today2022(t: Theme): string;
11
- todayCaption(): string;
8
+ todayCaption2022(t: Theme): string;
12
9
  };
@@ -1,13 +1,11 @@
1
1
  import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
2
2
  import React from 'react';
3
3
  import { ThemeContext } from "../../../lib/theming/ThemeContext";
4
- import { createPropsGetter } from "../../../lib/createPropsGetter";
5
- import { themeConfig } from "../config";
6
- import * as CDS from "../CalendarDateShape";
7
4
  import { MonthView } from "../MonthView";
8
5
  import { DayCellView } from "../DayCellView";
9
6
  import * as CalendarScrollEvents from "../CalendarScrollEvents";
10
7
  import { styles } from "../MonthView.styles";
8
+ import { styles as cellStyles } from "../DayCellView.styles";
11
9
  export var Month = /*#__PURE__*/function (_React$Component) {
12
10
  _inheritsLoose(Month, _React$Component);
13
11
 
@@ -58,22 +56,6 @@ export var Month = /*#__PURE__*/function (_React$Component) {
58
56
  return true;
59
57
  }
60
58
 
61
- if (!CDS.isEqual(nextProps.value, this.props.value)) {
62
- return true;
63
- }
64
-
65
- if (!CDS.isEqual(nextProps.today, this.props.today)) {
66
- return true;
67
- }
68
-
69
- if (!CDS.isEqual(nextProps.minDate, this.props.minDate)) {
70
- return true;
71
- }
72
-
73
- if (!CDS.isEqual(nextProps.maxDate, this.props.maxDate)) {
74
- return true;
75
- }
76
-
77
59
  return this.props.month !== nextProps.month;
78
60
  };
79
61
 
@@ -93,16 +75,12 @@ export var Month = /*#__PURE__*/function (_React$Component) {
93
75
  _proto.renderMain = function renderMain() {
94
76
  var _this$props = this.props,
95
77
  month = _this$props.month,
96
- maxDate = _this$props.maxDate,
97
- minDate = _this$props.minDate,
98
78
  top = _this$props.top;
99
79
  return /*#__PURE__*/React.createElement(MonthView, {
100
80
  firstDayOffset: month.offset,
101
81
  height: month.getHeight(this.theme),
102
82
  isFirstInYear: month.isFirstInYear,
103
83
  isLastInYear: month.isLastInYear,
104
- maxDate: maxDate,
105
- minDate: minDate,
106
84
  month: month.month,
107
85
  top: top,
108
86
  year: month.year,
@@ -116,96 +94,83 @@ export var Month = /*#__PURE__*/function (_React$Component) {
116
94
  _proto.renderCells = function renderCells() {
117
95
  return /*#__PURE__*/React.createElement(MonthDayGrid, {
118
96
  days: this.props.month.days,
119
- offset: this.props.month.offset,
120
- minDate: this.props.minDate,
121
- maxDate: this.props.maxDate,
122
- today: this.props.today,
123
- value: this.props.value,
124
- onDateClick: this.props.onDateClick,
125
- isHoliday: this.props.isHoliday
97
+ offset: this.props.month.offset
126
98
  });
127
99
  };
128
100
 
129
101
  return Month;
130
102
  }(React.Component);
103
+ var DAYS_PER_WEEK = 7;
131
104
 
132
105
  var MonthDayGrid = /*#__PURE__*/function (_React$Component2) {
133
106
  _inheritsLoose(MonthDayGrid, _React$Component2);
134
107
 
135
108
  function MonthDayGrid() {
136
- var _this3;
137
-
138
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
139
- args[_key2] = arguments[_key2];
140
- }
141
-
142
- _this3 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
143
- _this3.getProps = createPropsGetter(MonthDayGrid.defaultProps);
144
- return _this3;
109
+ return _React$Component2.apply(this, arguments) || this;
145
110
  }
146
111
 
147
112
  var _proto2 = MonthDayGrid.prototype;
148
113
 
149
114
  _proto2.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
150
- if (!CDS.isEqual(nextProps.value, this.props.value)) {
151
- return true;
152
- }
153
-
154
- if (!CDS.isEqual(nextProps.today, this.props.today)) {
155
- return true;
156
- }
157
-
158
- if (!CDS.isEqual(nextProps.minDate, this.props.minDate)) {
159
- return true;
160
- }
161
-
162
- if (!CDS.isEqual(nextProps.maxDate, this.props.maxDate)) {
163
- return true;
164
- }
165
-
166
115
  return this.props.days !== nextProps.days;
167
116
  };
168
117
 
169
118
  _proto2.render = function render() {
170
- var _this4 = this;
119
+ var _this3 = this;
171
120
 
172
121
  return /*#__PURE__*/React.createElement(ThemeContext.Consumer, null, function (theme) {
173
- _this4.theme = theme;
174
- return _this4.renderMain();
122
+ _this3.theme = theme;
123
+ return _this3.renderMain();
175
124
  });
176
125
  };
177
126
 
178
127
  _proto2.renderMain = function renderMain() {
179
- var _this5 = this;
180
-
181
- return /*#__PURE__*/React.createElement("div", {
182
- className: styles.monthDayGrid(this.theme)
183
- }, /*#__PURE__*/React.createElement("div", {
184
- style: {
185
- width: this.props.offset * themeConfig(this.theme).DAY_SIZE,
186
- display: 'inline-block'
187
- }
188
- }), this.props.days.map(function (day) {
189
- var isWeekend = _this5.getProps().isHoliday(day);
128
+ var _this4 = this;
190
129
 
130
+ var leadingDays = Array.from({
131
+ length: this.props.offset
132
+ }, function (_, i) {
133
+ return /*#__PURE__*/React.createElement("div", {
134
+ key: "leading_" + i,
135
+ className: cellStyles.cell(_this4.theme)
136
+ });
137
+ });
138
+ var trailingOffset = DAYS_PER_WEEK - (this.props.offset + this.props.days.length) % DAYS_PER_WEEK;
139
+ var trailingDays = Array.from({
140
+ length: trailingOffset
141
+ }, function (_, i) {
142
+ return /*#__PURE__*/React.createElement("div", {
143
+ key: "trailing_" + i,
144
+ className: cellStyles.cell(_this4.theme)
145
+ });
146
+ });
147
+ var days = this.props.days.map(function (day) {
191
148
  return /*#__PURE__*/React.createElement(DayCellView, {
192
149
  date: day,
193
- key: day.date + "." + day.month + "." + day.year,
194
- minDate: _this5.props.minDate,
195
- maxDate: _this5.props.maxDate,
196
- today: _this5.props.today,
197
- value: _this5.props.value,
198
- isWeekend: isWeekend,
199
- onDateClick: _this5.props.onDateClick
150
+ key: day.date + "." + day.month + "." + day.year
200
151
  });
152
+ });
153
+ var weeks = divideToWeeks(leadingDays.concat(days, trailingDays));
154
+ return /*#__PURE__*/React.createElement("div", {
155
+ className: styles.monthDayGrid(this.theme)
156
+ }, weeks.map(function (week, i) {
157
+ return /*#__PURE__*/React.createElement("div", {
158
+ className: styles.monthDayRow(_this4.theme),
159
+ key: "week_" + i
160
+ }, week);
201
161
  }));
202
162
  };
203
163
 
204
164
  return MonthDayGrid;
205
165
  }(React.Component);
206
166
 
207
- MonthDayGrid.defaultProps = {
208
- isHoliday: function isHoliday(day) {
209
- return day.isWeekend;
167
+ function divideToWeeks(days) {
168
+ var weeks = [];
169
+
170
+ for (var i = 0; i < days.length; i += DAYS_PER_WEEK) {
171
+ var week = days.slice(i, i + DAYS_PER_WEEK);
172
+ weeks.push(week);
210
173
  }
211
- };
174
+
175
+ return weeks;
176
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["Month.tsx"],"names":["React","ThemeContext","createPropsGetter","themeConfig","CDS","MonthView","DayCellView","CalendarScrollEvents","styles","Month","monthSelect","yearSelect","closeSelects","close","monthRef","yearRef","handleMonthSelect","month","props","onMonthYearChange","year","handleYearSelect","shouldComponentUpdate","nextProps","top","isEqual","value","today","minDate","maxDate","componentDidMount","addListener","render","theme","renderMain","offset","getHeight","isFirstInYear","isLastInYear","renderCells","days","onDateClick","isHoliday","Component","MonthDayGrid","getProps","defaultProps","monthDayGrid","width","DAY_SIZE","display","map","day","isWeekend","date"],"mappings":"sEAAA,OAAOA,KAAP,MAAkB,OAAlB;;AAEA,SAASC,YAAT,QAA6B,gCAA7B;;;;AAIA,SAASC,iBAAT,QAAkC,6BAAlC;;AAEA,SAASC,WAAT,QAA4B,UAA5B;AACA,OAAO,KAAKC,GAAZ,MAAqB,qBAArB;;;AAGA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,OAAO,KAAKC,oBAAZ,MAAsC,wBAAtC;AACA,SAASC,MAAT,QAAuB,oBAAvB;;;;;;;;;;;;;;;;AAgBA,WAAaC,KAAb;;;AAGUC,IAAAA,WAHV,GAG2C,IAH3C;AAIUC,IAAAA,UAJV,GAI0C,IAJ1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EUC,IAAAA,YA9EV,GA8EyB,YAAM;AAC3B,UAAI,MAAKF,WAAT,EAAsB;AACpB,cAAKA,WAAL,CAAiBG,KAAjB;AACD;AACD,UAAI,MAAKF,UAAT,EAAqB;AACnB,cAAKA,UAAL,CAAgBE,KAAhB;AACD;AACF,KArFH;;AAuFUC,IAAAA,QAvFV,GAuFqB,UAACJ,WAAD,EAAoC;AACrD,YAAKA,WAAL,GAAmBA,WAAnB;AACD,KAzFH;;AA2FUK,IAAAA,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,EAAE1B,MAAM,CAACuC,YAAP,CAAoB,KAAKd,KAAzB,CAAhB;AACE;AACE,QAAA,KAAK,EAAE;AACLe,UAAAA,KAAK,EAAE,KAAK9B,KAAL,CAAWiB,MAAX,GAAoBhC,WAAW,CAAC,KAAK8B,KAAN,CAAX,CAAwBgB,QAD9C;AAELC,UAAAA,OAAO,EAAE,cAFJ,EADT,GADF;;;AAOG,WAAKhC,KAAL,CAAWsB,IAAX,CAAgBW,GAAhB,CAAoB,UAACC,GAAD,EAAS;AAC5B,YAAMC,SAAS,GAAG,MAAI,CAACR,QAAL,GAAgBH,SAAhB,CAA0BU,GAA1B,CAAlB;;AAEA;AACE,8BAAC,WAAD;AACE,YAAA,IAAI,EAAEA,GADR;AAEE,YAAA,GAAG,EAAKA,GAAG,CAACE,IAAT,SAAiBF,GAAG,CAACnC,KAArB,SAA8BmC,GAAG,CAAChC,IAFvC;AAGE,YAAA,OAAO,EAAE,MAAI,CAACF,KAAL,CAAWU,OAHtB;AAIE,YAAA,OAAO,EAAE,MAAI,CAACV,KAAL,CAAWW,OAJtB;AAKE,YAAA,KAAK,EAAE,MAAI,CAACX,KAAL,CAAWS,KALpB;AAME,YAAA,KAAK,EAAE,MAAI,CAACT,KAAL,CAAWQ,KANpB;AAOE,YAAA,SAAS,EAAE2B,SAPb;AAQE,YAAA,WAAW,EAAE,MAAI,CAACnC,KAAL,CAAWuB,WAR1B,GADF;;;AAYD,OAfA,CAPH,CADF;;;AA0BD,G,uBA/DwBzC,KAAK,CAAC2C,S,EAA3BC,Y,CAGUE,Y,GAA6B,EACzCJ,SAAS,EAAE,mBAACU,GAAD,UAAyDA,GAAG,CAACC,SAA7D,EAD8B,E","sourcesContent":["import React from 'react';\n\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { DateSelect } from '../../internal/DateSelect';\nimport { Nullable } from '../../typings/utility-types';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\n\nimport { themeConfig } from './config';\nimport * as CDS from './CalendarDateShape';\nimport { MonthViewModel } from './MonthViewModel';\nimport { DayCellViewModel } from './DayCellViewModel';\nimport { MonthView } from './MonthView';\nimport { DayCellView } from './DayCellView';\nimport * as CalendarScrollEvents from './CalendarScrollEvents';\nimport { styles } from './MonthView.styles';\n\ninterface MonthProps {\n top: number;\n month: MonthViewModel;\n maxDate?: CDS.CalendarDateShape;\n minDate?: CDS.CalendarDateShape;\n today?: CDS.CalendarDateShape;\n value?: Nullable<CDS.CalendarDateShape>;\n onDateClick?: (date: CDS.CalendarDateShape) => void;\n onMonthYearChange: (month: number, year: number) => void;\n isHoliday?: (day: CDS.CalendarDateShape & { isWeekend: boolean }) => boolean;\n}\n\ntype DefaultProps = Required<Pick<MonthDayGridProps, 'isHoliday'>>;\n\nexport class Month extends React.Component<MonthProps> {\n private theme!: Theme;\n\n private monthSelect: DateSelect | null = null;\n private yearSelect: DateSelect | null = null;\n\n public shouldComponentUpdate(nextProps: MonthProps) {\n if (this.props.top !== nextProps.top) {\n return true;\n }\n if (!CDS.isEqual(nextProps.value, this.props.value)) {\n return true;\n }\n if (!CDS.isEqual(nextProps.today, this.props.today)) {\n return true;\n }\n if (!CDS.isEqual(nextProps.minDate, this.props.minDate)) {\n return true;\n }\n if (!CDS.isEqual(nextProps.maxDate, this.props.maxDate)) {\n return true;\n }\n return this.props.month !== nextProps.month;\n }\n\n public componentDidMount() {\n CalendarScrollEvents.addListener(this.closeSelects);\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n public renderMain() {\n const { month, maxDate, minDate, top } = this.props;\n return (\n <MonthView\n firstDayOffset={month.offset}\n height={month.getHeight(this.theme)}\n isFirstInYear={month.isFirstInYear}\n isLastInYear={month.isLastInYear}\n maxDate={maxDate}\n minDate={minDate}\n month={month.month}\n top={top}\n year={month.year}\n onMonthSelect={this.handleMonthSelect}\n onYearSelect={this.handleYearSelect}\n monthSelectRef={this.monthRef}\n yearSelectRef={this.yearRef}\n >\n {this.renderCells()}\n </MonthView>\n );\n }\n\n private renderCells() {\n return (\n <MonthDayGrid\n days={this.props.month.days}\n offset={this.props.month.offset}\n minDate={this.props.minDate}\n maxDate={this.props.maxDate}\n today={this.props.today}\n value={this.props.value}\n onDateClick={this.props.onDateClick}\n isHoliday={this.props.isHoliday}\n />\n );\n }\n\n private closeSelects = () => {\n if (this.monthSelect) {\n this.monthSelect.close();\n }\n if (this.yearSelect) {\n this.yearSelect.close();\n }\n };\n\n private monthRef = (monthSelect: DateSelect | null) => {\n this.monthSelect = monthSelect;\n };\n\n private yearRef = (yearSelect: DateSelect | null) => {\n this.yearSelect = yearSelect;\n };\n\n private handleMonthSelect = (month: number) => {\n this.props.onMonthYearChange(month, this.props.month.year);\n };\n\n private handleYearSelect = (year: number) => {\n this.props.onMonthYearChange(this.props.month.month, year);\n };\n}\n\ninterface MonthDayGridProps {\n days: DayCellViewModel[];\n offset: number;\n minDate?: CDS.CalendarDateShape;\n maxDate?: CDS.CalendarDateShape;\n today?: CDS.CalendarDateShape;\n value?: Nullable<CDS.CalendarDateShape>;\n onDateClick?: (x0: CDS.CalendarDateShape) => void;\n isHoliday?: (day: CDS.CalendarDateShape & { isWeekend: boolean }) => boolean;\n}\n\nclass MonthDayGrid extends React.Component<MonthDayGridProps> {\n private theme!: Theme;\n\n public static defaultProps: DefaultProps = {\n isHoliday: (day: CDS.CalendarDateShape & { isWeekend: boolean }) => day.isWeekend,\n };\n\n private getProps = createPropsGetter(MonthDayGrid.defaultProps);\n\n public shouldComponentUpdate(nextProps: MonthDayGridProps) {\n if (!CDS.isEqual(nextProps.value, this.props.value)) {\n return true;\n }\n if (!CDS.isEqual(nextProps.today, this.props.today)) {\n return true;\n }\n if (!CDS.isEqual(nextProps.minDate, this.props.minDate)) {\n return true;\n }\n if (!CDS.isEqual(nextProps.maxDate, this.props.maxDate)) {\n return true;\n }\n return this.props.days !== nextProps.days;\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n public renderMain() {\n return (\n <div className={styles.monthDayGrid(this.theme)}>\n <div\n style={{\n width: this.props.offset * themeConfig(this.theme).DAY_SIZE,\n display: 'inline-block',\n }}\n />\n {this.props.days.map((day) => {\n const isWeekend = this.getProps().isHoliday(day);\n\n return (\n <DayCellView\n date={day}\n key={`${day.date}.${day.month}.${day.year}`}\n minDate={this.props.minDate}\n maxDate={this.props.maxDate}\n today={this.props.today}\n value={this.props.value}\n isWeekend={isWeekend}\n onDateClick={this.props.onDateClick}\n />\n );\n })}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["Month.tsx"],"names":["React","ThemeContext","MonthView","DayCellView","CalendarScrollEvents","styles","cellStyles","Month","monthSelect","yearSelect","closeSelects","close","monthRef","yearRef","handleMonthSelect","month","props","onMonthYearChange","year","handleYearSelect","shouldComponentUpdate","nextProps","top","componentDidMount","addListener","render","theme","renderMain","offset","getHeight","isFirstInYear","isLastInYear","renderCells","days","Component","DAYS_PER_WEEK","MonthDayGrid","leadingDays","Array","from","length","_","i","cell","trailingOffset","trailingDays","map","day","date","weeks","divideToWeeks","concat","monthDayGrid","week","monthDayRow","slice","push"],"mappings":"sEAAA,OAAOA,KAAP,MAAkB,OAAlB;;AAEA,SAASC,YAAT,QAA6B,gCAA7B;;;;;;AAMA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,OAAO,KAAKC,oBAAZ,MAAsC,wBAAtC;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,SAASA,MAAM,IAAIC,UAAnB,QAAqC,sBAArC;;;;;;;;AAQA,WAAaC,KAAb;;;AAGUC,IAAAA,WAHV,GAG2C,IAH3C;AAIUC,IAAAA,UAJV,GAI0C,IAJ1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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5B,KAAxB,CAAhB,EAAgD,GAAG,YAAUgB,CAA7D;AACGW,UAAAA,IADH,CADS,GAAV,CADH,CADF;;;;;AASD,G,uBAvCwBrD,KAAK,CAACkC,S;;;AA0CjC,SAASgB,aAAT,CAA0BjB,IAA1B,EAA4C;AAC1C,MAAMgB,KAAY,GAAG,EAArB;AACA,OAAK,IAAIP,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGT,IAAI,CAACO,MAAzB,EAAiCE,CAAC,IAAIP,aAAtC,EAAqD;AACnD,QAAMkB,IAAI,GAAGpB,IAAI,CAACsB,KAAL,CAAWb,CAAX,EAAcA,CAAC,GAAGP,aAAlB,CAAb;AACAc,IAAAA,KAAK,CAACO,IAAN,CAAWH,IAAX;AACD;AACD,SAAOJ,KAAP;AACD","sourcesContent":["import React from 'react';\n\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { DateSelect } from '../../internal/DateSelect';\n\nimport { MonthViewModel } from './MonthViewModel';\nimport { DayCellViewModel } from './DayCellViewModel';\nimport { MonthView } from './MonthView';\nimport { DayCellView } from './DayCellView';\nimport * as CalendarScrollEvents from './CalendarScrollEvents';\nimport { styles } from './MonthView.styles';\nimport { styles as cellStyles } from './DayCellView.styles';\n\ninterface MonthProps {\n top: number;\n month: MonthViewModel;\n onMonthYearChange: (month: number, year: number) => void;\n}\n\nexport class Month extends React.Component<MonthProps> {\n private theme!: Theme;\n\n private monthSelect: DateSelect | null = null;\n private yearSelect: DateSelect | null = null;\n\n public shouldComponentUpdate(nextProps: MonthProps) {\n if (this.props.top !== nextProps.top) {\n return true;\n }\n\n return this.props.month !== nextProps.month;\n }\n\n public componentDidMount() {\n CalendarScrollEvents.addListener(this.closeSelects);\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n public renderMain() {\n const { month, top } = this.props;\n return (\n <MonthView\n firstDayOffset={month.offset}\n height={month.getHeight(this.theme)}\n isFirstInYear={month.isFirstInYear}\n isLastInYear={month.isLastInYear}\n month={month.month}\n top={top}\n year={month.year}\n onMonthSelect={this.handleMonthSelect}\n onYearSelect={this.handleYearSelect}\n monthSelectRef={this.monthRef}\n yearSelectRef={this.yearRef}\n >\n {this.renderCells()}\n </MonthView>\n );\n }\n\n private renderCells() {\n return <MonthDayGrid days={this.props.month.days} offset={this.props.month.offset} />;\n }\n\n private closeSelects = () => {\n if (this.monthSelect) {\n this.monthSelect.close();\n }\n if (this.yearSelect) {\n this.yearSelect.close();\n }\n };\n\n private monthRef = (monthSelect: DateSelect | null) => {\n this.monthSelect = monthSelect;\n };\n\n private yearRef = (yearSelect: DateSelect | null) => {\n this.yearSelect = yearSelect;\n };\n\n private handleMonthSelect = (month: number) => {\n this.props.onMonthYearChange(month, this.props.month.year);\n };\n\n private handleYearSelect = (year: number) => {\n this.props.onMonthYearChange(this.props.month.month, year);\n };\n}\n\nconst DAYS_PER_WEEK = 7;\n\ninterface MonthDayGridProps {\n days: DayCellViewModel[];\n offset: number;\n}\n\nclass MonthDayGrid extends React.Component<MonthDayGridProps> {\n private theme!: Theme;\n\n public shouldComponentUpdate(nextProps: MonthDayGridProps) {\n return this.props.days !== nextProps.days;\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n public renderMain() {\n const leadingDays = Array.from({ length: this.props.offset }, (_, i) => (\n <div key={`leading_${i}`} className={cellStyles.cell(this.theme)} />\n ));\n const trailingOffset = DAYS_PER_WEEK - ((this.props.offset + this.props.days.length) % DAYS_PER_WEEK);\n const trailingDays = Array.from({ length: trailingOffset }, (_, i) => (\n <div key={`trailing_${i}`} className={cellStyles.cell(this.theme)} />\n ));\n const days = this.props.days.map((day) => {\n return <DayCellView date={day} key={`${day.date}.${day.month}.${day.year}`} />;\n });\n const weeks = divideToWeeks(leadingDays.concat(days, trailingDays));\n return (\n <div className={styles.monthDayGrid(this.theme)}>\n {weeks.map((week, i) => (\n <div className={styles.monthDayRow(this.theme)} key={`week_${i}`}>\n {week}\n </div>\n ))}\n </div>\n );\n }\n}\n\nfunction divideToWeeks<T>(days: T[]): T[][] {\n const weeks: T[][] = [];\n for (let i = 0; i < days.length; i += DAYS_PER_WEEK) {\n const week = days.slice(i, i + DAYS_PER_WEEK);\n weeks.push(week);\n }\n return weeks;\n}\n"]}
@@ -1,19 +1,9 @@
1
1
  import React from 'react';
2
- import { Nullable } from '../../typings/utility-types';
3
- import * as CDS from './CalendarDateShape';
4
2
  import { MonthViewModel } from './MonthViewModel';
5
3
  interface MonthProps {
6
4
  top: number;
7
5
  month: MonthViewModel;
8
- maxDate?: CDS.CalendarDateShape;
9
- minDate?: CDS.CalendarDateShape;
10
- today?: CDS.CalendarDateShape;
11
- value?: Nullable<CDS.CalendarDateShape>;
12
- onDateClick?: (date: CDS.CalendarDateShape) => void;
13
6
  onMonthYearChange: (month: number, year: number) => void;
14
- isHoliday?: (day: CDS.CalendarDateShape & {
15
- isWeekend: boolean;
16
- }) => boolean;
17
7
  }
18
8
  export declare class Month extends React.Component<MonthProps> {
19
9
  private theme;
@@ -3,20 +3,60 @@ import { DateSelect } from "../../../internal/DateSelect";
3
3
  import { ThemeContext } from "../../../lib/theming/ThemeContext";
4
4
  import * as ColorFunctions from "../../../lib/styles/ColorFunctions";
5
5
  import { cx } from "../../../lib/theming/Emotion";
6
+ import { useResponsiveLayout } from "../../../components/ResponsiveLayout";
6
7
  import { styles } from "../MonthView.styles";
7
8
  import { themeConfig } from "../config";
8
9
  import * as CDS from "../CalendarDateShape";
9
10
  import { CalendarDataTids } from "../Calendar";
11
+ import { CalendarContext } from "../CalendarContext";
12
+ export var getMinMonth = function getMinMonth(year, minDate) {
13
+ var min = 0;
14
+
15
+ for (var i = 0; i < 12; ++i) {
16
+ if (minDate && CDS.isGreaterOrEqual({
17
+ date: 31,
18
+ month: i,
19
+ year: year
20
+ }, minDate)) {
21
+ min = i;
22
+ break;
23
+ }
24
+ }
25
+
26
+ return min;
27
+ };
28
+ export var getMaxMonth = function getMaxMonth(year, maxDate) {
29
+ var max = 11;
30
+
31
+ for (var i = 11; i >= 0; --i) {
32
+ if (maxDate && CDS.isLessOrEqual({
33
+ date: 1,
34
+ month: i,
35
+ year: year
36
+ }, maxDate)) {
37
+ max = i;
38
+ break;
39
+ }
40
+ }
41
+
42
+ return max;
43
+ };
10
44
  export function MonthView(props) {
11
- var _cx;
45
+ var _cx, _cx2;
12
46
 
13
47
  var theme = useContext(ThemeContext);
48
+
49
+ var _useContext = useContext(CalendarContext),
50
+ minDate = _useContext.minDate,
51
+ maxDate = _useContext.maxDate;
52
+
53
+ var _useResponsiveLayout = useResponsiveLayout(),
54
+ isMobile = _useResponsiveLayout.isMobile;
55
+
14
56
  var children = props.children,
15
57
  height = props.height,
16
58
  isFirstInYear = props.isFirstInYear,
17
59
  isLastInYear = props.isLastInYear,
18
- maxDate = props.maxDate,
19
- minDate = props.minDate,
20
60
  month = props.month,
21
61
  top = props.top,
22
62
  year = props.year,
@@ -33,44 +73,9 @@ export function MonthView(props) {
33
73
  var yearTop = isHeaderSticky && !isLastInYear ? -headerTop - top : 0;
34
74
  var monthSelectDisabled = top > 40 || headerTop < 0 || headerTop >= height - themeConfig(theme).MONTH_TITLE_HEIGHT;
35
75
  var yearSelectDisabled = top > 40 || isLastInYear && top < -height + themeConfig(theme).MONTH_TITLE_HEIGHT;
36
-
37
- var getMinMonth = function getMinMonth(value) {
38
- var min = 0;
39
-
40
- for (var i = 0; i < 12; ++i) {
41
- if (minDate && CDS.isGreaterOrEqual({
42
- date: 31,
43
- month: i,
44
- year: value
45
- }, minDate)) {
46
- min = i;
47
- break;
48
- }
49
- }
50
-
51
- return min;
52
- };
53
-
54
- var getMaxMonth = function getMaxMonth(value) {
55
- var max = 11;
56
-
57
- for (var i = 11; i >= 0; --i) {
58
- if (maxDate && CDS.isLessOrEqual({
59
- date: 1,
60
- month: i,
61
- year: value
62
- }, maxDate)) {
63
- max = i;
64
- break;
65
- }
66
- }
67
-
68
- return max;
69
- };
70
-
71
76
  return /*#__PURE__*/React.createElement("div", {
72
77
  "data-tid": CalendarDataTids.month,
73
- className: styles.month(theme),
78
+ className: cx((_cx = {}, _cx[styles.month(theme)] = true, _cx[styles.monthMobile()] = isMobile, _cx)),
74
79
  style: {
75
80
  top: top
76
81
  },
@@ -79,7 +84,7 @@ export function MonthView(props) {
79
84
  style: {
80
85
  top: headerTop
81
86
  },
82
- className: cx((_cx = {}, _cx[styles.header()] = true, _cx[styles.headerSticky(theme)] = isHeaderSticky, _cx))
87
+ className: cx((_cx2 = {}, _cx2[styles.header()] = true, _cx2[styles.headerSticky(theme)] = isHeaderSticky, _cx2))
83
88
  }, /*#__PURE__*/React.createElement("div", {
84
89
  style: {
85
90
  borderBottomColor: borderBottomColor
@@ -90,13 +95,13 @@ export function MonthView(props) {
90
95
  className: styles.headerMonth(theme)
91
96
  }, /*#__PURE__*/React.createElement(DateSelect, {
92
97
  disabled: monthSelectDisabled,
93
- width: 85,
98
+ width: isMobile ? '6em' : 85,
94
99
  type: "month",
95
100
  value: month,
96
101
  onValueChange: onMonthSelect,
97
102
  ref: !monthSelectDisabled ? monthSelectRef : undefined,
98
- minValue: getMinMonth(year),
99
- maxValue: getMaxMonth(year)
103
+ minValue: getMinMonth(year, minDate),
104
+ maxValue: getMaxMonth(year, maxDate)
100
105
  })), isYearVisible && /*#__PURE__*/React.createElement("div", {
101
106
  "data-tid": CalendarDataTids.headerYear,
102
107
  className: styles.headerYear(theme),
@@ -105,7 +110,7 @@ export function MonthView(props) {
105
110
  }
106
111
  }, /*#__PURE__*/React.createElement(DateSelect, {
107
112
  disabled: yearSelectDisabled,
108
- width: 50,
113
+ width: isMobile ? '3.5em' : 50,
109
114
  type: "year",
110
115
  value: year,
111
116
  minValue: minDate ? minDate.year : undefined,
@@ -1 +1 @@
1
- {"version":3,"sources":["MonthView.tsx"],"names":["React","useContext","DateSelect","ThemeContext","ColorFunctions","cx","styles","themeConfig","CDS","CalendarDataTids","MonthView","props","theme","children","height","isFirstInYear","isLastInYear","maxDate","minDate","month","top","year","onMonthSelect","onYearSelect","monthSelectRef","yearSelectRef","isTopNegative","isHeaderSticky","headerTop","Math","min","MONTH_TITLE_HEIGHT","alpha","borderBottomColor","fade","calendarMonthTitleBorderBottomColor","isYearVisible","yearTop","monthSelectDisabled","yearSelectDisabled","getMinMonth","value","i","isGreaterOrEqual","date","getMaxMonth","max","isLessOrEqual","header","headerSticky","monthTitle","headerMonth","undefined","headerYear"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;;AAEA,SAASC,UAAT,QAA2B,2BAA3B;AACA,SAASC,YAAT,QAA6B,gCAA7B;AACA,OAAO,KAAKC,cAAZ,MAAgC,iCAAhC;AACA,SAASC,EAAT,QAAmB,2BAAnB;;AAEA,SAASC,MAAT,QAAuB,oBAAvB;AACA,SAASC,WAAT,QAA4B,UAA5B;AACA,OAAO,KAAKC,GAAZ,MAAqB,qBAArB;AACA,SAASC,gBAAT,QAAiC,YAAjC;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,SAASC,SAAT,CAAmBC,KAAnB,EAA0C;AAC/C,MAAMC,KAAK,GAAGX,UAAU,CAACE,YAAD,CAAxB;;AAEA;AACEU,EAAAA,QADF;;;;;;;;;;;;;AAcIF,EAAAA,KAdJ,CACEE,QADF,CAEEC,MAFF,GAcIH,KAdJ,CAEEG,MAFF,CAGEC,aAHF,GAcIJ,KAdJ,CAGEI,aAHF,CAIEC,YAJF,GAcIL,KAdJ,CAIEK,YAJF,CAKEC,OALF,GAcIN,KAdJ,CAKEM,OALF,CAMEC,OANF,GAcIP,KAdJ,CAMEO,OANF,CAOEC,KAPF,GAcIR,KAdJ,CAOEQ,KAPF,CAQEC,GARF,GAcIT,KAdJ,CAQES,GARF,CASEC,IATF,GAcIV,KAdJ,CASEU,I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Content":["import React, { useContext } from 'react';\n\nimport { DateSelect } from '../../internal/DateSelect';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport * as ColorFunctions from '../../lib/styles/ColorFunctions';\nimport { cx } from '../../lib/theming/Emotion';\n\nimport { styles } from './MonthView.styles';\nimport { themeConfig } from './config';\nimport * as CDS from './CalendarDateShape';\nimport { CalendarDataTids } from './Calendar';\n\ninterface MonthViewProps {\n children: React.ReactNode;\n firstDayOffset: number;\n height: number;\n isFirstInYear?: boolean;\n isLastInYear?: boolean;\n maxDate?: CDS.CalendarDateShape;\n minDate?: CDS.CalendarDateShape;\n month: number;\n top: number;\n year: number;\n onMonthSelect: (month: number) => void;\n onYearSelect: (month: number) => void;\n monthSelectRef: (select: DateSelect | null) => void;\n yearSelectRef: (select: DateSelect | null) => void;\n}\n\nexport function MonthView(props: MonthViewProps) {\n const theme = useContext(ThemeContext);\n\n const {\n children,\n height,\n isFirstInYear,\n isLastInYear,\n maxDate,\n minDate,\n month,\n top,\n year,\n onMonthSelect,\n onYearSelect,\n monthSelectRef,\n yearSelectRef,\n } = props;\n\n const isTopNegative = top <= 0;\n const isHeaderSticky = isTopNegative && height >= -top;\n const headerTop = isHeaderSticky ? Math.min(-top, height - themeConfig(theme).MONTH_TITLE_HEIGHT) : 0;\n const alpha = isHeaderSticky ? (height + top - themeConfig(theme).MONTH_TITLE_HEIGHT) / 10 : 1;\n const borderBottomColor = ColorFunctions.fade(theme.calendarMonthTitleBorderBottomColor, alpha);\n const isYearVisible = isFirstInYear || isHeaderSticky;\n const yearTop = isHeaderSticky && !isLastInYear ? -headerTop - top : 0;\n const monthSelectDisabled = top > 40 || headerTop < 0 || headerTop >= height - themeConfig(theme).MONTH_TITLE_HEIGHT;\n const yearSelectDisabled = top > 40 || (isLastInYear && top < -height + themeConfig(theme).MONTH_TITLE_HEIGHT);\n\n const getMinMonth = (value: number) => {\n let min = 0;\n for (let i = 0; i < 12; ++i) {\n if (minDate && CDS.isGreaterOrEqual({ date: 31, month: i, year: value }, minDate)) {\n min = i;\n break;\n }\n }\n return min;\n };\n\n const getMaxMonth = (value: number) => {\n let max = 11;\n for (let i = 11; i >= 0; --i) {\n if (maxDate && CDS.isLessOrEqual({ date: 1, month: i, year: value }, maxDate)) {\n max = i;\n break;\n }\n }\n return max;\n };\n\n return (\n <div data-tid={CalendarDataTids.month} className={styles.month(theme)} style={{ top }} key={month + '-' + year}>\n <div\n style={{ top: headerTop }}\n className={cx({\n [styles.header()]: true,\n [styles.headerSticky(theme)]: isHeaderSticky,\n })}\n >\n <div style={{ borderBottomColor }} className={styles.monthTitle(theme)}>\n <div data-tid={CalendarDataTids.headerMonth} className={styles.headerMonth(theme)}>\n <DateSelect\n disabled={monthSelectDisabled}\n width={85}\n type=\"month\"\n value={month}\n onValueChange={onMonthSelect}\n ref={!monthSelectDisabled ? monthSelectRef : undefined}\n minValue={getMinMonth(year)}\n maxValue={getMaxMonth(year)}\n />\n </div>\n {isYearVisible && (\n <div data-tid={CalendarDataTids.headerYear} className={styles.headerYear(theme)} style={{ top: yearTop }}>\n <DateSelect\n disabled={yearSelectDisabled}\n width={50}\n type=\"year\"\n value={year}\n minValue={minDate ? minDate.year : undefined}\n maxValue={maxDate ? maxDate.year : undefined}\n onValueChange={onYearSelect}\n ref={!yearSelectDisabled ? yearSelectRef : undefined}\n />\n </div>\n )}\n </div>\n </div>\n {children}\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["MonthView.tsx"],"names":["React","useContext","DateSelect","ThemeContext","ColorFunctions","cx","useResponsiveLayout","styles","themeConfig","CDS","CalendarDataTids","CalendarContext","getMinMonth","year","minDate","min","i","isGreaterOrEqual","date","month","getMaxMonth","maxDate","max","isLessOrEqual","MonthView","props","theme","isMobile","children","height","isFirstInYear","isLastInYear","top","onMonthSelect","onYearSelect","monthSelectRef","yearSelectRef","isTopNegative","isHeaderSticky","headerTop","Math","MONTH_TITLE_HEIGHT","alpha","borderBottomColor","fade","calendarMonthTitleBorderBottomColor","isYearVisible","yearTop","monthSelectDisabled","yearSelectDisabled","monthMobile","header","headerSticky","monthTitle","headerMonth","undefined","headerYear"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;;AAEA,SAASC,UAAT,QAA2B,2BAA3B;AACA,SAASC,YAAT,QAA6B,gCAA7B;AACA,OAAO,KAAKC,cAAZ,MAAgC,iCAAhC;AACA,SAASC,EAAT,QAAmB,2BAAnB;AACA,SAASC,mBAAT,QAAoC,mCAApC;;;AAGA,SAASC,MAAT,QAAuB,oBAAvB;AACA,SAASC,WAAT,QAA4B,UAA5B;AACA,OAAO,KAAKC,GAAZ,MAAqB,qBAArB;AACA,SAASC,gBAAT,QAAiC,YAAjC;AACA,SAASC,eAAT,QAAgC,mBAAhC;;AAEA,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,IAAD,EAAeC,OAAf,EAA4D;AACrF,MAAIC,GAAG,GAAG,CAAV;AACA,OAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAG,EAApB,EAAwB,EAAEA,CAA1B,EAA6B;AAC3B,QAAIF,OAAO,IAAIL,GAAG,CAACQ,gBAAJ,CAAqB,EAAEC,IAAI,EAAE,EAAR,EAAYC,KAAK,EAAEH,CAAnB,EAAsBH,IAAI,EAAJA,IAAtB,EAArB,EAAmDC,OAAnD,CAAf,EAA4E;AAC1EC,MAAAA,GAAG,GAAGC,CAAN;AACA;AACD;AACF;AACD,SAAOD,GAAP;AACD,CATM;;AAWP,OAAO,IAAMK,WAAW,GAAG,SAAdA,WAAc,CAACP,IAAD,EAAeQ,OAAf,EAA4D;AACrF,MAAIC,GAAG,GAAG,EAAV;AACA,OAAK,IAAIN,CAAC,GAAG,EAAb,EAAiBA,CAAC,IAAI,CAAtB,EAAyB,EAAEA,CAA3B,EAA8B;AAC5B,QAAIK,OAAO,IAAIZ,GAAG,CAACc,aAAJ,CAAkB,EAAEL,IAAI,EAAE,CAAR,EAAWC,KAAK,E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;;;AA8CG3B,IAAAA,QA9CH,CADF;;;AAkDD","sourcesContent":["import React, { useContext } from 'react';\n\nimport { DateSelect } from '../../internal/DateSelect';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport * as ColorFunctions from '../../lib/styles/ColorFunctions';\nimport { cx } from '../../lib/theming/Emotion';\nimport { useResponsiveLayout } from '../../components/ResponsiveLayout';\nimport { Nullable } from '../..//typings/utility-types';\n\nimport { styles } from './MonthView.styles';\nimport { themeConfig } from './config';\nimport * as CDS from './CalendarDateShape';\nimport { CalendarDataTids } from './Calendar';\nimport { CalendarContext } from './CalendarContext';\n\nexport const getMinMonth = (year: number, minDate: Nullable<CDS.CalendarDateShape>) => {\n let min = 0;\n for (let i = 0; i < 12; ++i) {\n if (minDate && CDS.isGreaterOrEqual({ date: 31, month: i, year }, minDate)) {\n min = i;\n break;\n }\n }\n return min;\n};\n\nexport const getMaxMonth = (year: number, maxDate: Nullable<CDS.CalendarDateShape>) => {\n let max = 11;\n for (let i = 11; i >= 0; --i) {\n if (maxDate && CDS.isLessOrEqual({ date: 1, month: i, year }, maxDate)) {\n max = i;\n break;\n }\n }\n return max;\n};\n\ninterface MonthViewProps {\n children: React.ReactNode;\n firstDayOffset: number;\n height: number;\n isFirstInYear?: boolean;\n isLastInYear?: boolean;\n month: number;\n top: number;\n year: number;\n onMonthSelect: (month: number) => void;\n onYearSelect: (month: number) => void;\n monthSelectRef: (select: DateSelect | null) => void;\n yearSelectRef: (select: DateSelect | null) => void;\n}\n\nexport function MonthView(props: MonthViewProps) {\n const theme = useContext(ThemeContext);\n const { minDate, maxDate } = useContext(CalendarContext);\n const { isMobile } = useResponsiveLayout();\n\n const {\n children,\n height,\n isFirstInYear,\n isLastInYear,\n month,\n top,\n year,\n onMonthSelect,\n onYearSelect,\n monthSelectRef,\n yearSelectRef,\n } = props;\n\n const isTopNegative = top <= 0;\n const isHeaderSticky = isTopNegative && height >= -top;\n const headerTop = isHeaderSticky ? Math.min(-top, height - themeConfig(theme).MONTH_TITLE_HEIGHT) : 0;\n const alpha = isHeaderSticky ? (height + top - themeConfig(theme).MONTH_TITLE_HEIGHT) / 10 : 1;\n const borderBottomColor = ColorFunctions.fade(theme.calendarMonthTitleBorderBottomColor, alpha);\n const isYearVisible = isFirstInYear || isHeaderSticky;\n const yearTop = isHeaderSticky && !isLastInYear ? -headerTop - top : 0;\n const monthSelectDisabled = top > 40 || headerTop < 0 || headerTop >= height - themeConfig(theme).MONTH_TITLE_HEIGHT;\n const yearSelectDisabled = top > 40 || (isLastInYear && top < -height + themeConfig(theme).MONTH_TITLE_HEIGHT);\n\n return (\n <div\n data-tid={CalendarDataTids.month}\n className={cx({ [styles.month(theme)]: true, [styles.monthMobile()]: isMobile })}\n style={{ top }}\n key={month + '-' + year}\n >\n <div\n style={{ top: headerTop }}\n className={cx({\n [styles.header()]: true,\n [styles.headerSticky(theme)]: isHeaderSticky,\n })}\n >\n <div style={{ borderBottomColor }} className={styles.monthTitle(theme)}>\n <div data-tid={CalendarDataTids.headerMonth} className={styles.headerMonth(theme)}>\n {\n <DateSelect\n disabled={monthSelectDisabled}\n width={isMobile ? '6em' : 85}\n type=\"month\"\n value={month}\n onValueChange={onMonthSelect}\n ref={!monthSelectDisabled ? monthSelectRef : undefined}\n minValue={getMinMonth(year, minDate)}\n maxValue={getMaxMonth(year, maxDate)}\n />\n }\n </div>\n {isYearVisible && (\n <div data-tid={CalendarDataTids.headerYear} className={styles.headerYear(theme)} style={{ top: yearTop }}>\n {\n <DateSelect\n disabled={yearSelectDisabled}\n width={isMobile ? '3.5em' : 50}\n type=\"year\"\n value={year}\n minValue={minDate ? minDate.year : undefined}\n maxValue={maxDate ? maxDate.year : undefined}\n onValueChange={onYearSelect}\n ref={!yearSelectDisabled ? yearSelectRef : undefined}\n />\n }\n </div>\n )}\n </div>\n </div>\n {children}\n </div>\n );\n}\n"]}
@@ -1,14 +1,15 @@
1
1
  import React from 'react';
2
2
  import { DateSelect } from '../../internal/DateSelect';
3
+ import { Nullable } from '../..//typings/utility-types';
3
4
  import * as CDS from './CalendarDateShape';
5
+ export declare const getMinMonth: (year: number, minDate: Nullable<CDS.CalendarDateShape>) => number;
6
+ export declare const getMaxMonth: (year: number, maxDate: Nullable<CDS.CalendarDateShape>) => number;
4
7
  interface MonthViewProps {
5
8
  children: React.ReactNode;
6
9
  firstDayOffset: number;
7
10
  height: number;
8
11
  isFirstInYear?: boolean;
9
12
  isLastInYear?: boolean;
10
- maxDate?: CDS.CalendarDateShape;
11
- minDate?: CDS.CalendarDateShape;
12
13
  month: number;
13
14
  top: number;
14
15
  year: number;
@@ -1,6 +1,6 @@
1
1
  import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/esm/taggedTemplateLiteralLoose";
2
2
 
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
4
4
 
5
5
  import { css, memoizeStyle } from "../../../lib/theming/Emotion";
6
6
  export var styles = memoizeStyle({
@@ -11,19 +11,33 @@ export var styles = memoizeStyle({
11
11
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n display: inline-block;\n position: absolute;\n right: 0;\n padding: ", " 0 ", ";\n "])), t.calendarMonthTitlePaddingTop, t.calendarMonthTitlePaddingBottom);
12
12
  },
13
13
  month: function month(t) {
14
- var width = parseInt(t.calendarCellSize) * 7;
14
+ var width = parseInt(t.calendarCellWidth) * 7;
15
15
  return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: ", "px;\n "])), width);
16
16
  },
17
+ monthMobile: function monthMobile() {
18
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n width: 100%;\n "])));
19
+ },
17
20
  header: function header() {
18
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n position: relative;\n "])));
21
+ return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n position: relative;\n "])));
19
22
  },
20
23
  headerSticky: function headerSticky(t) {
21
- return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n z-index: 2;\n "])), t.calendarMonthHeaderStickedBgColor);
24
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n z-index: 2;\n "])), t.calendarMonthHeaderStickedBgColor);
22
25
  },
23
26
  monthTitle: function monthTitle(t) {
24
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n border-bottom: 1px solid ", ";\n font-weight: ", ";\n margin: 0 ", " ", ";\n line-height: ", ";\n "])), t.calendarMonthTitleBorderBottomColor, t.dateSelectFontWeight, t.calendarMonthTitleMarginX, t.calendarMonthTitleMarginBottom, t.calendarMonthTitleLineHeight);
27
+ return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n border-bottom: 1px solid ", ";\n font-weight: ", ";\n margin: 0 ", " ", ";\n line-height: ", ";\n "])), t.calendarMonthTitleBorderBottomColor, t.dateSelectFontWeight, t.calendarMonthTitleMarginX, t.calendarMonthTitleMarginBottom, t.calendarMonthTitleLineHeight);
25
28
  },
29
+
30
+ /* Note: this could've been
31
+ * display: grid;
32
+ * grid-template-columns: repeat(7, minmax(0, 1fr));
33
+ */
26
34
  monthDayGrid: function monthDayGrid(t) {
27
- return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n line-height: ", ";\n "])), t.calendarCellLineHeight);
35
+ return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n line-height: ", ";\n display: flex;\n flex-direction: column;\n padding: ", " 0px;\n "])), t.calendarCellLineHeight, t.calendarGridRowSpacing);
36
+ },
37
+ monthDayRow: function monthDayRow(t) {
38
+ return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n\n & + & {\n margin-top: ", ";\n }\n "])), t.calendarGridRowSpacing);
39
+ },
40
+ nativeSelect: function nativeSelect() {
41
+ return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: -12px;\n right: 0;\n bottom: -8px;\n left: 0;\n cursor: pointer;\n appearance: none;\n opacity: 0;\n border: none;\n "])));
28
42
  }
29
43
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["MonthView.styles.ts"],"names":["css","memoizeStyle","styles","headerMonth","t","calendarMonthTitlePaddingTop","calendarMonthTitlePaddingBottom","headerYear","month","width","parseInt","calendarCellSize","header","headerSticky","calendarMonthHeaderStickedBgColor","monthTitle","calendarMonthTitleBorderBottomColor","dateSelectFontWeight","calendarMonthTitleMarginX","calendarMonthTitleMarginBottom","calendarMonthTitleLineHeight","monthDayGrid","calendarCellLineHeight"],"mappings":"gOAAA,SAASA,GAAT,EAAcC,YAAd,QAAkC,2BAAlC;;;AAGA,OAAO,IAAMC,MAAM,GAAGD,YAAY,CAAC;AACjCE,EAAAA,WADiC,uBACrBC,CADqB,EACX;AACpB,WAAOJ,GAAP;;AAEaI,IAAAA,CAAC,CAACC,4BAFf,EAEiDD,CAAC,CAACE,+BAFnD;;AAID,GANgC;;AAQjCC,EAAAA,UARiC,sBAQtBH,CARsB,EAQZ;AACnB,WAAOJ,GAAP;;;;AAIaI,IAAAA,CAAC,CAACC,4BAJf,EAIiDD,CAAC,CAACE,+BAJnD;;AAMD,GAfgC;;AAiBjCE,EAAAA,KAjBiC,iBAiB3BJ,CAjB2B,EAiBjB;AACd,QAAMK,KAAK,GAAGC,QAAQ,CAACN,CAAC,CAACO,gBAAH,CAAR,GAA+B,CAA7C;AACA,WAAOX,GAAP;;AAEWS,IAAAA,KAFX;;AAID,GAvBgC;;AAyBjCG,EAAAA,MAzBiC,oBAyBxB;AACP,WAAOZ,GAAP;;;AAGD,GA7BgC;;AA+BjCa,EAAAA,YA/BiC,wBA+BpBT,CA/BoB,EA+BV;AACrB,WAAOJ,GAAP;AACsBI,IAAAA,CAAC,CAACU,iCADxB;;;AAID,GApCgC;;AAsCjCC,EAAAA,UAtCiC,sBAsCtBX,CAtCsB,EAsCZ;AACnB,WAAOJ,GAAP;AAC6BI,IAAAA,CAAC,CAACY,mCAD/B;AAEiBZ,IAAAA,CAAC,CAACa,oBAFnB;AAGcb,IAAAA,CAAC,CAACc,yBAHhB,EAG6Cd,CAAC,CAACe,8BAH/C;AAIiBf,IAAAA,CAAC,CAACgB,4BAJnB;;AAMD,GA7CgC;;AA+CjCC,EAAAA,YA/CiC,wBA+CpBjB,CA/CoB,EA+CV;AACrB,WAAOJ,GAAP;AACiBI,IAAAA,CAAC,CAACkB,sBADnB;;AAGD,GAnDgC,EAAD,CAA3B","sourcesContent":["import { css, memoizeStyle } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\n\nexport const styles = memoizeStyle({\n headerMonth(t: Theme) {\n return css`\n display: inline-block;\n padding: ${t.calendarMonthTitlePaddingTop} 0 ${t.calendarMonthTitlePaddingBottom};\n `;\n },\n\n headerYear(t: Theme) {\n return css`\n display: inline-block;\n position: absolute;\n right: 0;\n padding: ${t.calendarMonthTitlePaddingTop} 0 ${t.calendarMonthTitlePaddingBottom};\n `;\n },\n\n month(t: Theme) {\n const width = parseInt(t.calendarCellSize) * 7;\n return css`\n position: absolute;\n width: ${width}px;\n `;\n },\n\n header() {\n return css`\n position: relative;\n `;\n },\n\n headerSticky(t: Theme) {\n return css`\n background-color: ${t.calendarMonthHeaderStickedBgColor};\n z-index: 2;\n `;\n },\n\n monthTitle(t: Theme) {\n return css`\n border-bottom: 1px solid ${t.calendarMonthTitleBorderBottomColor};\n font-weight: ${t.dateSelectFontWeight};\n margin: 0 ${t.calendarMonthTitleMarginX} ${t.calendarMonthTitleMarginBottom};\n line-height: ${t.calendarMonthTitleLineHeight};\n `;\n },\n\n monthDayGrid(t: Theme) {\n return css`\n line-height: ${t.calendarCellLineHeight};\n `;\n },\n});\n"]}
1
+ {"version":3,"sources":["MonthView.styles.ts"],"names":["css","memoizeStyle","styles","headerMonth","t","calendarMonthTitlePaddingTop","calendarMonthTitlePaddingBottom","headerYear","month","width","parseInt","calendarCellWidth","monthMobile","header","headerSticky","calendarMonthHeaderStickedBgColor","monthTitle","calendarMonthTitleBorderBottomColor","dateSelectFontWeight","calendarMonthTitleMarginX","calendarMonthTitleMarginBottom","calendarMonthTitleLineHeight","monthDayGrid","calendarCellLineHeight","calendarGridRowSpacing","monthDayRow","nativeSelect"],"mappings":"uRAAA,SAASA,GAAT,EAAcC,YAAd,QAAkC,2BAAlC;;;AAGA,OAAO,IAAMC,MAAM,GAAGD,YAAY,CAAC;AACjCE,EAAAA,WADiC,uBACrBC,CADqB,EACX;AACpB,WAAOJ,GAAP;;AAEaI,IAAAA,CAAC,CAACC,4BAFf,EAEiDD,CAAC,CAACE,+BAFnD;;AAID,GANgC;;AAQjCC,EAAAA,UARiC,sBAQtBH,CARsB,EAQZ;AACnB,WAAOJ,GAAP;;;;AAIaI,IAAAA,CAAC,CAACC,4BAJf,EAIiDD,CAAC,CAACE,+BAJnD;;AAMD,GAfgC;;AAiBjCE,EAAAA,KAjBiC,iBAiB3BJ,CAjB2B,EAiBjB;AACd,QAAMK,KAAK,GAAGC,QAAQ,CAACN,CAAC,CAACO,iBAAH,CAAR,GAAgC,CAA9C;AACA,WAAOX,GAAP;;AAEWS,IAAAA,KAFX;;AAID,GAvBgC;;AAyBjCG,EAAAA,WAzBiC,yBAyBnB;AACZ,WAAOZ,GAAP;;;AAGD,GA7BgC;;AA+BjCa,EAAAA,MA/BiC,oBA+BxB;AACP,WAAOb,GAAP;;;AAGD,GAnCgC;;AAqCjCc,EAAAA,YArCiC,wBAqCpBV,CArCoB,EAqCV;AACrB,WAAOJ,GAAP;AACsBI,IAAAA,CAAC,CAACW,iCADxB;;;AAID,GA1CgC;;AA4CjCC,EAAAA,UA5CiC,sBA4CtBZ,CA5CsB,EA4CZ;AACnB,WAAOJ,GAAP;AAC6BI,IAAAA,CAAC,CAACa,mCAD/B;AAEiBb,IAAAA,CAAC,CAACc,oBAFnB;AAGcd,IAAAA,CAAC,CAACe,yBAHhB,EAG6Cf,CAAC,CAACgB,8BAH/C;AAIiBhB,IAAAA,CAAC,CAACiB,4BAJnB;;AAMD,GAnDgC;;AAqDjC;AACF;AACA;AACA;AACEC,EAAAA,YAzDiC,wBAyDpBlB,CAzDoB,EAyDV;AACrB,WAAOJ,GAAP;AACiBI,IAAAA,CAAC,CAACmB,sBADnB;;;AAIanB,IAAAA,CAAC,CAACoB,sBAJf;;AAMD,GAhEgC;;AAkEjCC,EAAAA,WAlEiC,uBAkErBrB,CAlEqB,EAkEX;AACpB,WAAOJ,GAAP;;;;;AAKkBI,IAAAA,CAAC,CAACoB,sBALpB;;;AAQD,GA3EgC;;AA6EjCE,EAAAA,YA7EiC,0BA6ElB;AACb,WAAO1B,GAAP;;;;;;;;;;;AAWD,GAzFgC,EAAD,CAA3B","sourcesContent":["import { css, memoizeStyle } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\n\nexport const styles = memoizeStyle({\n headerMonth(t: Theme) {\n return css`\n display: inline-block;\n padding: ${t.calendarMonthTitlePaddingTop} 0 ${t.calendarMonthTitlePaddingBottom};\n `;\n },\n\n headerYear(t: Theme) {\n return css`\n display: inline-block;\n position: absolute;\n right: 0;\n padding: ${t.calendarMonthTitlePaddingTop} 0 ${t.calendarMonthTitlePaddingBottom};\n `;\n },\n\n month(t: Theme) {\n const width = parseInt(t.calendarCellWidth) * 7;\n return css`\n position: absolute;\n width: ${width}px;\n `;\n },\n\n monthMobile() {\n return css`\n width: 100%;\n `;\n },\n\n header() {\n return css`\n position: relative;\n `;\n },\n\n headerSticky(t: Theme) {\n return css`\n background-color: ${t.calendarMonthHeaderStickedBgColor};\n z-index: 2;\n `;\n },\n\n monthTitle(t: Theme) {\n return css`\n border-bottom: 1px solid ${t.calendarMonthTitleBorderBottomColor};\n font-weight: ${t.dateSelectFontWeight};\n margin: 0 ${t.calendarMonthTitleMarginX} ${t.calendarMonthTitleMarginBottom};\n line-height: ${t.calendarMonthTitleLineHeight};\n `;\n },\n\n /* Note: this could've been\n * display: grid;\n * grid-template-columns: repeat(7, minmax(0, 1fr));\n */\n monthDayGrid(t: Theme) {\n return css`\n line-height: ${t.calendarCellLineHeight};\n display: flex;\n flex-direction: column;\n padding: ${t.calendarGridRowSpacing} 0px;\n `;\n },\n\n monthDayRow(t: Theme) {\n return css`\n display: flex;\n justify-content: space-between;\n\n & + & {\n margin-top: ${t.calendarGridRowSpacing};\n }\n `;\n },\n\n nativeSelect() {\n return css`\n position: absolute;\n top: -12px;\n right: 0;\n bottom: -8px;\n left: 0;\n cursor: pointer;\n appearance: none;\n opacity: 0;\n border: none;\n `;\n },\n});\n"]}
@@ -3,8 +3,11 @@ export declare const styles: {
3
3
  headerMonth(t: Theme): string;
4
4
  headerYear(t: Theme): string;
5
5
  month(t: Theme): string;
6
+ monthMobile(): string;
6
7
  header(): string;
7
8
  headerSticky(t: Theme): string;
8
9
  monthTitle(t: Theme): string;
9
10
  monthDayGrid(t: Theme): string;
11
+ monthDayRow(t: Theme): string;
12
+ nativeSelect(): string;
10
13
  };