@knitui/dates 0.1.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 (1058) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +159 -0
  3. package/lib/commonjs/AmPmInput/AmPmInput.js +205 -0
  4. package/lib/commonjs/AmPmInput/AmPmInput.js.map +1 -0
  5. package/lib/commonjs/AmPmInput/index.js +17 -0
  6. package/lib/commonjs/AmPmInput/index.js.map +1 -0
  7. package/lib/commonjs/Calendar/Calendar.js +394 -0
  8. package/lib/commonjs/Calendar/Calendar.js.map +1 -0
  9. package/lib/commonjs/Calendar/clamp-level/clamp-level.js +39 -0
  10. package/lib/commonjs/Calendar/clamp-level/clamp-level.js.map +1 -0
  11. package/lib/commonjs/Calendar/index.js +20 -0
  12. package/lib/commonjs/Calendar/index.js.map +1 -0
  13. package/lib/commonjs/Calendar/pick-calendar-props/index.js +13 -0
  14. package/lib/commonjs/Calendar/pick-calendar-props/index.js.map +1 -0
  15. package/lib/commonjs/Calendar/pick-calendar-props/pick-calendar-props.js +144 -0
  16. package/lib/commonjs/Calendar/pick-calendar-props/pick-calendar-props.js.map +1 -0
  17. package/lib/commonjs/CalendarHeader/CalendarHeader.js +465 -0
  18. package/lib/commonjs/CalendarHeader/CalendarHeader.js.map +1 -0
  19. package/lib/commonjs/CalendarHeader/index.js +17 -0
  20. package/lib/commonjs/CalendarHeader/index.js.map +1 -0
  21. package/lib/commonjs/DateInput/DateInput.js +329 -0
  22. package/lib/commonjs/DateInput/DateInput.js.map +1 -0
  23. package/lib/commonjs/DateInput/index.js +17 -0
  24. package/lib/commonjs/DateInput/index.js.map +1 -0
  25. package/lib/commonjs/DatePicker/DatePicker.js +179 -0
  26. package/lib/commonjs/DatePicker/DatePicker.js.map +1 -0
  27. package/lib/commonjs/DatePicker/index.js +13 -0
  28. package/lib/commonjs/DatePicker/index.js.map +1 -0
  29. package/lib/commonjs/DatePickerInput/DatePickerInput.js +169 -0
  30. package/lib/commonjs/DatePickerInput/DatePickerInput.js.map +1 -0
  31. package/lib/commonjs/DatePickerInput/index.js +17 -0
  32. package/lib/commonjs/DatePickerInput/index.js.map +1 -0
  33. package/lib/commonjs/DateTimePicker/DateTimePicker.js +233 -0
  34. package/lib/commonjs/DateTimePicker/DateTimePicker.js.map +1 -0
  35. package/lib/commonjs/DateTimePicker/index.js +17 -0
  36. package/lib/commonjs/DateTimePicker/index.js.map +1 -0
  37. package/lib/commonjs/DatesProvider/DatesProvider.js +68 -0
  38. package/lib/commonjs/DatesProvider/DatesProvider.js.map +1 -0
  39. package/lib/commonjs/DatesProvider/index.js +32 -0
  40. package/lib/commonjs/DatesProvider/index.js.map +1 -0
  41. package/lib/commonjs/DatesProvider/use-dates-context.js +35 -0
  42. package/lib/commonjs/DatesProvider/use-dates-context.js.map +1 -0
  43. package/lib/commonjs/Day/Day.js +360 -0
  44. package/lib/commonjs/Day/Day.js.map +1 -0
  45. package/lib/commonjs/Day/index.js +13 -0
  46. package/lib/commonjs/Day/index.js.map +1 -0
  47. package/lib/commonjs/DecadeLevel/DecadeLevel.js +222 -0
  48. package/lib/commonjs/DecadeLevel/DecadeLevel.js.map +1 -0
  49. package/lib/commonjs/DecadeLevel/get-decade-range/get-decade-range.js +18 -0
  50. package/lib/commonjs/DecadeLevel/get-decade-range/get-decade-range.js.map +1 -0
  51. package/lib/commonjs/DecadeLevel/index.js +17 -0
  52. package/lib/commonjs/DecadeLevel/index.js.map +1 -0
  53. package/lib/commonjs/DecadeLevelGroup/DecadeLevelGroup.js +177 -0
  54. package/lib/commonjs/DecadeLevelGroup/DecadeLevelGroup.js.map +1 -0
  55. package/lib/commonjs/DecadeLevelGroup/index.js +17 -0
  56. package/lib/commonjs/DecadeLevelGroup/index.js.map +1 -0
  57. package/lib/commonjs/HiddenDatesInput/HiddenDatesInput.js +114 -0
  58. package/lib/commonjs/HiddenDatesInput/HiddenDatesInput.js.map +1 -0
  59. package/lib/commonjs/HiddenDatesInput/index.js +13 -0
  60. package/lib/commonjs/HiddenDatesInput/index.js.map +1 -0
  61. package/lib/commonjs/InlineDateTimePicker/InlineDateTimePicker.js +425 -0
  62. package/lib/commonjs/InlineDateTimePicker/InlineDateTimePicker.js.map +1 -0
  63. package/lib/commonjs/InlineDateTimePicker/index.js +17 -0
  64. package/lib/commonjs/InlineDateTimePicker/index.js.map +1 -0
  65. package/lib/commonjs/Introduction.mdx +39 -0
  66. package/lib/commonjs/LevelsGroup/LevelsGroup.js +114 -0
  67. package/lib/commonjs/LevelsGroup/LevelsGroup.js.map +1 -0
  68. package/lib/commonjs/LevelsGroup/index.js +17 -0
  69. package/lib/commonjs/LevelsGroup/index.js.map +1 -0
  70. package/lib/commonjs/MiniCalendar/MiniCalendar.js +581 -0
  71. package/lib/commonjs/MiniCalendar/MiniCalendar.js.map +1 -0
  72. package/lib/commonjs/MiniCalendar/index.js +13 -0
  73. package/lib/commonjs/MiniCalendar/index.js.map +1 -0
  74. package/lib/commonjs/Month/Month.js +420 -0
  75. package/lib/commonjs/Month/Month.js.map +1 -0
  76. package/lib/commonjs/Month/index.js +13 -0
  77. package/lib/commonjs/Month/index.js.map +1 -0
  78. package/lib/commonjs/MonthLevel/MonthLevel.js +243 -0
  79. package/lib/commonjs/MonthLevel/MonthLevel.js.map +1 -0
  80. package/lib/commonjs/MonthLevel/index.js +17 -0
  81. package/lib/commonjs/MonthLevel/index.js.map +1 -0
  82. package/lib/commonjs/MonthLevelGroup/MonthLevelGroup.js +201 -0
  83. package/lib/commonjs/MonthLevelGroup/MonthLevelGroup.js.map +1 -0
  84. package/lib/commonjs/MonthLevelGroup/index.js +17 -0
  85. package/lib/commonjs/MonthLevelGroup/index.js.map +1 -0
  86. package/lib/commonjs/MonthPicker/MonthPicker.js +166 -0
  87. package/lib/commonjs/MonthPicker/MonthPicker.js.map +1 -0
  88. package/lib/commonjs/MonthPicker/index.js +13 -0
  89. package/lib/commonjs/MonthPicker/index.js.map +1 -0
  90. package/lib/commonjs/MonthPickerInput/MonthPickerInput.js +176 -0
  91. package/lib/commonjs/MonthPickerInput/MonthPickerInput.js.map +1 -0
  92. package/lib/commonjs/MonthPickerInput/index.js +17 -0
  93. package/lib/commonjs/MonthPickerInput/index.js.map +1 -0
  94. package/lib/commonjs/MonthsList/MonthsList.js +291 -0
  95. package/lib/commonjs/MonthsList/MonthsList.js.map +1 -0
  96. package/lib/commonjs/MonthsList/get-month-in-tab-order/get-month-in-tab-order.js +35 -0
  97. package/lib/commonjs/MonthsList/get-month-in-tab-order/get-month-in-tab-order.js.map +1 -0
  98. package/lib/commonjs/MonthsList/get-months-data/get-months-data.js +25 -0
  99. package/lib/commonjs/MonthsList/get-months-data/get-months-data.js.map +1 -0
  100. package/lib/commonjs/MonthsList/index.js +17 -0
  101. package/lib/commonjs/MonthsList/index.js.map +1 -0
  102. package/lib/commonjs/MonthsList/is-month-disabled/is-month-disabled.js +26 -0
  103. package/lib/commonjs/MonthsList/is-month-disabled/is-month-disabled.js.map +1 -0
  104. package/lib/commonjs/PickerControl/PickerControl.js +301 -0
  105. package/lib/commonjs/PickerControl/PickerControl.js.map +1 -0
  106. package/lib/commonjs/PickerControl/index.js +17 -0
  107. package/lib/commonjs/PickerControl/index.js.map +1 -0
  108. package/lib/commonjs/PickerInputBase/PickerInputBase.js +243 -0
  109. package/lib/commonjs/PickerInputBase/PickerInputBase.js.map +1 -0
  110. package/lib/commonjs/PickerInputBase/index.js +13 -0
  111. package/lib/commonjs/PickerInputBase/index.js.map +1 -0
  112. package/lib/commonjs/SpinInput/SpinInput.js +209 -0
  113. package/lib/commonjs/SpinInput/SpinInput.js.map +1 -0
  114. package/lib/commonjs/SpinInput/index.js +17 -0
  115. package/lib/commonjs/SpinInput/index.js.map +1 -0
  116. package/lib/commonjs/TimeControlsList/AmPmControlsList.js +35 -0
  117. package/lib/commonjs/TimeControlsList/AmPmControlsList.js.map +1 -0
  118. package/lib/commonjs/TimeControlsList/TimeControl.js +140 -0
  119. package/lib/commonjs/TimeControlsList/TimeControl.js.map +1 -0
  120. package/lib/commonjs/TimeControlsList/TimeControlsList.js +221 -0
  121. package/lib/commonjs/TimeControlsList/TimeControlsList.js.map +1 -0
  122. package/lib/commonjs/TimeControlsList/index.js +27 -0
  123. package/lib/commonjs/TimeControlsList/index.js.map +1 -0
  124. package/lib/commonjs/TimeGrid/TimeGrid.js +385 -0
  125. package/lib/commonjs/TimeGrid/TimeGrid.js.map +1 -0
  126. package/lib/commonjs/TimeGrid/compare-time/compare-time.js +27 -0
  127. package/lib/commonjs/TimeGrid/compare-time/compare-time.js.map +1 -0
  128. package/lib/commonjs/TimeGrid/index.js +17 -0
  129. package/lib/commonjs/TimeGrid/index.js.map +1 -0
  130. package/lib/commonjs/TimeInput/TimeInput.js +144 -0
  131. package/lib/commonjs/TimeInput/TimeInput.js.map +1 -0
  132. package/lib/commonjs/TimeInput/index.js +17 -0
  133. package/lib/commonjs/TimeInput/index.js.map +1 -0
  134. package/lib/commonjs/TimePicker/TimePicker.js +645 -0
  135. package/lib/commonjs/TimePicker/TimePicker.js.map +1 -0
  136. package/lib/commonjs/TimePicker/index.js +17 -0
  137. package/lib/commonjs/TimePicker/index.js.map +1 -0
  138. package/lib/commonjs/TimePresets/TimePresetControl.js +189 -0
  139. package/lib/commonjs/TimePresets/TimePresetControl.js.map +1 -0
  140. package/lib/commonjs/TimePresets/TimePresetGroup.js +154 -0
  141. package/lib/commonjs/TimePresets/TimePresetGroup.js.map +1 -0
  142. package/lib/commonjs/TimePresets/TimePresets.js +181 -0
  143. package/lib/commonjs/TimePresets/TimePresets.js.map +1 -0
  144. package/lib/commonjs/TimePresets/index.js +27 -0
  145. package/lib/commonjs/TimePresets/index.js.map +1 -0
  146. package/lib/commonjs/TimeValue/TimeValue.js +101 -0
  147. package/lib/commonjs/TimeValue/TimeValue.js.map +1 -0
  148. package/lib/commonjs/TimeValue/index.js +17 -0
  149. package/lib/commonjs/TimeValue/index.js.map +1 -0
  150. package/lib/commonjs/WeekdaysRow/WeekdaysRow.js +206 -0
  151. package/lib/commonjs/WeekdaysRow/WeekdaysRow.js.map +1 -0
  152. package/lib/commonjs/WeekdaysRow/get-weekdays-names/get-weekdays-names.js +31 -0
  153. package/lib/commonjs/WeekdaysRow/get-weekdays-names/get-weekdays-names.js.map +1 -0
  154. package/lib/commonjs/WeekdaysRow/index.js +20 -0
  155. package/lib/commonjs/WeekdaysRow/index.js.map +1 -0
  156. package/lib/commonjs/YearLevel/YearLevel.js +223 -0
  157. package/lib/commonjs/YearLevel/YearLevel.js.map +1 -0
  158. package/lib/commonjs/YearLevel/index.js +17 -0
  159. package/lib/commonjs/YearLevel/index.js.map +1 -0
  160. package/lib/commonjs/YearLevelGroup/YearLevelGroup.js +181 -0
  161. package/lib/commonjs/YearLevelGroup/YearLevelGroup.js.map +1 -0
  162. package/lib/commonjs/YearLevelGroup/index.js +17 -0
  163. package/lib/commonjs/YearLevelGroup/index.js.map +1 -0
  164. package/lib/commonjs/YearPicker/YearPicker.js +155 -0
  165. package/lib/commonjs/YearPicker/YearPicker.js.map +1 -0
  166. package/lib/commonjs/YearPicker/index.js +13 -0
  167. package/lib/commonjs/YearPicker/index.js.map +1 -0
  168. package/lib/commonjs/YearPickerInput/YearPickerInput.js +171 -0
  169. package/lib/commonjs/YearPickerInput/YearPickerInput.js.map +1 -0
  170. package/lib/commonjs/YearPickerInput/index.js +17 -0
  171. package/lib/commonjs/YearPickerInput/index.js.map +1 -0
  172. package/lib/commonjs/YearsList/YearsList.js +293 -0
  173. package/lib/commonjs/YearsList/YearsList.js.map +1 -0
  174. package/lib/commonjs/YearsList/get-year-in-tab-order/get-year-in-tab-order.js +35 -0
  175. package/lib/commonjs/YearsList/get-year-in-tab-order/get-year-in-tab-order.js.map +1 -0
  176. package/lib/commonjs/YearsList/get-years-data/get-years-data.js +28 -0
  177. package/lib/commonjs/YearsList/get-years-data/get-years-data.js.map +1 -0
  178. package/lib/commonjs/YearsList/index.js +17 -0
  179. package/lib/commonjs/YearsList/index.js.map +1 -0
  180. package/lib/commonjs/YearsList/is-year-disabled/is-year-disabled.js +26 -0
  181. package/lib/commonjs/YearsList/is-year-disabled/is-year-disabled.js.map +1 -0
  182. package/lib/commonjs/_reference/ExampleControl.js +392 -0
  183. package/lib/commonjs/_reference/ExampleControl.js.map +1 -0
  184. package/lib/commonjs/_reference/README.md +69 -0
  185. package/lib/commonjs/_reference/index.js +13 -0
  186. package/lib/commonjs/_reference/index.js.map +1 -0
  187. package/lib/commonjs/cell-metrics.js +58 -0
  188. package/lib/commonjs/cell-metrics.js.map +1 -0
  189. package/lib/commonjs/hooks/index.js +40 -0
  190. package/lib/commonjs/hooks/index.js.map +1 -0
  191. package/lib/commonjs/hooks/use-dates-input/index.js +13 -0
  192. package/lib/commonjs/hooks/use-dates-input/index.js.map +1 -0
  193. package/lib/commonjs/hooks/use-dates-input/use-dates-input.js +101 -0
  194. package/lib/commonjs/hooks/use-dates-input/use-dates-input.js.map +1 -0
  195. package/lib/commonjs/hooks/use-dates-state/index.js +13 -0
  196. package/lib/commonjs/hooks/use-dates-state/index.js.map +1 -0
  197. package/lib/commonjs/hooks/use-dates-state/is-in-range/index.js +13 -0
  198. package/lib/commonjs/hooks/use-dates-state/is-in-range/index.js.map +1 -0
  199. package/lib/commonjs/hooks/use-dates-state/is-in-range/is-in-range.js +19 -0
  200. package/lib/commonjs/hooks/use-dates-state/is-in-range/is-in-range.js.map +1 -0
  201. package/lib/commonjs/hooks/use-dates-state/use-dates-state.js +203 -0
  202. package/lib/commonjs/hooks/use-dates-state/use-dates-state.js.map +1 -0
  203. package/lib/commonjs/hooks/use-time-picker/index.js +13 -0
  204. package/lib/commonjs/hooks/use-time-picker/index.js.map +1 -0
  205. package/lib/commonjs/hooks/use-time-picker/use-time-picker.js +275 -0
  206. package/lib/commonjs/hooks/use-time-picker/use-time-picker.js.map +1 -0
  207. package/lib/commonjs/hooks/use-uncontrolled-dates/index.js +19 -0
  208. package/lib/commonjs/hooks/use-uncontrolled-dates/index.js.map +1 -0
  209. package/lib/commonjs/hooks/use-uncontrolled-dates/use-uncontrolled-dates.js +68 -0
  210. package/lib/commonjs/hooks/use-uncontrolled-dates/use-uncontrolled-dates.js.map +1 -0
  211. package/lib/commonjs/index.js +402 -0
  212. package/lib/commonjs/index.js.map +1 -0
  213. package/lib/commonjs/internal/a11y.js +70 -0
  214. package/lib/commonjs/internal/a11y.js.map +1 -0
  215. package/lib/commonjs/internal/focus-element.js +26 -0
  216. package/lib/commonjs/internal/focus-element.js.map +1 -0
  217. package/lib/commonjs/internal/get-input-default-date.js +34 -0
  218. package/lib/commonjs/internal/get-input-default-date.js.map +1 -0
  219. package/lib/commonjs/internal/has-prevent-default.js +47 -0
  220. package/lib/commonjs/internal/has-prevent-default.js.map +1 -0
  221. package/lib/commonjs/internal/parse-date-string.js +43 -0
  222. package/lib/commonjs/internal/parse-date-string.js.map +1 -0
  223. package/lib/commonjs/internal/picker-presets.js +65 -0
  224. package/lib/commonjs/internal/picker-presets.js.map +1 -0
  225. package/lib/commonjs/internal/select-on-focus.js +32 -0
  226. package/lib/commonjs/internal/select-on-focus.js.map +1 -0
  227. package/lib/commonjs/internal/web-cursor.js +24 -0
  228. package/lib/commonjs/internal/web-cursor.js.map +1 -0
  229. package/lib/commonjs/package.json +1 -0
  230. package/lib/commonjs/test-utils.js +49 -0
  231. package/lib/commonjs/test-utils.js.map +1 -0
  232. package/lib/commonjs/types.js +6 -0
  233. package/lib/commonjs/types.js.map +1 -0
  234. package/lib/commonjs/utils/assign-time/assign-time.js +33 -0
  235. package/lib/commonjs/utils/assign-time/assign-time.js.map +1 -0
  236. package/lib/commonjs/utils/clamp-date/clamp-date.js +28 -0
  237. package/lib/commonjs/utils/clamp-date/clamp-date.js.map +1 -0
  238. package/lib/commonjs/utils/clamp-time/clamp-time.js +23 -0
  239. package/lib/commonjs/utils/clamp-time/clamp-time.js.map +1 -0
  240. package/lib/commonjs/utils/clamp-time/index.js +13 -0
  241. package/lib/commonjs/utils/clamp-time/index.js.map +1 -0
  242. package/lib/commonjs/utils/get-date-in-tab-order/get-date-in-tab-order.js +37 -0
  243. package/lib/commonjs/utils/get-date-in-tab-order/get-date-in-tab-order.js.map +1 -0
  244. package/lib/commonjs/utils/get-default-clamped-date/get-default-clamped-date.js +30 -0
  245. package/lib/commonjs/utils/get-default-clamped-date/get-default-clamped-date.js.map +1 -0
  246. package/lib/commonjs/utils/get-end-of-week/get-end-of-week.js +25 -0
  247. package/lib/commonjs/utils/get-end-of-week/get-end-of-week.js.map +1 -0
  248. package/lib/commonjs/utils/get-formatted-date/get-formatted-date.js +49 -0
  249. package/lib/commonjs/utils/get-formatted-date/get-formatted-date.js.map +1 -0
  250. package/lib/commonjs/utils/get-formatted-time/get-formatted-time.js +43 -0
  251. package/lib/commonjs/utils/get-formatted-time/get-formatted-time.js.map +1 -0
  252. package/lib/commonjs/utils/get-formatted-time/index.js +13 -0
  253. package/lib/commonjs/utils/get-formatted-time/index.js.map +1 -0
  254. package/lib/commonjs/utils/get-min-max-time/get-min-max-time.js +41 -0
  255. package/lib/commonjs/utils/get-min-max-time/get-min-max-time.js.map +1 -0
  256. package/lib/commonjs/utils/get-min-max-time/index.js +17 -0
  257. package/lib/commonjs/utils/get-min-max-time/index.js.map +1 -0
  258. package/lib/commonjs/utils/get-month-days/get-month-days.js +52 -0
  259. package/lib/commonjs/utils/get-month-days/get-month-days.js.map +1 -0
  260. package/lib/commonjs/utils/get-parsed-time/get-parsed-time.js +82 -0
  261. package/lib/commonjs/utils/get-parsed-time/get-parsed-time.js.map +1 -0
  262. package/lib/commonjs/utils/get-parsed-time/index.js +19 -0
  263. package/lib/commonjs/utils/get-parsed-time/index.js.map +1 -0
  264. package/lib/commonjs/utils/get-start-of-week/get-start-of-week.js +21 -0
  265. package/lib/commonjs/utils/get-start-of-week/get-start-of-week.js.map +1 -0
  266. package/lib/commonjs/utils/get-time-range/get-time-range.js +37 -0
  267. package/lib/commonjs/utils/get-time-range/get-time-range.js.map +1 -0
  268. package/lib/commonjs/utils/get-time-range/index.js +13 -0
  269. package/lib/commonjs/utils/get-time-range/index.js.map +1 -0
  270. package/lib/commonjs/utils/get-time-string/get-time-string.js +85 -0
  271. package/lib/commonjs/utils/get-time-string/get-time-string.js.map +1 -0
  272. package/lib/commonjs/utils/get-time-string/index.js +13 -0
  273. package/lib/commonjs/utils/get-time-string/index.js.map +1 -0
  274. package/lib/commonjs/utils/get-week-number/get-week-number.js +20 -0
  275. package/lib/commonjs/utils/get-week-number/get-week-number.js.map +1 -0
  276. package/lib/commonjs/utils/handle-control-key-down/handle-control-key-down.js +339 -0
  277. package/lib/commonjs/utils/handle-control-key-down/handle-control-key-down.js.map +1 -0
  278. package/lib/commonjs/utils/index.js +211 -0
  279. package/lib/commonjs/utils/index.js.map +1 -0
  280. package/lib/commonjs/utils/is-after-min-date/is-after-min-date.js +16 -0
  281. package/lib/commonjs/utils/is-after-min-date/is-after-min-date.js.map +1 -0
  282. package/lib/commonjs/utils/is-before-max-date/is-before-max-date.js +16 -0
  283. package/lib/commonjs/utils/is-before-max-date/is-before-max-date.js.map +1 -0
  284. package/lib/commonjs/utils/is-date-valid/is-date-valid.js +39 -0
  285. package/lib/commonjs/utils/is-date-valid/is-date-valid.js.map +1 -0
  286. package/lib/commonjs/utils/is-same-month/is-same-month.js +13 -0
  287. package/lib/commonjs/utils/is-same-month/is-same-month.js.map +1 -0
  288. package/lib/commonjs/utils/is-same-time/index.js +13 -0
  289. package/lib/commonjs/utils/is-same-time/index.js.map +1 -0
  290. package/lib/commonjs/utils/is-same-time/is-same-time.js +28 -0
  291. package/lib/commonjs/utils/is-same-time/is-same-time.js.map +1 -0
  292. package/lib/commonjs/utils/pad-time/index.js +17 -0
  293. package/lib/commonjs/utils/pad-time/index.js.map +1 -0
  294. package/lib/commonjs/utils/pad-time/pad-time.js +14 -0
  295. package/lib/commonjs/utils/pad-time/pad-time.js.map +1 -0
  296. package/lib/commonjs/utils/split-time-string/index.js +17 -0
  297. package/lib/commonjs/utils/split-time-string/index.js.map +1 -0
  298. package/lib/commonjs/utils/split-time-string/split-time-string.js +22 -0
  299. package/lib/commonjs/utils/split-time-string/split-time-string.js.map +1 -0
  300. package/lib/commonjs/utils/time-to-seconds/index.js +19 -0
  301. package/lib/commonjs/utils/time-to-seconds/index.js.map +1 -0
  302. package/lib/commonjs/utils/time-to-seconds/time-to-seconds.js +39 -0
  303. package/lib/commonjs/utils/time-to-seconds/time-to-seconds.js.map +1 -0
  304. package/lib/commonjs/utils/to-date-string/to-date-string.js +26 -0
  305. package/lib/commonjs/utils/to-date-string/to-date-string.js.map +1 -0
  306. package/lib/module/AmPmInput/AmPmInput.js +200 -0
  307. package/lib/module/AmPmInput/AmPmInput.js.map +1 -0
  308. package/lib/module/AmPmInput/index.js +4 -0
  309. package/lib/module/AmPmInput/index.js.map +1 -0
  310. package/lib/module/Calendar/Calendar.js +387 -0
  311. package/lib/module/Calendar/Calendar.js.map +1 -0
  312. package/lib/module/Calendar/clamp-level/clamp-level.js +35 -0
  313. package/lib/module/Calendar/clamp-level/clamp-level.js.map +1 -0
  314. package/lib/module/Calendar/index.js +5 -0
  315. package/lib/module/Calendar/index.js.map +1 -0
  316. package/lib/module/Calendar/pick-calendar-props/index.js +4 -0
  317. package/lib/module/Calendar/pick-calendar-props/index.js.map +1 -0
  318. package/lib/module/Calendar/pick-calendar-props/pick-calendar-props.js +140 -0
  319. package/lib/module/Calendar/pick-calendar-props/pick-calendar-props.js.map +1 -0
  320. package/lib/module/CalendarHeader/CalendarHeader.js +461 -0
  321. package/lib/module/CalendarHeader/CalendarHeader.js.map +1 -0
  322. package/lib/module/CalendarHeader/index.js +4 -0
  323. package/lib/module/CalendarHeader/index.js.map +1 -0
  324. package/lib/module/DateInput/DateInput.js +322 -0
  325. package/lib/module/DateInput/DateInput.js.map +1 -0
  326. package/lib/module/DateInput/index.js +4 -0
  327. package/lib/module/DateInput/index.js.map +1 -0
  328. package/lib/module/DatePicker/DatePicker.js +172 -0
  329. package/lib/module/DatePicker/DatePicker.js.map +1 -0
  330. package/lib/module/DatePicker/index.js +4 -0
  331. package/lib/module/DatePicker/index.js.map +1 -0
  332. package/lib/module/DatePickerInput/DatePickerInput.js +163 -0
  333. package/lib/module/DatePickerInput/DatePickerInput.js.map +1 -0
  334. package/lib/module/DatePickerInput/index.js +4 -0
  335. package/lib/module/DatePickerInput/index.js.map +1 -0
  336. package/lib/module/DateTimePicker/DateTimePicker.js +226 -0
  337. package/lib/module/DateTimePicker/DateTimePicker.js.map +1 -0
  338. package/lib/module/DateTimePicker/index.js +4 -0
  339. package/lib/module/DateTimePicker/index.js.map +1 -0
  340. package/lib/module/DatesProvider/DatesProvider.js +61 -0
  341. package/lib/module/DatesProvider/DatesProvider.js.map +1 -0
  342. package/lib/module/DatesProvider/index.js +5 -0
  343. package/lib/module/DatesProvider/index.js.map +1 -0
  344. package/lib/module/DatesProvider/use-dates-context.js +31 -0
  345. package/lib/module/DatesProvider/use-dates-context.js.map +1 -0
  346. package/lib/module/Day/Day.js +354 -0
  347. package/lib/module/Day/Day.js.map +1 -0
  348. package/lib/module/Day/index.js +4 -0
  349. package/lib/module/Day/index.js.map +1 -0
  350. package/lib/module/DecadeLevel/DecadeLevel.js +215 -0
  351. package/lib/module/DecadeLevel/DecadeLevel.js.map +1 -0
  352. package/lib/module/DecadeLevel/get-decade-range/get-decade-range.js +15 -0
  353. package/lib/module/DecadeLevel/get-decade-range/get-decade-range.js.map +1 -0
  354. package/lib/module/DecadeLevel/index.js +4 -0
  355. package/lib/module/DecadeLevel/index.js.map +1 -0
  356. package/lib/module/DecadeLevelGroup/DecadeLevelGroup.js +170 -0
  357. package/lib/module/DecadeLevelGroup/DecadeLevelGroup.js.map +1 -0
  358. package/lib/module/DecadeLevelGroup/index.js +4 -0
  359. package/lib/module/DecadeLevelGroup/index.js.map +1 -0
  360. package/lib/module/HiddenDatesInput/HiddenDatesInput.js +109 -0
  361. package/lib/module/HiddenDatesInput/HiddenDatesInput.js.map +1 -0
  362. package/lib/module/HiddenDatesInput/index.js +4 -0
  363. package/lib/module/HiddenDatesInput/index.js.map +1 -0
  364. package/lib/module/InlineDateTimePicker/InlineDateTimePicker.js +418 -0
  365. package/lib/module/InlineDateTimePicker/InlineDateTimePicker.js.map +1 -0
  366. package/lib/module/InlineDateTimePicker/index.js +4 -0
  367. package/lib/module/InlineDateTimePicker/index.js.map +1 -0
  368. package/lib/module/Introduction.mdx +39 -0
  369. package/lib/module/LevelsGroup/LevelsGroup.js +111 -0
  370. package/lib/module/LevelsGroup/LevelsGroup.js.map +1 -0
  371. package/lib/module/LevelsGroup/index.js +4 -0
  372. package/lib/module/LevelsGroup/index.js.map +1 -0
  373. package/lib/module/MiniCalendar/MiniCalendar.js +575 -0
  374. package/lib/module/MiniCalendar/MiniCalendar.js.map +1 -0
  375. package/lib/module/MiniCalendar/index.js +4 -0
  376. package/lib/module/MiniCalendar/index.js.map +1 -0
  377. package/lib/module/Month/Month.js +414 -0
  378. package/lib/module/Month/Month.js.map +1 -0
  379. package/lib/module/Month/index.js +4 -0
  380. package/lib/module/Month/index.js.map +1 -0
  381. package/lib/module/MonthLevel/MonthLevel.js +236 -0
  382. package/lib/module/MonthLevel/MonthLevel.js.map +1 -0
  383. package/lib/module/MonthLevel/index.js +4 -0
  384. package/lib/module/MonthLevel/index.js.map +1 -0
  385. package/lib/module/MonthLevelGroup/MonthLevelGroup.js +194 -0
  386. package/lib/module/MonthLevelGroup/MonthLevelGroup.js.map +1 -0
  387. package/lib/module/MonthLevelGroup/index.js +4 -0
  388. package/lib/module/MonthLevelGroup/index.js.map +1 -0
  389. package/lib/module/MonthPicker/MonthPicker.js +160 -0
  390. package/lib/module/MonthPicker/MonthPicker.js.map +1 -0
  391. package/lib/module/MonthPicker/index.js +4 -0
  392. package/lib/module/MonthPicker/index.js.map +1 -0
  393. package/lib/module/MonthPickerInput/MonthPickerInput.js +170 -0
  394. package/lib/module/MonthPickerInput/MonthPickerInput.js.map +1 -0
  395. package/lib/module/MonthPickerInput/index.js +4 -0
  396. package/lib/module/MonthPickerInput/index.js.map +1 -0
  397. package/lib/module/MonthsList/MonthsList.js +285 -0
  398. package/lib/module/MonthsList/MonthsList.js.map +1 -0
  399. package/lib/module/MonthsList/get-month-in-tab-order/get-month-in-tab-order.js +30 -0
  400. package/lib/module/MonthsList/get-month-in-tab-order/get-month-in-tab-order.js.map +1 -0
  401. package/lib/module/MonthsList/get-months-data/get-months-data.js +20 -0
  402. package/lib/module/MonthsList/get-months-data/get-months-data.js.map +1 -0
  403. package/lib/module/MonthsList/index.js +4 -0
  404. package/lib/module/MonthsList/index.js.map +1 -0
  405. package/lib/module/MonthsList/is-month-disabled/is-month-disabled.js +21 -0
  406. package/lib/module/MonthsList/is-month-disabled/is-month-disabled.js.map +1 -0
  407. package/lib/module/PickerControl/PickerControl.js +296 -0
  408. package/lib/module/PickerControl/PickerControl.js.map +1 -0
  409. package/lib/module/PickerControl/index.js +4 -0
  410. package/lib/module/PickerControl/index.js.map +1 -0
  411. package/lib/module/PickerInputBase/PickerInputBase.js +237 -0
  412. package/lib/module/PickerInputBase/PickerInputBase.js.map +1 -0
  413. package/lib/module/PickerInputBase/index.js +4 -0
  414. package/lib/module/PickerInputBase/index.js.map +1 -0
  415. package/lib/module/SpinInput/SpinInput.js +206 -0
  416. package/lib/module/SpinInput/SpinInput.js.map +1 -0
  417. package/lib/module/SpinInput/index.js +4 -0
  418. package/lib/module/SpinInput/index.js.map +1 -0
  419. package/lib/module/TimeControlsList/AmPmControlsList.js +31 -0
  420. package/lib/module/TimeControlsList/AmPmControlsList.js.map +1 -0
  421. package/lib/module/TimeControlsList/TimeControl.js +135 -0
  422. package/lib/module/TimeControlsList/TimeControl.js.map +1 -0
  423. package/lib/module/TimeControlsList/TimeControlsList.js +217 -0
  424. package/lib/module/TimeControlsList/TimeControlsList.js.map +1 -0
  425. package/lib/module/TimeControlsList/index.js +8 -0
  426. package/lib/module/TimeControlsList/index.js.map +1 -0
  427. package/lib/module/TimeGrid/TimeGrid.js +380 -0
  428. package/lib/module/TimeGrid/TimeGrid.js.map +1 -0
  429. package/lib/module/TimeGrid/compare-time/compare-time.js +22 -0
  430. package/lib/module/TimeGrid/compare-time/compare-time.js.map +1 -0
  431. package/lib/module/TimeGrid/index.js +4 -0
  432. package/lib/module/TimeGrid/index.js.map +1 -0
  433. package/lib/module/TimeInput/TimeInput.js +138 -0
  434. package/lib/module/TimeInput/TimeInput.js.map +1 -0
  435. package/lib/module/TimeInput/index.js +4 -0
  436. package/lib/module/TimeInput/index.js.map +1 -0
  437. package/lib/module/TimePicker/TimePicker.js +639 -0
  438. package/lib/module/TimePicker/TimePicker.js.map +1 -0
  439. package/lib/module/TimePicker/index.js +4 -0
  440. package/lib/module/TimePicker/index.js.map +1 -0
  441. package/lib/module/TimePresets/TimePresetControl.js +184 -0
  442. package/lib/module/TimePresets/TimePresetControl.js.map +1 -0
  443. package/lib/module/TimePresets/TimePresetGroup.js +150 -0
  444. package/lib/module/TimePresets/TimePresetGroup.js.map +1 -0
  445. package/lib/module/TimePresets/TimePresets.js +178 -0
  446. package/lib/module/TimePresets/TimePresets.js.map +1 -0
  447. package/lib/module/TimePresets/index.js +8 -0
  448. package/lib/module/TimePresets/index.js.map +1 -0
  449. package/lib/module/TimeValue/TimeValue.js +95 -0
  450. package/lib/module/TimeValue/TimeValue.js.map +1 -0
  451. package/lib/module/TimeValue/index.js +4 -0
  452. package/lib/module/TimeValue/index.js.map +1 -0
  453. package/lib/module/WeekdaysRow/WeekdaysRow.js +201 -0
  454. package/lib/module/WeekdaysRow/WeekdaysRow.js.map +1 -0
  455. package/lib/module/WeekdaysRow/get-weekdays-names/get-weekdays-names.js +26 -0
  456. package/lib/module/WeekdaysRow/get-weekdays-names/get-weekdays-names.js.map +1 -0
  457. package/lib/module/WeekdaysRow/index.js +5 -0
  458. package/lib/module/WeekdaysRow/index.js.map +1 -0
  459. package/lib/module/YearLevel/YearLevel.js +216 -0
  460. package/lib/module/YearLevel/YearLevel.js.map +1 -0
  461. package/lib/module/YearLevel/index.js +4 -0
  462. package/lib/module/YearLevel/index.js.map +1 -0
  463. package/lib/module/YearLevelGroup/YearLevelGroup.js +174 -0
  464. package/lib/module/YearLevelGroup/YearLevelGroup.js.map +1 -0
  465. package/lib/module/YearLevelGroup/index.js +4 -0
  466. package/lib/module/YearLevelGroup/index.js.map +1 -0
  467. package/lib/module/YearPicker/YearPicker.js +149 -0
  468. package/lib/module/YearPicker/YearPicker.js.map +1 -0
  469. package/lib/module/YearPicker/index.js +4 -0
  470. package/lib/module/YearPicker/index.js.map +1 -0
  471. package/lib/module/YearPickerInput/YearPickerInput.js +165 -0
  472. package/lib/module/YearPickerInput/YearPickerInput.js.map +1 -0
  473. package/lib/module/YearPickerInput/index.js +4 -0
  474. package/lib/module/YearPickerInput/index.js.map +1 -0
  475. package/lib/module/YearsList/YearsList.js +287 -0
  476. package/lib/module/YearsList/YearsList.js.map +1 -0
  477. package/lib/module/YearsList/get-year-in-tab-order/get-year-in-tab-order.js +30 -0
  478. package/lib/module/YearsList/get-year-in-tab-order/get-year-in-tab-order.js.map +1 -0
  479. package/lib/module/YearsList/get-years-data/get-years-data.js +23 -0
  480. package/lib/module/YearsList/get-years-data/get-years-data.js.map +1 -0
  481. package/lib/module/YearsList/index.js +4 -0
  482. package/lib/module/YearsList/index.js.map +1 -0
  483. package/lib/module/YearsList/is-year-disabled/is-year-disabled.js +21 -0
  484. package/lib/module/YearsList/is-year-disabled/is-year-disabled.js.map +1 -0
  485. package/lib/module/_reference/ExampleControl.js +386 -0
  486. package/lib/module/_reference/ExampleControl.js.map +1 -0
  487. package/lib/module/_reference/README.md +69 -0
  488. package/lib/module/_reference/index.js +7 -0
  489. package/lib/module/_reference/index.js.map +1 -0
  490. package/lib/module/cell-metrics.js +54 -0
  491. package/lib/module/cell-metrics.js.map +1 -0
  492. package/lib/module/hooks/index.js +11 -0
  493. package/lib/module/hooks/index.js.map +1 -0
  494. package/lib/module/hooks/use-dates-input/index.js +4 -0
  495. package/lib/module/hooks/use-dates-input/index.js.map +1 -0
  496. package/lib/module/hooks/use-dates-input/use-dates-input.js +97 -0
  497. package/lib/module/hooks/use-dates-input/use-dates-input.js.map +1 -0
  498. package/lib/module/hooks/use-dates-state/index.js +4 -0
  499. package/lib/module/hooks/use-dates-state/index.js.map +1 -0
  500. package/lib/module/hooks/use-dates-state/is-in-range/index.js +4 -0
  501. package/lib/module/hooks/use-dates-state/is-in-range/index.js.map +1 -0
  502. package/lib/module/hooks/use-dates-state/is-in-range/is-in-range.js +14 -0
  503. package/lib/module/hooks/use-dates-state/is-in-range/is-in-range.js.map +1 -0
  504. package/lib/module/hooks/use-dates-state/use-dates-state.js +199 -0
  505. package/lib/module/hooks/use-dates-state/use-dates-state.js.map +1 -0
  506. package/lib/module/hooks/use-time-picker/index.js +4 -0
  507. package/lib/module/hooks/use-time-picker/index.js.map +1 -0
  508. package/lib/module/hooks/use-time-picker/use-time-picker.js +271 -0
  509. package/lib/module/hooks/use-time-picker/use-time-picker.js.map +1 -0
  510. package/lib/module/hooks/use-uncontrolled-dates/index.js +4 -0
  511. package/lib/module/hooks/use-uncontrolled-dates/index.js.map +1 -0
  512. package/lib/module/hooks/use-uncontrolled-dates/use-uncontrolled-dates.js +64 -0
  513. package/lib/module/hooks/use-uncontrolled-dates/use-uncontrolled-dates.js.map +1 -0
  514. package/lib/module/index.js +52 -0
  515. package/lib/module/index.js.map +1 -0
  516. package/lib/module/internal/a11y.js +67 -0
  517. package/lib/module/internal/a11y.js.map +1 -0
  518. package/lib/module/internal/focus-element.js +22 -0
  519. package/lib/module/internal/focus-element.js.map +1 -0
  520. package/lib/module/internal/get-input-default-date.js +30 -0
  521. package/lib/module/internal/get-input-default-date.js.map +1 -0
  522. package/lib/module/internal/has-prevent-default.js +41 -0
  523. package/lib/module/internal/has-prevent-default.js.map +1 -0
  524. package/lib/module/internal/parse-date-string.js +38 -0
  525. package/lib/module/internal/parse-date-string.js.map +1 -0
  526. package/lib/module/internal/picker-presets.js +59 -0
  527. package/lib/module/internal/picker-presets.js.map +1 -0
  528. package/lib/module/internal/select-on-focus.js +29 -0
  529. package/lib/module/internal/select-on-focus.js.map +1 -0
  530. package/lib/module/internal/web-cursor.js +20 -0
  531. package/lib/module/internal/web-cursor.js.map +1 -0
  532. package/lib/module/test-utils.js +31 -0
  533. package/lib/module/test-utils.js.map +1 -0
  534. package/lib/module/types.js +4 -0
  535. package/lib/module/types.js.map +1 -0
  536. package/lib/module/utils/assign-time/assign-time.js +28 -0
  537. package/lib/module/utils/assign-time/assign-time.js.map +1 -0
  538. package/lib/module/utils/clamp-date/clamp-date.js +24 -0
  539. package/lib/module/utils/clamp-date/clamp-date.js.map +1 -0
  540. package/lib/module/utils/clamp-time/clamp-time.js +20 -0
  541. package/lib/module/utils/clamp-time/clamp-time.js.map +1 -0
  542. package/lib/module/utils/clamp-time/index.js +4 -0
  543. package/lib/module/utils/clamp-time/index.js.map +1 -0
  544. package/lib/module/utils/get-date-in-tab-order/get-date-in-tab-order.js +32 -0
  545. package/lib/module/utils/get-date-in-tab-order/get-date-in-tab-order.js.map +1 -0
  546. package/lib/module/utils/get-default-clamped-date/get-default-clamped-date.js +25 -0
  547. package/lib/module/utils/get-default-clamped-date/get-default-clamped-date.js.map +1 -0
  548. package/lib/module/utils/get-end-of-week/get-end-of-week.js +20 -0
  549. package/lib/module/utils/get-end-of-week/get-end-of-week.js.map +1 -0
  550. package/lib/module/utils/get-formatted-date/get-formatted-date.js +44 -0
  551. package/lib/module/utils/get-formatted-date/get-formatted-date.js.map +1 -0
  552. package/lib/module/utils/get-formatted-time/get-formatted-time.js +40 -0
  553. package/lib/module/utils/get-formatted-time/get-formatted-time.js.map +1 -0
  554. package/lib/module/utils/get-formatted-time/index.js +4 -0
  555. package/lib/module/utils/get-formatted-time/index.js.map +1 -0
  556. package/lib/module/utils/get-min-max-time/get-min-max-time.js +36 -0
  557. package/lib/module/utils/get-min-max-time/get-min-max-time.js.map +1 -0
  558. package/lib/module/utils/get-min-max-time/index.js +4 -0
  559. package/lib/module/utils/get-min-max-time/index.js.map +1 -0
  560. package/lib/module/utils/get-month-days/get-month-days.js +47 -0
  561. package/lib/module/utils/get-month-days/get-month-days.js.map +1 -0
  562. package/lib/module/utils/get-parsed-time/get-parsed-time.js +78 -0
  563. package/lib/module/utils/get-parsed-time/get-parsed-time.js.map +1 -0
  564. package/lib/module/utils/get-parsed-time/index.js +4 -0
  565. package/lib/module/utils/get-parsed-time/index.js.map +1 -0
  566. package/lib/module/utils/get-start-of-week/get-start-of-week.js +16 -0
  567. package/lib/module/utils/get-start-of-week/get-start-of-week.js.map +1 -0
  568. package/lib/module/utils/get-time-range/get-time-range.js +34 -0
  569. package/lib/module/utils/get-time-range/get-time-range.js.map +1 -0
  570. package/lib/module/utils/get-time-range/index.js +4 -0
  571. package/lib/module/utils/get-time-range/index.js.map +1 -0
  572. package/lib/module/utils/get-time-string/get-time-string.js +82 -0
  573. package/lib/module/utils/get-time-string/get-time-string.js.map +1 -0
  574. package/lib/module/utils/get-time-string/index.js +4 -0
  575. package/lib/module/utils/get-time-string/index.js.map +1 -0
  576. package/lib/module/utils/get-week-number/get-week-number.js +15 -0
  577. package/lib/module/utils/get-week-number/get-week-number.js.map +1 -0
  578. package/lib/module/utils/handle-control-key-down/handle-control-key-down.js +335 -0
  579. package/lib/module/utils/handle-control-key-down/handle-control-key-down.js.map +1 -0
  580. package/lib/module/utils/index.js +30 -0
  581. package/lib/module/utils/index.js.map +1 -0
  582. package/lib/module/utils/is-after-min-date/is-after-min-date.js +11 -0
  583. package/lib/module/utils/is-after-min-date/is-after-min-date.js.map +1 -0
  584. package/lib/module/utils/is-before-max-date/is-before-max-date.js +11 -0
  585. package/lib/module/utils/is-before-max-date/is-before-max-date.js.map +1 -0
  586. package/lib/module/utils/is-date-valid/is-date-valid.js +35 -0
  587. package/lib/module/utils/is-date-valid/is-date-valid.js.map +1 -0
  588. package/lib/module/utils/is-same-month/is-same-month.js +8 -0
  589. package/lib/module/utils/is-same-month/is-same-month.js.map +1 -0
  590. package/lib/module/utils/is-same-time/index.js +4 -0
  591. package/lib/module/utils/is-same-time/index.js.map +1 -0
  592. package/lib/module/utils/is-same-time/is-same-time.js +25 -0
  593. package/lib/module/utils/is-same-time/is-same-time.js.map +1 -0
  594. package/lib/module/utils/pad-time/index.js +4 -0
  595. package/lib/module/utils/pad-time/index.js.map +1 -0
  596. package/lib/module/utils/pad-time/pad-time.js +10 -0
  597. package/lib/module/utils/pad-time/pad-time.js.map +1 -0
  598. package/lib/module/utils/split-time-string/index.js +4 -0
  599. package/lib/module/utils/split-time-string/index.js.map +1 -0
  600. package/lib/module/utils/split-time-string/split-time-string.js +18 -0
  601. package/lib/module/utils/split-time-string/split-time-string.js.map +1 -0
  602. package/lib/module/utils/time-to-seconds/index.js +4 -0
  603. package/lib/module/utils/time-to-seconds/index.js.map +1 -0
  604. package/lib/module/utils/time-to-seconds/time-to-seconds.js +35 -0
  605. package/lib/module/utils/time-to-seconds/time-to-seconds.js.map +1 -0
  606. package/lib/module/utils/to-date-string/to-date-string.js +21 -0
  607. package/lib/module/utils/to-date-string/to-date-string.js.map +1 -0
  608. package/lib/typescript/AmPmInput/AmPmInput.d.ts +50 -0
  609. package/lib/typescript/AmPmInput/AmPmInput.d.ts.map +1 -0
  610. package/lib/typescript/AmPmInput/index.d.ts +2 -0
  611. package/lib/typescript/AmPmInput/index.d.ts.map +1 -0
  612. package/lib/typescript/Calendar/Calendar.d.ts +151 -0
  613. package/lib/typescript/Calendar/Calendar.d.ts.map +1 -0
  614. package/lib/typescript/Calendar/clamp-level/clamp-level.d.ts +9 -0
  615. package/lib/typescript/Calendar/clamp-level/clamp-level.d.ts.map +1 -0
  616. package/lib/typescript/Calendar/index.d.ts +4 -0
  617. package/lib/typescript/Calendar/index.d.ts.map +1 -0
  618. package/lib/typescript/Calendar/pick-calendar-props/index.d.ts +2 -0
  619. package/lib/typescript/Calendar/pick-calendar-props/index.d.ts.map +1 -0
  620. package/lib/typescript/Calendar/pick-calendar-props/pick-calendar-props.d.ts +74 -0
  621. package/lib/typescript/Calendar/pick-calendar-props/pick-calendar-props.d.ts.map +1 -0
  622. package/lib/typescript/CalendarHeader/CalendarHeader.d.ts +156 -0
  623. package/lib/typescript/CalendarHeader/CalendarHeader.d.ts.map +1 -0
  624. package/lib/typescript/CalendarHeader/index.d.ts +2 -0
  625. package/lib/typescript/CalendarHeader/index.d.ts.map +1 -0
  626. package/lib/typescript/DateInput/DateInput.d.ts +66 -0
  627. package/lib/typescript/DateInput/DateInput.d.ts.map +1 -0
  628. package/lib/typescript/DateInput/index.d.ts +2 -0
  629. package/lib/typescript/DateInput/index.d.ts.map +1 -0
  630. package/lib/typescript/DatePicker/DatePicker.d.ts +61 -0
  631. package/lib/typescript/DatePicker/DatePicker.d.ts.map +1 -0
  632. package/lib/typescript/DatePicker/index.d.ts +3 -0
  633. package/lib/typescript/DatePicker/index.d.ts.map +1 -0
  634. package/lib/typescript/DatePickerInput/DatePickerInput.d.ts +40 -0
  635. package/lib/typescript/DatePickerInput/DatePickerInput.d.ts.map +1 -0
  636. package/lib/typescript/DatePickerInput/index.d.ts +2 -0
  637. package/lib/typescript/DatePickerInput/index.d.ts.map +1 -0
  638. package/lib/typescript/DateTimePicker/DateTimePicker.d.ts +40 -0
  639. package/lib/typescript/DateTimePicker/DateTimePicker.d.ts.map +1 -0
  640. package/lib/typescript/DateTimePicker/index.d.ts +2 -0
  641. package/lib/typescript/DateTimePicker/index.d.ts.map +1 -0
  642. package/lib/typescript/DatesProvider/DatesProvider.d.ts +41 -0
  643. package/lib/typescript/DatesProvider/DatesProvider.d.ts.map +1 -0
  644. package/lib/typescript/DatesProvider/index.d.ts +4 -0
  645. package/lib/typescript/DatesProvider/index.d.ts.map +1 -0
  646. package/lib/typescript/DatesProvider/use-dates-context.d.ts +19 -0
  647. package/lib/typescript/DatesProvider/use-dates-context.d.ts.map +1 -0
  648. package/lib/typescript/Day/Day.d.ts +172 -0
  649. package/lib/typescript/Day/Day.d.ts.map +1 -0
  650. package/lib/typescript/Day/index.d.ts +3 -0
  651. package/lib/typescript/Day/index.d.ts.map +1 -0
  652. package/lib/typescript/DecadeLevel/DecadeLevel.d.ts +157 -0
  653. package/lib/typescript/DecadeLevel/DecadeLevel.d.ts.map +1 -0
  654. package/lib/typescript/DecadeLevel/get-decade-range/get-decade-range.d.ts +9 -0
  655. package/lib/typescript/DecadeLevel/get-decade-range/get-decade-range.d.ts.map +1 -0
  656. package/lib/typescript/DecadeLevel/index.d.ts +2 -0
  657. package/lib/typescript/DecadeLevel/index.d.ts.map +1 -0
  658. package/lib/typescript/DecadeLevelGroup/DecadeLevelGroup.d.ts +157 -0
  659. package/lib/typescript/DecadeLevelGroup/DecadeLevelGroup.d.ts.map +1 -0
  660. package/lib/typescript/DecadeLevelGroup/index.d.ts +2 -0
  661. package/lib/typescript/DecadeLevelGroup/index.d.ts.map +1 -0
  662. package/lib/typescript/HiddenDatesInput/HiddenDatesInput.d.ts +33 -0
  663. package/lib/typescript/HiddenDatesInput/HiddenDatesInput.d.ts.map +1 -0
  664. package/lib/typescript/HiddenDatesInput/index.d.ts +2 -0
  665. package/lib/typescript/HiddenDatesInput/index.d.ts.map +1 -0
  666. package/lib/typescript/InlineDateTimePicker/InlineDateTimePicker.d.ts +107 -0
  667. package/lib/typescript/InlineDateTimePicker/InlineDateTimePicker.d.ts.map +1 -0
  668. package/lib/typescript/InlineDateTimePicker/index.d.ts +2 -0
  669. package/lib/typescript/InlineDateTimePicker/index.d.ts.map +1 -0
  670. package/lib/typescript/LevelsGroup/LevelsGroup.d.ts +56 -0
  671. package/lib/typescript/LevelsGroup/LevelsGroup.d.ts.map +1 -0
  672. package/lib/typescript/LevelsGroup/index.d.ts +2 -0
  673. package/lib/typescript/LevelsGroup/index.d.ts.map +1 -0
  674. package/lib/typescript/MiniCalendar/MiniCalendar.d.ts +190 -0
  675. package/lib/typescript/MiniCalendar/MiniCalendar.d.ts.map +1 -0
  676. package/lib/typescript/MiniCalendar/index.d.ts +3 -0
  677. package/lib/typescript/MiniCalendar/index.d.ts.map +1 -0
  678. package/lib/typescript/Month/Month.d.ts +170 -0
  679. package/lib/typescript/Month/Month.d.ts.map +1 -0
  680. package/lib/typescript/Month/index.d.ts +3 -0
  681. package/lib/typescript/Month/index.d.ts.map +1 -0
  682. package/lib/typescript/MonthLevel/MonthLevel.d.ts +169 -0
  683. package/lib/typescript/MonthLevel/MonthLevel.d.ts.map +1 -0
  684. package/lib/typescript/MonthLevel/index.d.ts +2 -0
  685. package/lib/typescript/MonthLevel/index.d.ts.map +1 -0
  686. package/lib/typescript/MonthLevelGroup/MonthLevelGroup.d.ts +171 -0
  687. package/lib/typescript/MonthLevelGroup/MonthLevelGroup.d.ts.map +1 -0
  688. package/lib/typescript/MonthLevelGroup/index.d.ts +2 -0
  689. package/lib/typescript/MonthLevelGroup/index.d.ts.map +1 -0
  690. package/lib/typescript/MonthPicker/MonthPicker.d.ts +65 -0
  691. package/lib/typescript/MonthPicker/MonthPicker.d.ts.map +1 -0
  692. package/lib/typescript/MonthPicker/index.d.ts +3 -0
  693. package/lib/typescript/MonthPicker/index.d.ts.map +1 -0
  694. package/lib/typescript/MonthPickerInput/MonthPickerInput.d.ts +41 -0
  695. package/lib/typescript/MonthPickerInput/MonthPickerInput.d.ts.map +1 -0
  696. package/lib/typescript/MonthPickerInput/index.d.ts +2 -0
  697. package/lib/typescript/MonthPickerInput/index.d.ts.map +1 -0
  698. package/lib/typescript/MonthsList/MonthsList.d.ts +96 -0
  699. package/lib/typescript/MonthsList/MonthsList.d.ts.map +1 -0
  700. package/lib/typescript/MonthsList/get-month-in-tab-order/get-month-in-tab-order.d.ts +15 -0
  701. package/lib/typescript/MonthsList/get-month-in-tab-order/get-month-in-tab-order.d.ts.map +1 -0
  702. package/lib/typescript/MonthsList/get-months-data/get-months-data.d.ts +7 -0
  703. package/lib/typescript/MonthsList/get-months-data/get-months-data.d.ts.map +1 -0
  704. package/lib/typescript/MonthsList/index.d.ts +2 -0
  705. package/lib/typescript/MonthsList/index.d.ts.map +1 -0
  706. package/lib/typescript/MonthsList/is-month-disabled/is-month-disabled.d.ts +10 -0
  707. package/lib/typescript/MonthsList/is-month-disabled/is-month-disabled.d.ts.map +1 -0
  708. package/lib/typescript/PickerControl/PickerControl.d.ts +120 -0
  709. package/lib/typescript/PickerControl/PickerControl.d.ts.map +1 -0
  710. package/lib/typescript/PickerControl/index.d.ts +2 -0
  711. package/lib/typescript/PickerControl/index.d.ts.map +1 -0
  712. package/lib/typescript/PickerInputBase/PickerInputBase.d.ts +149 -0
  713. package/lib/typescript/PickerInputBase/PickerInputBase.d.ts.map +1 -0
  714. package/lib/typescript/PickerInputBase/index.d.ts +2 -0
  715. package/lib/typescript/PickerInputBase/index.d.ts.map +1 -0
  716. package/lib/typescript/SpinInput/SpinInput.d.ts +61 -0
  717. package/lib/typescript/SpinInput/SpinInput.d.ts.map +1 -0
  718. package/lib/typescript/SpinInput/index.d.ts +2 -0
  719. package/lib/typescript/SpinInput/index.d.ts.map +1 -0
  720. package/lib/typescript/TimeControlsList/AmPmControlsList.d.ts +23 -0
  721. package/lib/typescript/TimeControlsList/AmPmControlsList.d.ts.map +1 -0
  722. package/lib/typescript/TimeControlsList/TimeControl.d.ts +29 -0
  723. package/lib/typescript/TimeControlsList/TimeControl.d.ts.map +1 -0
  724. package/lib/typescript/TimeControlsList/TimeControlsList.d.ts +91 -0
  725. package/lib/typescript/TimeControlsList/TimeControlsList.d.ts.map +1 -0
  726. package/lib/typescript/TimeControlsList/index.d.ts +4 -0
  727. package/lib/typescript/TimeControlsList/index.d.ts.map +1 -0
  728. package/lib/typescript/TimeGrid/TimeGrid.d.ts +110 -0
  729. package/lib/typescript/TimeGrid/TimeGrid.d.ts.map +1 -0
  730. package/lib/typescript/TimeGrid/compare-time/compare-time.d.ts +5 -0
  731. package/lib/typescript/TimeGrid/compare-time/compare-time.d.ts.map +1 -0
  732. package/lib/typescript/TimeGrid/index.d.ts +2 -0
  733. package/lib/typescript/TimeGrid/index.d.ts.map +1 -0
  734. package/lib/typescript/TimeInput/TimeInput.d.ts +44 -0
  735. package/lib/typescript/TimeInput/TimeInput.d.ts.map +1 -0
  736. package/lib/typescript/TimeInput/index.d.ts +2 -0
  737. package/lib/typescript/TimeInput/index.d.ts.map +1 -0
  738. package/lib/typescript/TimePicker/TimePicker.d.ts +206 -0
  739. package/lib/typescript/TimePicker/TimePicker.d.ts.map +1 -0
  740. package/lib/typescript/TimePicker/index.d.ts +2 -0
  741. package/lib/typescript/TimePicker/index.d.ts.map +1 -0
  742. package/lib/typescript/TimePresets/TimePresetControl.d.ts +49 -0
  743. package/lib/typescript/TimePresets/TimePresetControl.d.ts.map +1 -0
  744. package/lib/typescript/TimePresets/TimePresetGroup.d.ts +104 -0
  745. package/lib/typescript/TimePresets/TimePresetGroup.d.ts.map +1 -0
  746. package/lib/typescript/TimePresets/TimePresets.d.ts +160 -0
  747. package/lib/typescript/TimePresets/TimePresets.d.ts.map +1 -0
  748. package/lib/typescript/TimePresets/index.d.ts +4 -0
  749. package/lib/typescript/TimePresets/index.d.ts.map +1 -0
  750. package/lib/typescript/TimeValue/TimeValue.d.ts +30 -0
  751. package/lib/typescript/TimeValue/TimeValue.d.ts.map +1 -0
  752. package/lib/typescript/TimeValue/index.d.ts +2 -0
  753. package/lib/typescript/TimeValue/index.d.ts.map +1 -0
  754. package/lib/typescript/WeekdaysRow/WeekdaysRow.d.ts +83 -0
  755. package/lib/typescript/WeekdaysRow/WeekdaysRow.d.ts.map +1 -0
  756. package/lib/typescript/WeekdaysRow/get-weekdays-names/get-weekdays-names.d.ts +19 -0
  757. package/lib/typescript/WeekdaysRow/get-weekdays-names/get-weekdays-names.d.ts.map +1 -0
  758. package/lib/typescript/WeekdaysRow/index.d.ts +4 -0
  759. package/lib/typescript/WeekdaysRow/index.d.ts.map +1 -0
  760. package/lib/typescript/YearLevel/YearLevel.d.ts +155 -0
  761. package/lib/typescript/YearLevel/YearLevel.d.ts.map +1 -0
  762. package/lib/typescript/YearLevel/index.d.ts +2 -0
  763. package/lib/typescript/YearLevel/index.d.ts.map +1 -0
  764. package/lib/typescript/YearLevelGroup/YearLevelGroup.d.ts +157 -0
  765. package/lib/typescript/YearLevelGroup/YearLevelGroup.d.ts.map +1 -0
  766. package/lib/typescript/YearLevelGroup/index.d.ts +2 -0
  767. package/lib/typescript/YearLevelGroup/index.d.ts.map +1 -0
  768. package/lib/typescript/YearPicker/YearPicker.d.ts +54 -0
  769. package/lib/typescript/YearPicker/YearPicker.d.ts.map +1 -0
  770. package/lib/typescript/YearPicker/index.d.ts +3 -0
  771. package/lib/typescript/YearPicker/index.d.ts.map +1 -0
  772. package/lib/typescript/YearPickerInput/YearPickerInput.d.ts +41 -0
  773. package/lib/typescript/YearPickerInput/YearPickerInput.d.ts.map +1 -0
  774. package/lib/typescript/YearPickerInput/index.d.ts +2 -0
  775. package/lib/typescript/YearPickerInput/index.d.ts.map +1 -0
  776. package/lib/typescript/YearsList/YearsList.d.ts +96 -0
  777. package/lib/typescript/YearsList/YearsList.d.ts.map +1 -0
  778. package/lib/typescript/YearsList/get-year-in-tab-order/get-year-in-tab-order.d.ts +15 -0
  779. package/lib/typescript/YearsList/get-year-in-tab-order/get-year-in-tab-order.d.ts.map +1 -0
  780. package/lib/typescript/YearsList/get-years-data/get-years-data.d.ts +8 -0
  781. package/lib/typescript/YearsList/get-years-data/get-years-data.d.ts.map +1 -0
  782. package/lib/typescript/YearsList/index.d.ts +2 -0
  783. package/lib/typescript/YearsList/index.d.ts.map +1 -0
  784. package/lib/typescript/YearsList/is-year-disabled/is-year-disabled.d.ts +10 -0
  785. package/lib/typescript/YearsList/is-year-disabled/is-year-disabled.d.ts.map +1 -0
  786. package/lib/typescript/_reference/ExampleControl.d.ts +141 -0
  787. package/lib/typescript/_reference/ExampleControl.d.ts.map +1 -0
  788. package/lib/typescript/_reference/index.d.ts +3 -0
  789. package/lib/typescript/_reference/index.d.ts.map +1 -0
  790. package/lib/typescript/cell-metrics.d.ts +9 -0
  791. package/lib/typescript/cell-metrics.d.ts.map +1 -0
  792. package/lib/typescript/hooks/index.d.ts +8 -0
  793. package/lib/typescript/hooks/index.d.ts.map +1 -0
  794. package/lib/typescript/hooks/use-dates-input/index.d.ts +3 -0
  795. package/lib/typescript/hooks/use-dates-input/index.d.ts.map +1 -0
  796. package/lib/typescript/hooks/use-dates-input/use-dates-input.d.ts +67 -0
  797. package/lib/typescript/hooks/use-dates-input/use-dates-input.d.ts.map +1 -0
  798. package/lib/typescript/hooks/use-dates-state/index.d.ts +2 -0
  799. package/lib/typescript/hooks/use-dates-state/index.d.ts.map +1 -0
  800. package/lib/typescript/hooks/use-dates-state/is-in-range/index.d.ts +2 -0
  801. package/lib/typescript/hooks/use-dates-state/is-in-range/index.d.ts.map +1 -0
  802. package/lib/typescript/hooks/use-dates-state/is-in-range/is-in-range.d.ts +9 -0
  803. package/lib/typescript/hooks/use-dates-state/is-in-range/is-in-range.d.ts.map +1 -0
  804. package/lib/typescript/hooks/use-dates-state/use-dates-state.d.ts +47 -0
  805. package/lib/typescript/hooks/use-dates-state/use-dates-state.d.ts.map +1 -0
  806. package/lib/typescript/hooks/use-time-picker/index.d.ts +3 -0
  807. package/lib/typescript/hooks/use-time-picker/index.d.ts.map +1 -0
  808. package/lib/typescript/hooks/use-time-picker/use-time-picker.d.ts +64 -0
  809. package/lib/typescript/hooks/use-time-picker/use-time-picker.d.ts.map +1 -0
  810. package/lib/typescript/hooks/use-uncontrolled-dates/index.d.ts +3 -0
  811. package/lib/typescript/hooks/use-uncontrolled-dates/index.d.ts.map +1 -0
  812. package/lib/typescript/hooks/use-uncontrolled-dates/use-uncontrolled-dates.d.ts +42 -0
  813. package/lib/typescript/hooks/use-uncontrolled-dates/use-uncontrolled-dates.d.ts.map +1 -0
  814. package/lib/typescript/index.d.ts +37 -0
  815. package/lib/typescript/index.d.ts.map +1 -0
  816. package/lib/typescript/internal/a11y.d.ts +41 -0
  817. package/lib/typescript/internal/a11y.d.ts.map +1 -0
  818. package/lib/typescript/internal/focus-element.d.ts +12 -0
  819. package/lib/typescript/internal/focus-element.d.ts.map +1 -0
  820. package/lib/typescript/internal/get-input-default-date.d.ts +22 -0
  821. package/lib/typescript/internal/get-input-default-date.d.ts.map +1 -0
  822. package/lib/typescript/internal/has-prevent-default.d.ts +30 -0
  823. package/lib/typescript/internal/has-prevent-default.d.ts.map +1 -0
  824. package/lib/typescript/internal/parse-date-string.d.ts +24 -0
  825. package/lib/typescript/internal/parse-date-string.d.ts.map +1 -0
  826. package/lib/typescript/internal/picker-presets.d.ts +32 -0
  827. package/lib/typescript/internal/picker-presets.d.ts.map +1 -0
  828. package/lib/typescript/internal/select-on-focus.d.ts +12 -0
  829. package/lib/typescript/internal/select-on-focus.d.ts.map +1 -0
  830. package/lib/typescript/internal/web-cursor.d.ts +10 -0
  831. package/lib/typescript/internal/web-cursor.d.ts.map +1 -0
  832. package/lib/typescript/types.d.ts +130 -0
  833. package/lib/typescript/types.d.ts.map +1 -0
  834. package/lib/typescript/utils/assign-time/assign-time.d.ts +12 -0
  835. package/lib/typescript/utils/assign-time/assign-time.d.ts.map +1 -0
  836. package/lib/typescript/utils/clamp-date/clamp-date.d.ts +9 -0
  837. package/lib/typescript/utils/clamp-date/clamp-date.d.ts.map +1 -0
  838. package/lib/typescript/utils/clamp-time/clamp-time.d.ts +11 -0
  839. package/lib/typescript/utils/clamp-time/clamp-time.d.ts.map +1 -0
  840. package/lib/typescript/utils/clamp-time/index.d.ts +2 -0
  841. package/lib/typescript/utils/clamp-time/index.d.ts.map +1 -0
  842. package/lib/typescript/utils/get-date-in-tab-order/get-date-in-tab-order.d.ts +26 -0
  843. package/lib/typescript/utils/get-date-in-tab-order/get-date-in-tab-order.d.ts.map +1 -0
  844. package/lib/typescript/utils/get-default-clamped-date/get-default-clamped-date.d.ts +12 -0
  845. package/lib/typescript/utils/get-default-clamped-date/get-default-clamped-date.d.ts.map +1 -0
  846. package/lib/typescript/utils/get-end-of-week/get-end-of-week.d.ts +8 -0
  847. package/lib/typescript/utils/get-end-of-week/get-end-of-week.d.ts.map +1 -0
  848. package/lib/typescript/utils/get-formatted-date/get-formatted-date.d.ts +23 -0
  849. package/lib/typescript/utils/get-formatted-date/get-formatted-date.d.ts.map +1 -0
  850. package/lib/typescript/utils/get-formatted-time/get-formatted-time.d.ts +16 -0
  851. package/lib/typescript/utils/get-formatted-time/get-formatted-time.d.ts.map +1 -0
  852. package/lib/typescript/utils/get-formatted-time/index.d.ts +3 -0
  853. package/lib/typescript/utils/get-formatted-time/index.d.ts.map +1 -0
  854. package/lib/typescript/utils/get-min-max-time/get-min-max-time.d.ts +31 -0
  855. package/lib/typescript/utils/get-min-max-time/get-min-max-time.d.ts.map +1 -0
  856. package/lib/typescript/utils/get-min-max-time/index.d.ts +2 -0
  857. package/lib/typescript/utils/get-min-max-time/index.d.ts.map +1 -0
  858. package/lib/typescript/utils/get-month-days/get-month-days.d.ts +18 -0
  859. package/lib/typescript/utils/get-month-days/get-month-days.d.ts.map +1 -0
  860. package/lib/typescript/utils/get-parsed-time/get-parsed-time.d.ts +29 -0
  861. package/lib/typescript/utils/get-parsed-time/get-parsed-time.d.ts.map +1 -0
  862. package/lib/typescript/utils/get-parsed-time/index.d.ts +3 -0
  863. package/lib/typescript/utils/get-parsed-time/index.d.ts.map +1 -0
  864. package/lib/typescript/utils/get-start-of-week/get-start-of-week.d.ts +8 -0
  865. package/lib/typescript/utils/get-start-of-week/get-start-of-week.d.ts.map +1 -0
  866. package/lib/typescript/utils/get-time-range/get-time-range.d.ts +19 -0
  867. package/lib/typescript/utils/get-time-range/get-time-range.d.ts.map +1 -0
  868. package/lib/typescript/utils/get-time-range/index.d.ts +3 -0
  869. package/lib/typescript/utils/get-time-range/index.d.ts.map +1 -0
  870. package/lib/typescript/utils/get-time-string/get-time-string.d.ts +26 -0
  871. package/lib/typescript/utils/get-time-string/get-time-string.d.ts.map +1 -0
  872. package/lib/typescript/utils/get-time-string/index.d.ts +3 -0
  873. package/lib/typescript/utils/get-time-string/index.d.ts.map +1 -0
  874. package/lib/typescript/utils/get-week-number/get-week-number.d.ts +7 -0
  875. package/lib/typescript/utils/get-week-number/get-week-number.d.ts.map +1 -0
  876. package/lib/typescript/utils/handle-control-key-down/handle-control-key-down.d.ts +94 -0
  877. package/lib/typescript/utils/handle-control-key-down/handle-control-key-down.d.ts.map +1 -0
  878. package/lib/typescript/utils/index.d.ts +36 -0
  879. package/lib/typescript/utils/index.d.ts.map +1 -0
  880. package/lib/typescript/utils/is-after-min-date/is-after-min-date.d.ts +7 -0
  881. package/lib/typescript/utils/is-after-min-date/is-after-min-date.d.ts.map +1 -0
  882. package/lib/typescript/utils/is-before-max-date/is-before-max-date.d.ts +7 -0
  883. package/lib/typescript/utils/is-before-max-date/is-before-max-date.d.ts.map +1 -0
  884. package/lib/typescript/utils/is-date-valid/is-date-valid.d.ts +21 -0
  885. package/lib/typescript/utils/is-date-valid/is-date-valid.d.ts.map +1 -0
  886. package/lib/typescript/utils/is-same-month/is-same-month.d.ts +4 -0
  887. package/lib/typescript/utils/is-same-month/is-same-month.d.ts.map +1 -0
  888. package/lib/typescript/utils/is-same-time/index.d.ts +3 -0
  889. package/lib/typescript/utils/is-same-time/index.d.ts.map +1 -0
  890. package/lib/typescript/utils/is-same-time/is-same-time.d.ts +14 -0
  891. package/lib/typescript/utils/is-same-time/is-same-time.d.ts.map +1 -0
  892. package/lib/typescript/utils/pad-time/index.d.ts +2 -0
  893. package/lib/typescript/utils/pad-time/index.d.ts.map +1 -0
  894. package/lib/typescript/utils/pad-time/pad-time.d.ts +6 -0
  895. package/lib/typescript/utils/pad-time/pad-time.d.ts.map +1 -0
  896. package/lib/typescript/utils/split-time-string/index.d.ts +2 -0
  897. package/lib/typescript/utils/split-time-string/index.d.ts.map +1 -0
  898. package/lib/typescript/utils/split-time-string/split-time-string.d.ts +13 -0
  899. package/lib/typescript/utils/split-time-string/split-time-string.d.ts.map +1 -0
  900. package/lib/typescript/utils/time-to-seconds/index.d.ts +3 -0
  901. package/lib/typescript/utils/time-to-seconds/index.d.ts.map +1 -0
  902. package/lib/typescript/utils/time-to-seconds/time-to-seconds.d.ts +23 -0
  903. package/lib/typescript/utils/time-to-seconds/time-to-seconds.d.ts.map +1 -0
  904. package/lib/typescript/utils/to-date-string/to-date-string.d.ts +15 -0
  905. package/lib/typescript/utils/to-date-string/to-date-string.d.ts.map +1 -0
  906. package/package.json +126 -0
  907. package/src/AmPmInput/AmPmInput.tsx +250 -0
  908. package/src/AmPmInput/index.ts +1 -0
  909. package/src/Calendar/Calendar.tsx +588 -0
  910. package/src/Calendar/clamp-level/clamp-level.ts +45 -0
  911. package/src/Calendar/index.ts +8 -0
  912. package/src/Calendar/pick-calendar-props/index.ts +1 -0
  913. package/src/Calendar/pick-calendar-props/pick-calendar-props.ts +148 -0
  914. package/src/CalendarHeader/CalendarHeader.tsx +490 -0
  915. package/src/CalendarHeader/index.ts +1 -0
  916. package/src/DateInput/DateInput.tsx +426 -0
  917. package/src/DateInput/index.ts +1 -0
  918. package/src/DatePicker/DatePicker.tsx +244 -0
  919. package/src/DatePicker/index.ts +2 -0
  920. package/src/DatePickerInput/DatePickerInput.tsx +181 -0
  921. package/src/DatePickerInput/index.ts +1 -0
  922. package/src/DateTimePicker/DateTimePicker.tsx +295 -0
  923. package/src/DateTimePicker/index.ts +1 -0
  924. package/src/DatesProvider/DatesProvider.tsx +80 -0
  925. package/src/DatesProvider/index.ts +11 -0
  926. package/src/DatesProvider/use-dates-context.ts +44 -0
  927. package/src/Day/Day.tsx +366 -0
  928. package/src/Day/index.ts +2 -0
  929. package/src/DecadeLevel/DecadeLevel.tsx +306 -0
  930. package/src/DecadeLevel/get-decade-range/get-decade-range.ts +15 -0
  931. package/src/DecadeLevel/index.ts +1 -0
  932. package/src/DecadeLevelGroup/DecadeLevelGroup.tsx +213 -0
  933. package/src/DecadeLevelGroup/index.ts +1 -0
  934. package/src/HiddenDatesInput/HiddenDatesInput.tsx +130 -0
  935. package/src/HiddenDatesInput/index.ts +5 -0
  936. package/src/InlineDateTimePicker/InlineDateTimePicker.tsx +549 -0
  937. package/src/InlineDateTimePicker/index.ts +1 -0
  938. package/src/Introduction.mdx +39 -0
  939. package/src/LevelsGroup/LevelsGroup.tsx +118 -0
  940. package/src/LevelsGroup/index.ts +1 -0
  941. package/src/MiniCalendar/MiniCalendar.tsx +559 -0
  942. package/src/MiniCalendar/index.ts +2 -0
  943. package/src/Month/Month.tsx +536 -0
  944. package/src/Month/index.ts +2 -0
  945. package/src/MonthLevel/MonthLevel.tsx +321 -0
  946. package/src/MonthLevel/index.ts +1 -0
  947. package/src/MonthLevelGroup/MonthLevelGroup.tsx +235 -0
  948. package/src/MonthLevelGroup/index.ts +1 -0
  949. package/src/MonthPicker/MonthPicker.tsx +226 -0
  950. package/src/MonthPicker/index.ts +7 -0
  951. package/src/MonthPickerInput/MonthPickerInput.tsx +191 -0
  952. package/src/MonthPickerInput/index.ts +1 -0
  953. package/src/MonthsList/MonthsList.tsx +357 -0
  954. package/src/MonthsList/get-month-in-tab-order/get-month-in-tab-order.ts +44 -0
  955. package/src/MonthsList/get-months-data/get-months-data.ts +23 -0
  956. package/src/MonthsList/index.ts +1 -0
  957. package/src/MonthsList/is-month-disabled/is-month-disabled.ts +26 -0
  958. package/src/PickerControl/PickerControl.tsx +299 -0
  959. package/src/PickerControl/index.ts +1 -0
  960. package/src/PickerInputBase/PickerInputBase.tsx +442 -0
  961. package/src/PickerInputBase/index.ts +7 -0
  962. package/src/SpinInput/SpinInput.tsx +270 -0
  963. package/src/SpinInput/index.ts +1 -0
  964. package/src/TimeControlsList/AmPmControlsList.tsx +43 -0
  965. package/src/TimeControlsList/TimeControl.tsx +126 -0
  966. package/src/TimeControlsList/TimeControlsList.tsx +286 -0
  967. package/src/TimeControlsList/index.ts +5 -0
  968. package/src/TimeGrid/TimeGrid.tsx +424 -0
  969. package/src/TimeGrid/compare-time/compare-time.ts +19 -0
  970. package/src/TimeGrid/index.ts +1 -0
  971. package/src/TimeInput/TimeInput.tsx +191 -0
  972. package/src/TimeInput/index.ts +1 -0
  973. package/src/TimePicker/TimePicker.tsx +915 -0
  974. package/src/TimePicker/index.ts +1 -0
  975. package/src/TimePresets/TimePresetControl.tsx +193 -0
  976. package/src/TimePresets/TimePresetGroup.tsx +194 -0
  977. package/src/TimePresets/TimePresets.tsx +247 -0
  978. package/src/TimePresets/index.ts +9 -0
  979. package/src/TimeValue/TimeValue.tsx +100 -0
  980. package/src/TimeValue/index.ts +1 -0
  981. package/src/WeekdaysRow/WeekdaysRow.tsx +235 -0
  982. package/src/WeekdaysRow/get-weekdays-names/get-weekdays-names.ts +39 -0
  983. package/src/WeekdaysRow/index.ts +3 -0
  984. package/src/YearLevel/YearLevel.tsx +296 -0
  985. package/src/YearLevel/index.ts +1 -0
  986. package/src/YearLevelGroup/YearLevelGroup.tsx +215 -0
  987. package/src/YearLevelGroup/index.ts +1 -0
  988. package/src/YearPicker/YearPicker.tsx +203 -0
  989. package/src/YearPicker/index.ts +2 -0
  990. package/src/YearPickerInput/YearPickerInput.tsx +186 -0
  991. package/src/YearPickerInput/index.ts +1 -0
  992. package/src/YearsList/YearsList.tsx +354 -0
  993. package/src/YearsList/get-year-in-tab-order/get-year-in-tab-order.ts +44 -0
  994. package/src/YearsList/get-years-data/get-years-data.ts +27 -0
  995. package/src/YearsList/index.ts +1 -0
  996. package/src/YearsList/is-year-disabled/is-year-disabled.ts +26 -0
  997. package/src/_reference/ExampleControl.tsx +418 -0
  998. package/src/_reference/README.md +69 -0
  999. package/src/_reference/index.ts +5 -0
  1000. package/src/cell-metrics.ts +52 -0
  1001. package/src/hooks/index.ts +17 -0
  1002. package/src/hooks/use-dates-input/index.ts +2 -0
  1003. package/src/hooks/use-dates-input/use-dates-input.ts +175 -0
  1004. package/src/hooks/use-dates-state/index.ts +1 -0
  1005. package/src/hooks/use-dates-state/is-in-range/index.ts +1 -0
  1006. package/src/hooks/use-dates-state/is-in-range/is-in-range.ts +20 -0
  1007. package/src/hooks/use-dates-state/use-dates-state.ts +272 -0
  1008. package/src/hooks/use-time-picker/index.ts +8 -0
  1009. package/src/hooks/use-time-picker/use-time-picker.ts +298 -0
  1010. package/src/hooks/use-uncontrolled-dates/index.ts +2 -0
  1011. package/src/hooks/use-uncontrolled-dates/use-uncontrolled-dates.ts +99 -0
  1012. package/src/index.ts +49 -0
  1013. package/src/internal/a11y.ts +81 -0
  1014. package/src/internal/focus-element.ts +21 -0
  1015. package/src/internal/get-input-default-date.ts +41 -0
  1016. package/src/internal/has-prevent-default.ts +48 -0
  1017. package/src/internal/parse-date-string.ts +54 -0
  1018. package/src/internal/picker-presets.tsx +92 -0
  1019. package/src/internal/select-on-focus.ts +31 -0
  1020. package/src/internal/web-cursor.ts +15 -0
  1021. package/src/test-utils.tsx +24 -0
  1022. package/src/types.ts +202 -0
  1023. package/src/utils/assign-time/assign-time.ts +35 -0
  1024. package/src/utils/clamp-date/clamp-date.ts +30 -0
  1025. package/src/utils/clamp-time/clamp-time.ts +26 -0
  1026. package/src/utils/clamp-time/index.ts +1 -0
  1027. package/src/utils/get-date-in-tab-order/get-date-in-tab-order.ts +64 -0
  1028. package/src/utils/get-default-clamped-date/get-default-clamped-date.ts +34 -0
  1029. package/src/utils/get-end-of-week/get-end-of-week.ts +26 -0
  1030. package/src/utils/get-formatted-date/get-formatted-date.ts +60 -0
  1031. package/src/utils/get-formatted-time/get-formatted-time.ts +51 -0
  1032. package/src/utils/get-formatted-time/index.ts +2 -0
  1033. package/src/utils/get-min-max-time/get-min-max-time.ts +43 -0
  1034. package/src/utils/get-min-max-time/index.ts +1 -0
  1035. package/src/utils/get-month-days/get-month-days.ts +65 -0
  1036. package/src/utils/get-parsed-time/get-parsed-time.ts +72 -0
  1037. package/src/utils/get-parsed-time/index.ts +2 -0
  1038. package/src/utils/get-start-of-week/get-start-of-week.ts +20 -0
  1039. package/src/utils/get-time-range/get-time-range.ts +37 -0
  1040. package/src/utils/get-time-range/index.ts +2 -0
  1041. package/src/utils/get-time-string/get-time-string.ts +88 -0
  1042. package/src/utils/get-time-string/index.ts +2 -0
  1043. package/src/utils/get-week-number/get-week-number.ts +15 -0
  1044. package/src/utils/handle-control-key-down/handle-control-key-down.ts +348 -0
  1045. package/src/utils/index.ts +45 -0
  1046. package/src/utils/is-after-min-date/is-after-min-date.ts +14 -0
  1047. package/src/utils/is-before-max-date/is-before-max-date.ts +14 -0
  1048. package/src/utils/is-date-valid/is-date-valid.ts +44 -0
  1049. package/src/utils/is-same-month/is-same-month.ts +11 -0
  1050. package/src/utils/is-same-time/index.ts +2 -0
  1051. package/src/utils/is-same-time/is-same-time.ts +29 -0
  1052. package/src/utils/pad-time/index.ts +1 -0
  1053. package/src/utils/pad-time/pad-time.ts +7 -0
  1054. package/src/utils/split-time-string/index.ts +1 -0
  1055. package/src/utils/split-time-string/split-time-string.ts +16 -0
  1056. package/src/utils/time-to-seconds/index.ts +2 -0
  1057. package/src/utils/time-to-seconds/time-to-seconds.ts +40 -0
  1058. package/src/utils/to-date-string/to-date-string.ts +33 -0
@@ -0,0 +1,54 @@
1
+ import dayjs from "dayjs";
2
+ import customParseFormat from "dayjs/plugin/customParseFormat";
3
+
4
+ import type { DateStringValue } from "../types";
5
+
6
+ // Register `customParseFormat` exactly once so strict format parsing works.
7
+ // `dayjs.extend` is idempotent, so a repeated import is a harmless no-op.
8
+ dayjs.extend(customParseFormat);
9
+
10
+ /** Input for {@link parseDateString}. */
11
+ export interface ParseDateStringInput {
12
+ /** Raw text typed by the user. */
13
+ value: string;
14
+
15
+ /** `dayjs` format the text is expected to match (the field's `valueFormat`). */
16
+ format: string;
17
+
18
+ /** Resolved `dayjs` locale (from `DatesProvider` / the `locale` prop). */
19
+ locale: string;
20
+
21
+ /** Keep the time component in the canonical output. @default false */
22
+ withTime?: boolean;
23
+ }
24
+
25
+ /**
26
+ * Deterministic, native-safe replacement for Mantine's `defaultDateParser` +
27
+ * `dateStringParser` (which reach for `new Date(dateString)`). Parses typed text
28
+ * to a canonical `YYYY-MM-DD` (or `YYYY-MM-DD HH:mm:ss` with `withTime`) string,
29
+ * or `null` when it cannot be understood.
30
+ *
31
+ * Tries a strict match against `format` first (via `customParseFormat`), then a
32
+ * lenient `dayjs(value)` fallback for ISO-ish input — NEVER `new Date(value)` for
33
+ * parsing, so it behaves identically on web and native.
34
+ */
35
+ export function parseDateString({
36
+ value,
37
+ format,
38
+ locale,
39
+ withTime = false,
40
+ }: ParseDateStringInput): DateStringValue | null {
41
+ const outputFormat = withTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
42
+
43
+ const strict = dayjs(value, format, locale, true);
44
+ if (strict.isValid()) {
45
+ return strict.format(outputFormat);
46
+ }
47
+
48
+ const lenient = dayjs(value);
49
+ if (lenient.isValid()) {
50
+ return lenient.locale(locale).format(outputFormat);
51
+ }
52
+
53
+ return null;
54
+ }
@@ -0,0 +1,92 @@
1
+ // Internal cross-platform helper — NOT exported from the public `src/index.ts`
2
+ // barrel. Shared by the three inline pickers (`YearPicker`/`MonthPicker`/
3
+ // `DatePicker`), each of which rendered an identical `<Box role="list">` of
4
+ // preset `UnstyledButton`s plus a `handlePresetSelect` that imperatively jumps
5
+ // the Calendar's displayed date + level before applying the value. The ONLY
6
+ // per-picker delta is the `level` the list resets to (`month`/`year`/`decade`),
7
+ // so it is a parameter — the rest lives here in one place.
8
+ import * as React from "react";
9
+
10
+ import { Box, UnstyledButton } from "@knitui/components";
11
+
12
+ import type { CalendarLevel, DatePickerType, DatePickerValue, DateStringValue } from "../types";
13
+ import { hasPreventDefault } from "./has-prevent-default";
14
+
15
+ /** A predefined value the user can jump to from a picker's preset list. */
16
+ export interface PickerPreset<Type extends DatePickerType> {
17
+ /** Value applied when the preset is selected (shaped by the picker `type`). */
18
+ value: DatePickerValue<Type, DateStringValue>;
19
+
20
+ /** Preset label. */
21
+ label: React.ReactNode;
22
+ }
23
+
24
+ interface RenderPresetListInput<Type extends DatePickerType> {
25
+ /** Predefined values to render. */
26
+ presets: PickerPreset<Type>[];
27
+
28
+ /** Imperative setter for the Calendar's displayed date (from `__setDateRef`). */
29
+ setDateRef: React.MutableRefObject<((date: DateStringValue) => void) | null>;
30
+
31
+ /** Imperative setter for the Calendar's displayed level (from `__setLevelRef`). */
32
+ setLevelRef: React.MutableRefObject<((level: CalendarLevel) => void) | null>;
33
+
34
+ /** Level the list resets the Calendar to on select (`month`/`year`/`decade`). */
35
+ level: CalendarLevel;
36
+
37
+ /** Applies the selected value (the picker's `setValue`). */
38
+ setValue: (value: DatePickerValue<Type, DateStringValue>) => void;
39
+
40
+ /** If defined, called with the preset value INSTEAD of `setValue`. */
41
+ __onPresetSelect?: (preset: DatePickerValue<Type, DateStringValue>) => void;
42
+ }
43
+
44
+ /**
45
+ * Renders the shared inline-picker preset list — a `role="list"` of pressable
46
+ * presets that jump the Calendar's date + level, then apply the value (or defer
47
+ * to `__onPresetSelect`). Returns just the list element; the caller keeps its own
48
+ * wrapper + Calendar.
49
+ */
50
+ export function renderPresetList<Type extends DatePickerType>({
51
+ presets,
52
+ setDateRef,
53
+ setLevelRef,
54
+ level,
55
+ setValue,
56
+ __onPresetSelect,
57
+ }: RenderPresetListInput<Type>): React.JSX.Element {
58
+ const handlePresetSelect = (presetValue: DatePickerValue<Type, DateStringValue>) => {
59
+ const view: DatePickerValue<DatePickerType, DateStringValue> = presetValue;
60
+ const firstDate = Array.isArray(view) ? view[0] : view;
61
+ if (firstDate === undefined) {
62
+ return;
63
+ }
64
+ if (firstDate !== null) {
65
+ setDateRef.current?.(firstDate);
66
+ }
67
+ setLevelRef.current?.(level);
68
+ if (__onPresetSelect) {
69
+ __onPresetSelect(presetValue);
70
+ } else {
71
+ setValue(presetValue);
72
+ }
73
+ };
74
+
75
+ return (
76
+ <Box role="list">
77
+ {presets.map((preset, index) => (
78
+ <UnstyledButton
79
+ key={index}
80
+ onPress={() => handlePresetSelect(preset.value)}
81
+ onPressIn={(event) => {
82
+ if (hasPreventDefault(event)) {
83
+ event.preventDefault();
84
+ }
85
+ }}
86
+ >
87
+ {preset.label}
88
+ </UnstyledButton>
89
+ ))}
90
+ </Box>
91
+ );
92
+ }
@@ -0,0 +1,31 @@
1
+ // Internal cross-platform helper — NOT exported from the public `src/index.ts`
2
+ // barrel. Shared by the time-segment leaves (`SpinInput`, `AmPmInput`) so the
3
+ // web `.select()`-on-focus narrowing lives in one place (the same extraction
4
+ // pattern as `web-cursor`, `focus-element` and `has-prevent-default`).
5
+
6
+ import { isWeb } from "@knitui/core";
7
+
8
+ /** A web focus event whose target exposes `.select()` (text selection). */
9
+ interface SelectableFocusTarget {
10
+ currentTarget?: { select?: () => void };
11
+ target?: { select?: () => void };
12
+ }
13
+
14
+ /**
15
+ * Select the whole field's text on focus so the next keystroke REPLACES it
16
+ * rather than appending — Mantine does this with `event.currentTarget.select()`
17
+ * and it is the single most important behaviour for the fixed-width time
18
+ * segments (typing into an already-filled segment must overwrite, not append).
19
+ *
20
+ * Web-only: the native counterpart is the declarative `selectTextOnFocus` prop
21
+ * on the RN `TextInput`, so on native this narrows nothing and returns. No DOM
22
+ * types leak — the event is accepted as `unknown` and narrowed at runtime.
23
+ */
24
+ export function selectAllOnFocus(event: unknown): void {
25
+ if (!isWeb || typeof event !== "object" || event === null) {
26
+ return;
27
+ }
28
+ const target =
29
+ (event as SelectableFocusTarget).currentTarget ?? (event as SelectableFocusTarget).target;
30
+ target?.select?.();
31
+ }
@@ -0,0 +1,15 @@
1
+ // Internal cross-platform helper — NOT exported from the public `src/index.ts`
2
+ // barrel. Shared by `Day`, `PickerControl` and `CalendarHeader` (and any future
3
+ // grid control) so the web-only cursor narrowing lives in one place instead of
4
+ // being copied per component (the same extraction pattern as `cell-metrics` and
5
+ // `has-prevent-default`).
6
+
7
+ import { isWeb } from "@knitui/core";
8
+
9
+ /**
10
+ * Cursor is a web-only affordance — passing it on native leaks to the RN host
11
+ * node. `isWeb` is a module-load constant, so this is safe to call inside a
12
+ * static styled-variant definition. Mirrors the kit's internal `webCursor`,
13
+ * which is not exported from `@knitui/components`.
14
+ */
15
+ export const webCursor = <T extends string>(cursor: T): { cursor?: T } => (isWeb ? { cursor } : {});
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Shared test helper for @knitui/dates. Mirrors packages/components/src/test-utils.tsx:
3
+ * re-exports @testing-library/react and overrides `render` so every tree is wrapped
4
+ * in the kit's <Provider> (Tamagui theming). Import from here in *.test.tsx instead
5
+ * of from @testing-library/react directly.
6
+ *
7
+ * import { render, screen, fireEvent } from "../test-utils";
8
+ */
9
+ import * as React from "react";
10
+
11
+ import { type RenderOptions, render as rtlRender } from "@testing-library/react";
12
+
13
+ import { Provider } from "@knitui/core";
14
+
15
+ function Wrapper({ children }: { children: React.ReactNode }) {
16
+ return <Provider defaultColorScheme="light">{children}</Provider>;
17
+ }
18
+
19
+ function render(ui: React.ReactElement, options?: Omit<RenderOptions, "wrapper">) {
20
+ return rtlRender(ui, { wrapper: Wrapper, ...options });
21
+ }
22
+
23
+ export * from "@testing-library/react";
24
+ export { render };
package/src/types.ts ADDED
@@ -0,0 +1,202 @@
1
+ // Shared date types for @knitui/dates — ported from @mantine/dates `src/types/*`
2
+ // (GeneralTypes, DatePickerValue, PickerBaseProps, ControlsGroupSettings),
3
+ // keeping Mantine's PUBLIC prop NAMES so the package surface matches. Mantine's
4
+ // DOM-typed control callbacks (`HTMLButtonElement` / `React.MouseEvent`) are
5
+ // re-typed here for cross-platform use: control refs surface as `FocusableControl`
6
+ // descriptors (wrapping a `TamaguiElement` host node), and the
7
+ // press/keyboard event types are DERIVED from `PickerControl`'s own prop
8
+ // signatures (the same `Parameters<NonNullable<…>>` pattern `Month` uses for
9
+ // `Day`) — never web-only DOM types.
10
+
11
+ import type { ReactNode } from "react";
12
+
13
+ import type { PickerControlProps } from "./PickerControl";
14
+ import type { FocusableControl } from "./utils";
15
+
16
+ /* -------------------------------------------------------------------------- */
17
+ /* GeneralTypes */
18
+ /* -------------------------------------------------------------------------- */
19
+
20
+ /** Date value used by all date components, format: `YYYY-MM-DD`. */
21
+ export type DateStringValue = string;
22
+
23
+ /** Date-time value used by all date components, format: `YYYY-MM-DD HH:mm:ss`. */
24
+ export type DateTimeStringValue = string;
25
+
26
+ /** Day of the week as an index, `0` (Sunday) through `6` (Saturday). */
27
+ export type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
28
+
29
+ /** Calendar zoom level. */
30
+ export type CalendarLevel = "month" | "year" | "decade";
31
+
32
+ /** Payload passed to a calendar control's keydown handler. */
33
+ export interface ControlKeydownPayload {
34
+ cellIndex: number;
35
+ rowIndex: number;
36
+ date: DateStringValue;
37
+ }
38
+
39
+ /** A formatted date label — either a format string or a render function. */
40
+ export type DateLabelFormat = string | ((date: DateStringValue) => ReactNode);
41
+
42
+ /* -------------------------------------------------------------------------- */
43
+ /* Time layer primitives */
44
+ /* -------------------------------------------------------------------------- */
45
+
46
+ /**
47
+ * Clock display mode shared by the entire time layer (`TimeValue` and the later
48
+ * `TimeInput`/`TimeGrid`/`TimePicker`). Mantine hosts this on `TimePicker`; we
49
+ * host it here so leaves like `TimeValue` don't depend on an unbuilt component.
50
+ */
51
+ export type TimePickerFormat = "12h" | "24h";
52
+
53
+ /** AM/PM labels used by the `12h` clock display mode. */
54
+ export interface TimePickerAmPmLabels {
55
+ am: string;
56
+ pm: string;
57
+ }
58
+
59
+ /**
60
+ * `TimePicker` mode: `'time'` is a regular clock input; `'duration'` allows
61
+ * hour values greater than 24 (and forces the `24h` format). Ported from
62
+ * Mantine's `TimePicker.types`.
63
+ */
64
+ export type TimePickerType = "time" | "duration";
65
+
66
+ /** Input passed to a {@link TimePickerPasteSplit} transform. */
67
+ export interface TimePickerPasteSplitInput {
68
+ time: string;
69
+ format: TimePickerFormat;
70
+ amPmLabels: TimePickerAmPmLabels;
71
+ }
72
+
73
+ /** The parsed `{ hours, minutes, seconds, amPm }` a paste transform returns. */
74
+ export interface TimePickerPasteSplitReturnType {
75
+ hours: number | null;
76
+ minutes: number | null;
77
+ seconds: number | null;
78
+ amPm: string | null;
79
+ }
80
+
81
+ /**
82
+ * Transform a pasted/typed free string into time segments. Defaults to the
83
+ * built-in `getParsedTime` parser; consumers can override to accept other
84
+ * formats. Ported from Mantine's `TimePicker.types`.
85
+ */
86
+ export type TimePickerPasteSplit = (
87
+ input: TimePickerPasteSplitInput,
88
+ ) => TimePickerPasteSplitReturnType;
89
+
90
+ /** A labelled group of preset time strings shown in the `TimePicker` dropdown. */
91
+ export interface TimePickerPresetGroup {
92
+ label: ReactNode;
93
+ values: string[];
94
+ }
95
+
96
+ /** `TimePicker` presets — a flat `string[]` or labelled {@link TimePickerPresetGroup}s. */
97
+ export type TimePickerPresets = string[] | TimePickerPresetGroup[];
98
+
99
+ /* -------------------------------------------------------------------------- */
100
+ /* DatePickerValue */
101
+ /* -------------------------------------------------------------------------- */
102
+
103
+ /** A single selectable date value. */
104
+ export type DateValue = DateStringValue | Date | null;
105
+
106
+ /** A `[start, end]` range value. */
107
+ export type DatesRangeValue<ValueType = DateValue> = [ValueType | null, ValueType | null];
108
+
109
+ /** Selection mode of a date picker. */
110
+ export type DatePickerType = "default" | "multiple" | "range";
111
+
112
+ /**
113
+ * The value shape for a picker, resolved from its `type`:
114
+ * `range` → `[start, end]`, `multiple` → array, `default` → single value.
115
+ */
116
+ export type DatePickerValue<
117
+ Type extends DatePickerType = "default",
118
+ ValueType = DateValue,
119
+ > = Type extends "range"
120
+ ? DatesRangeValue<ValueType>
121
+ : Type extends "multiple"
122
+ ? ValueType[]
123
+ : ValueType | null;
124
+
125
+ /* -------------------------------------------------------------------------- */
126
+ /* PickerBaseProps */
127
+ /* -------------------------------------------------------------------------- */
128
+
129
+ /**
130
+ * Base value props shared by every input-trigger picker. Defined now so the
131
+ * surface is stable for later iterations even though no picker consumes it yet.
132
+ */
133
+ export interface PickerBaseProps<Type extends DatePickerType = "default"> {
134
+ /** Picker type: `range`, `multiple` or `default`. */
135
+ type?: DatePickerType | Type;
136
+
137
+ /** Value for controlled component. */
138
+ value?: DatePickerValue<Type>;
139
+
140
+ /** Default value for uncontrolled component. */
141
+ defaultValue?: DatePickerValue<Type>;
142
+
143
+ /** Called when value changes. */
144
+ onChange?: (value: DatePickerValue<Type, DateStringValue>) => void;
145
+
146
+ /** Whether the user can deselect a date by clicking it again — `type="default"` only. */
147
+ allowDeselect?: Type extends "default" ? boolean : never;
148
+
149
+ /** Whether a single day can be selected as a range — `type="range"` only. */
150
+ allowSingleDateInRange?: Type extends "range" ? boolean : never;
151
+ }
152
+
153
+ /* -------------------------------------------------------------------------- */
154
+ /* ControlsGroupSettings */
155
+ /* -------------------------------------------------------------------------- */
156
+
157
+ /**
158
+ * Cross-platform press event for a calendar control, derived from
159
+ * `PickerControl`'s own `onPress` prop signature — never `React.MouseEvent`.
160
+ */
161
+ export type ControlPressEvent = Parameters<NonNullable<PickerControlProps["onPress"]>>[0];
162
+
163
+ /**
164
+ * Cross-platform keyboard event for a calendar control, derived from
165
+ * `PickerControl`'s own `onKeyDown` prop signature — never `React.KeyboardEvent`.
166
+ */
167
+ export type ControlKeyboardEvent = Parameters<NonNullable<PickerControlProps["onKeyDown"]>>[0];
168
+
169
+ /**
170
+ * Settings shared by the month/year selection grids (`MonthsList`/`YearsList`)
171
+ * and consumed by the level groups for roving-focus arrow navigation. Ported
172
+ * from Mantine `types/ControlsGroupSettings.ts`, re-typed cross-platform: control
173
+ * refs surface as `FocusableControl` descriptors (host node + skip flags, built by
174
+ * the grid), and the press/keyboard events are the kit's own
175
+ * `ControlPressEvent`/`ControlKeyboardEvent` (above) instead of DOM events.
176
+ */
177
+ export interface ControlsGroupSettings {
178
+ /** Called when a control is pressed, with the press event and its date. */
179
+ __onControlClick?: (event: ControlPressEvent, date: DateStringValue) => void;
180
+
181
+ /** Called when the pointer enters a control (web hover); used for range preview. */
182
+ __onControlMouseEnter?: (event: unknown, date: DateStringValue) => void;
183
+
184
+ /** Called on a control keydown; used for arrow-key navigation. */
185
+ __onControlKeyDown?: (event: ControlKeyboardEvent, payload: ControlKeydownPayload) => void;
186
+
187
+ /**
188
+ * Receives a `FocusableControl` descriptor for each control by grid position;
189
+ * used for arrow-key roving focus. The grid builds it from the host node plus
190
+ * the control's disabled state so the navigation engine can skip cross-platform.
191
+ */
192
+ __getControlRef?: (rowIndex: number, cellIndex: number, control: FocusableControl) => void;
193
+
194
+ /** Minimum possible date in `YYYY-MM-DD` format or a `Date` object. */
195
+ minDate?: DateStringValue | Date;
196
+
197
+ /** Maximum possible date in `YYYY-MM-DD` format or a `Date` object. */
198
+ maxDate?: DateStringValue | Date;
199
+
200
+ /** dayjs locale; falls back to the value defined in `DatesProvider`. */
201
+ locale?: string;
202
+ }
@@ -0,0 +1,35 @@
1
+ import dayjs from "dayjs";
2
+
3
+ import type { DateStringValue, DateTimeStringValue } from "../../types";
4
+
5
+ /**
6
+ * Assigns the time portion (`HH:mm:ss`) onto a date value, returning a
7
+ * `YYYY-MM-DD HH:mm:ss` string.
8
+ *
9
+ * - When `dateValue` is `null` the current date is used as the date base.
10
+ * - When `timeString` is `""` the existing/current time is preserved (no
11
+ * time portion is overwritten).
12
+ * - Milliseconds are always zeroed out.
13
+ */
14
+ export function assignTime(
15
+ dateValue: DateStringValue | null,
16
+ timeString: string,
17
+ ): DateTimeStringValue | null {
18
+ let date = dateValue ? dayjs(dateValue) : dayjs();
19
+
20
+ if (timeString === "") {
21
+ return date.format("YYYY-MM-DD HH:mm:ss");
22
+ }
23
+
24
+ const parts = timeString.split(":");
25
+ const hours = Number(parts[0]);
26
+ const minutes = Number(parts[1]);
27
+ const seconds = parts[2] !== undefined ? Number(parts[2]) : 0;
28
+
29
+ date = date.set("hour", hours);
30
+ date = date.set("minute", minutes);
31
+ date = date.set("second", seconds);
32
+ date = date.set("millisecond", 0);
33
+
34
+ return date.format("YYYY-MM-DD HH:mm:ss");
35
+ }
@@ -0,0 +1,30 @@
1
+ import dayjs from "dayjs";
2
+
3
+ import type { DateStringValue } from "../../types";
4
+ import { toDateTimeString } from "../to-date-string/to-date-string";
5
+
6
+ /**
7
+ * Clamp `date` into the `[minDate, maxDate]` window, returning a
8
+ * `YYYY-MM-DD HH:mm:ss` string. With no bounds the date is returned as-is
9
+ * (normalised); below `minDate` returns `minDate`, above `maxDate` returns
10
+ * `maxDate`.
11
+ */
12
+ export function clampDate(
13
+ minDate: DateStringValue | Date | undefined,
14
+ maxDate: DateStringValue | Date | undefined,
15
+ date: DateStringValue | Date,
16
+ ): DateStringValue {
17
+ if (!minDate && !maxDate) {
18
+ return toDateTimeString(date);
19
+ }
20
+
21
+ if (minDate && dayjs(date).isBefore(minDate)) {
22
+ return toDateTimeString(minDate);
23
+ }
24
+
25
+ if (maxDate && dayjs(date).isAfter(maxDate)) {
26
+ return toDateTimeString(maxDate);
27
+ }
28
+
29
+ return toDateTimeString(date);
30
+ }
@@ -0,0 +1,26 @@
1
+ import {
2
+ secondsToTime,
3
+ type SecondsToTimeResult,
4
+ timeToSeconds,
5
+ } from "../time-to-seconds/time-to-seconds";
6
+
7
+ /**
8
+ * Clamp a `"HH:mm[:ss]"` string into `[min, max]` (each optional). Comparison is
9
+ * done in total seconds via {@link timeToSeconds}; an absent bound is treated as
10
+ * `-Infinity`/`+Infinity` so a one-sided range still clamps. Returns the clamped
11
+ * value as a {@link SecondsToTimeResult} (canonical string + numeric parts). The
12
+ * pure, `any`-free port of Mantine `TimePicker/utils/clamp-time`; the numeric
13
+ * clamp is inlined (no `@mantine/hooks`).
14
+ */
15
+ export function clampTime(
16
+ time: string,
17
+ min: string | undefined,
18
+ max: string | undefined,
19
+ ): SecondsToTimeResult {
20
+ const timeInSeconds = timeToSeconds(time);
21
+ const minInSeconds = min ? timeToSeconds(min) : -Infinity;
22
+ const maxInSeconds = max ? timeToSeconds(max) : Infinity;
23
+
24
+ const clampedSeconds = Math.max(minInSeconds, Math.min(timeInSeconds, maxInSeconds));
25
+ return secondsToTime(clampedSeconds);
26
+ }
@@ -0,0 +1 @@
1
+ export { clampTime } from "./clamp-time";
@@ -0,0 +1,64 @@
1
+ import dayjs from "dayjs";
2
+
3
+ import type { DayProps } from "../../Day";
4
+ import type { DateStringValue } from "../../types";
5
+ import { isAfterMinDate } from "../is-after-min-date/is-after-min-date";
6
+ import { isBeforeMaxDate } from "../is-before-max-date/is-before-max-date";
7
+ import { isSameMonth } from "../is-same-month/is-same-month";
8
+
9
+ interface GetDateInTabOrderInput {
10
+ /** The month grid as weeks of `YYYY-MM-DD` strings (from `getMonthDays`). */
11
+ dates: DateStringValue[][];
12
+ /** Lower bound, `YYYY-MM-DD`. */
13
+ minDate: DateStringValue | undefined;
14
+ /** Upper bound, `YYYY-MM-DD`. */
15
+ maxDate: DateStringValue | undefined;
16
+ /** Per-day prop getter — its `disabled`/`selected` participate in the choice. */
17
+ getDayProps: ((date: DateStringValue) => Partial<DayProps>) | undefined;
18
+ /** Predicate marking a day disabled. */
19
+ excludeDate: ((date: DateStringValue) => boolean) | undefined;
20
+ /** Whether outside-month days are hidden (excluded from candidacy). */
21
+ hideOutsideDates: boolean | undefined;
22
+ /** The displayed month, `YYYY-MM-DD`. */
23
+ month: DateStringValue;
24
+ }
25
+
26
+ /**
27
+ * Picks the single date that should carry `tabIndex={0}` (roving tabindex):
28
+ * the selected enabled day, else today, else the first enabled day. Mirrors
29
+ * @mantine/dates `getDateInTabOrder`. Returns `undefined` when no day qualifies.
30
+ */
31
+ export function getDateInTabOrder({
32
+ dates,
33
+ minDate,
34
+ maxDate,
35
+ getDayProps,
36
+ excludeDate,
37
+ hideOutsideDates,
38
+ month,
39
+ }: GetDateInTabOrderInput): DateStringValue | undefined {
40
+ const enabledDates = dates
41
+ .flat()
42
+ .filter(
43
+ (date) =>
44
+ isBeforeMaxDate(date, maxDate) &&
45
+ isAfterMinDate(date, minDate) &&
46
+ !excludeDate?.(date) &&
47
+ !getDayProps?.(date)?.disabled &&
48
+ (!hideOutsideDates || isSameMonth(date, month)),
49
+ );
50
+
51
+ const selectedDate = enabledDates.find((date) => getDayProps?.(date)?.selected);
52
+
53
+ if (selectedDate) {
54
+ return selectedDate;
55
+ }
56
+
57
+ const currentDate = enabledDates.find((date) => dayjs().isSame(date, "date"));
58
+
59
+ if (currentDate) {
60
+ return currentDate;
61
+ }
62
+
63
+ return enabledDates[0];
64
+ }
@@ -0,0 +1,34 @@
1
+ import dayjs from "dayjs";
2
+
3
+ import type { DateStringValue } from "../../types";
4
+ import { toDateString } from "../to-date-string/to-date-string";
5
+
6
+ interface GetDefaultClampedDate {
7
+ minDate: DateStringValue | Date | undefined;
8
+ maxDate: DateStringValue | Date | undefined;
9
+ }
10
+
11
+ /**
12
+ * The date a calendar should open on by default: today, clamped into the
13
+ * `[minDate, maxDate]` window. Returns a `YYYY-MM-DD` string.
14
+ */
15
+ export function getDefaultClampedDate({
16
+ minDate,
17
+ maxDate,
18
+ }: GetDefaultClampedDate): DateStringValue {
19
+ const today = dayjs();
20
+
21
+ if (!minDate && !maxDate) {
22
+ return toDateString(today);
23
+ }
24
+
25
+ if (minDate && dayjs(today).isBefore(minDate)) {
26
+ return toDateString(minDate);
27
+ }
28
+
29
+ if (maxDate && dayjs(today).isAfter(maxDate)) {
30
+ return toDateString(maxDate);
31
+ }
32
+
33
+ return toDateString(today);
34
+ }
@@ -0,0 +1,26 @@
1
+ import dayjs from "dayjs";
2
+
3
+ import type { DateStringValue, DayOfWeek } from "../../types";
4
+
5
+ /**
6
+ * Walks forwards from `date` to the last day of its week (the day before
7
+ * `firstDayOfWeek`), returning it as a `YYYY-MM-DD` string. An invalid input is
8
+ * passed straight back. Mirrors @mantine/dates `getEndOfWeek`.
9
+ */
10
+ export function getEndOfWeek(
11
+ date: DateStringValue,
12
+ firstDayOfWeek: DayOfWeek = 1,
13
+ ): DateStringValue {
14
+ let value = dayjs(date);
15
+
16
+ if (!value.isValid()) {
17
+ return date;
18
+ }
19
+
20
+ const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1;
21
+ while (value.day() !== lastDayOfWeek) {
22
+ value = value.add(1, "day");
23
+ }
24
+
25
+ return value.format("YYYY-MM-DD");
26
+ }