@izonnet-web-solution/react-native-date-picker-kit 0.0.0-stage → 1.0.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 (271) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/LICENSE +5 -0
  3. package/README.md +942 -2
  4. package/assets/screenshots/calendar-picker-blue.jpg +0 -0
  5. package/assets/screenshots/calendar-picker.jpg +0 -0
  6. package/assets/screenshots/datetime-picker-date.jpg +0 -0
  7. package/assets/screenshots/datetime-picker-time-blue.jpg +0 -0
  8. package/assets/screenshots/input-modal-picker.jpg +0 -0
  9. package/assets/screenshots/manual-entry-single.jpg +0 -0
  10. package/assets/screenshots/manual-entry-split.jpg +0 -0
  11. package/assets/screenshots/month-year-selector-modal.jpg +0 -0
  12. package/assets/screenshots/range-picker.jpg +0 -0
  13. package/assets/screenshots/time-12h-wheel.jpg +0 -0
  14. package/assets/screenshots/time-24h-military-blue.jpg +0 -0
  15. package/assets/screenshots/wheel-date-picker.jpg +0 -0
  16. package/lib/components/Calendar/Calendar.d.ts +35 -0
  17. package/lib/components/Calendar/Calendar.d.ts.map +1 -0
  18. package/lib/components/Calendar/Calendar.js +126 -0
  19. package/lib/components/Calendar/Calendar.js.map +1 -0
  20. package/lib/components/Calendar/CalendarGrid.d.ts +11 -0
  21. package/lib/components/Calendar/CalendarGrid.d.ts.map +1 -0
  22. package/lib/components/Calendar/CalendarGrid.js +22 -0
  23. package/lib/components/Calendar/CalendarGrid.js.map +1 -0
  24. package/lib/components/Calendar/CalendarHeader.d.ts +23 -0
  25. package/lib/components/Calendar/CalendarHeader.d.ts.map +1 -0
  26. package/lib/components/Calendar/CalendarHeader.js +62 -0
  27. package/lib/components/Calendar/CalendarHeader.js.map +1 -0
  28. package/lib/components/Calendar/DateCell.d.ts +11 -0
  29. package/lib/components/Calendar/DateCell.d.ts.map +1 -0
  30. package/lib/components/Calendar/DateCell.js +71 -0
  31. package/lib/components/Calendar/DateCell.js.map +1 -0
  32. package/lib/components/Calendar/MonthYearSelectorModal.d.ts +17 -0
  33. package/lib/components/Calendar/MonthYearSelectorModal.d.ts.map +1 -0
  34. package/lib/components/Calendar/MonthYearSelectorModal.js +253 -0
  35. package/lib/components/Calendar/MonthYearSelectorModal.js.map +1 -0
  36. package/lib/components/Calendar/WeekDays.d.ts +13 -0
  37. package/lib/components/Calendar/WeekDays.d.ts.map +1 -0
  38. package/lib/components/Calendar/WeekDays.js +34 -0
  39. package/lib/components/Calendar/WeekDays.js.map +1 -0
  40. package/lib/components/Calendar/index.d.ts +7 -0
  41. package/lib/components/Calendar/index.d.ts.map +1 -0
  42. package/lib/components/Calendar/index.js +23 -0
  43. package/lib/components/Calendar/index.js.map +1 -0
  44. package/lib/components/DatePicker.d.ts +4 -0
  45. package/lib/components/DatePicker.d.ts.map +1 -0
  46. package/lib/components/DatePicker.js +498 -0
  47. package/lib/components/DatePicker.js.map +1 -0
  48. package/lib/components/Input/CalendarPopup.d.ts +26 -0
  49. package/lib/components/Input/CalendarPopup.d.ts.map +1 -0
  50. package/lib/components/Input/CalendarPopup.js +60 -0
  51. package/lib/components/Input/CalendarPopup.js.map +1 -0
  52. package/lib/components/Input/DateInput.d.ts +29 -0
  53. package/lib/components/Input/DateInput.d.ts.map +1 -0
  54. package/lib/components/Input/DateInput.js +110 -0
  55. package/lib/components/Input/DateInput.js.map +1 -0
  56. package/lib/components/Input/index.d.ts +3 -0
  57. package/lib/components/Input/index.d.ts.map +1 -0
  58. package/lib/components/Input/index.js +19 -0
  59. package/lib/components/Input/index.js.map +1 -0
  60. package/lib/components/ManualDateInput/DateInputField.d.ts +19 -0
  61. package/lib/components/ManualDateInput/DateInputField.d.ts.map +1 -0
  62. package/lib/components/ManualDateInput/DateInputField.js +345 -0
  63. package/lib/components/ManualDateInput/DateInputField.js.map +1 -0
  64. package/lib/components/ManualDateInput/DateValidationMessage.d.ts +8 -0
  65. package/lib/components/ManualDateInput/DateValidationMessage.d.ts.map +1 -0
  66. package/lib/components/ManualDateInput/DateValidationMessage.js +45 -0
  67. package/lib/components/ManualDateInput/DateValidationMessage.js.map +1 -0
  68. package/lib/components/ManualDateInput/ManualDateInput.d.ts +19 -0
  69. package/lib/components/ManualDateInput/ManualDateInput.d.ts.map +1 -0
  70. package/lib/components/ManualDateInput/ManualDateInput.js +18 -0
  71. package/lib/components/ManualDateInput/ManualDateInput.js.map +1 -0
  72. package/lib/components/ManualDateInput/index.d.ts +4 -0
  73. package/lib/components/ManualDateInput/index.d.ts.map +1 -0
  74. package/lib/components/ManualDateInput/index.js +20 -0
  75. package/lib/components/ManualDateInput/index.js.map +1 -0
  76. package/lib/components/Range/RangeDateCell.d.ts +11 -0
  77. package/lib/components/Range/RangeDateCell.d.ts.map +1 -0
  78. package/lib/components/Range/RangeDateCell.js +107 -0
  79. package/lib/components/Range/RangeDateCell.js.map +1 -0
  80. package/lib/components/Range/RangePicker.d.ts +29 -0
  81. package/lib/components/Range/RangePicker.d.ts.map +1 -0
  82. package/lib/components/Range/RangePicker.js +261 -0
  83. package/lib/components/Range/RangePicker.js.map +1 -0
  84. package/lib/components/Range/index.d.ts +3 -0
  85. package/lib/components/Range/index.d.ts.map +1 -0
  86. package/lib/components/Range/index.js +19 -0
  87. package/lib/components/Range/index.js.map +1 -0
  88. package/lib/components/Time/ClockDial.d.ts +15 -0
  89. package/lib/components/Time/ClockDial.d.ts.map +1 -0
  90. package/lib/components/Time/ClockDial.js +347 -0
  91. package/lib/components/Time/ClockDial.js.map +1 -0
  92. package/lib/components/Time/DateTimePicker.d.ts +31 -0
  93. package/lib/components/Time/DateTimePicker.d.ts.map +1 -0
  94. package/lib/components/Time/DateTimePicker.js +197 -0
  95. package/lib/components/Time/DateTimePicker.js.map +1 -0
  96. package/lib/components/Time/TimePicker.d.ts +31 -0
  97. package/lib/components/Time/TimePicker.d.ts.map +1 -0
  98. package/lib/components/Time/TimePicker.js +550 -0
  99. package/lib/components/Time/TimePicker.js.map +1 -0
  100. package/lib/components/Time/WheelTimePicker.d.ts +27 -0
  101. package/lib/components/Time/WheelTimePicker.d.ts.map +1 -0
  102. package/lib/components/Time/WheelTimePicker.js +203 -0
  103. package/lib/components/Time/WheelTimePicker.js.map +1 -0
  104. package/lib/components/Time/index.d.ts +5 -0
  105. package/lib/components/Time/index.d.ts.map +1 -0
  106. package/lib/components/Time/index.js +21 -0
  107. package/lib/components/Time/index.js.map +1 -0
  108. package/lib/components/Wheel/WheelColumn.d.ts +17 -0
  109. package/lib/components/Wheel/WheelColumn.d.ts.map +1 -0
  110. package/lib/components/Wheel/WheelColumn.js +192 -0
  111. package/lib/components/Wheel/WheelColumn.js.map +1 -0
  112. package/lib/components/Wheel/WheelPicker.d.ts +26 -0
  113. package/lib/components/Wheel/WheelPicker.d.ts.map +1 -0
  114. package/lib/components/Wheel/WheelPicker.js +123 -0
  115. package/lib/components/Wheel/WheelPicker.js.map +1 -0
  116. package/lib/components/Wheel/index.d.ts +3 -0
  117. package/lib/components/Wheel/index.d.ts.map +1 -0
  118. package/lib/components/Wheel/index.js +19 -0
  119. package/lib/components/Wheel/index.js.map +1 -0
  120. package/lib/components/common/Button.d.ts +17 -0
  121. package/lib/components/common/Button.d.ts.map +1 -0
  122. package/lib/components/common/Button.js +77 -0
  123. package/lib/components/common/Button.js.map +1 -0
  124. package/lib/components/common/IconButton.d.ts +14 -0
  125. package/lib/components/common/IconButton.d.ts.map +1 -0
  126. package/lib/components/common/IconButton.js +150 -0
  127. package/lib/components/common/IconButton.js.map +1 -0
  128. package/lib/components/common/Modal.d.ts +13 -0
  129. package/lib/components/common/Modal.d.ts.map +1 -0
  130. package/lib/components/common/Modal.js +65 -0
  131. package/lib/components/common/Modal.js.map +1 -0
  132. package/lib/components/common/index.d.ts +4 -0
  133. package/lib/components/common/index.d.ts.map +1 -0
  134. package/lib/components/common/index.js +20 -0
  135. package/lib/components/common/index.js.map +1 -0
  136. package/lib/components/index.d.ts +9 -0
  137. package/lib/components/index.d.ts.map +1 -0
  138. package/lib/components/index.js +25 -0
  139. package/lib/components/index.js.map +1 -0
  140. package/lib/hooks/index.d.ts +4 -0
  141. package/lib/hooks/index.d.ts.map +1 -0
  142. package/lib/hooks/index.js +20 -0
  143. package/lib/hooks/index.js.map +1 -0
  144. package/lib/hooks/useCalendar.d.ts +34 -0
  145. package/lib/hooks/useCalendar.d.ts.map +1 -0
  146. package/lib/hooks/useCalendar.js +93 -0
  147. package/lib/hooks/useCalendar.js.map +1 -0
  148. package/lib/hooks/useDatePicker.d.ts +28 -0
  149. package/lib/hooks/useDatePicker.d.ts.map +1 -0
  150. package/lib/hooks/useDatePicker.js +150 -0
  151. package/lib/hooks/useDatePicker.js.map +1 -0
  152. package/lib/hooks/useDateRange.d.ts +23 -0
  153. package/lib/hooks/useDateRange.d.ts.map +1 -0
  154. package/lib/hooks/useDateRange.js +82 -0
  155. package/lib/hooks/useDateRange.js.map +1 -0
  156. package/lib/index.d.ts +7 -0
  157. package/lib/index.d.ts.map +1 -0
  158. package/lib/index.js +29 -0
  159. package/lib/index.js.map +1 -0
  160. package/lib/localization/en.d.ts +3 -0
  161. package/lib/localization/en.d.ts.map +1 -0
  162. package/lib/localization/en.js +80 -0
  163. package/lib/localization/en.js.map +1 -0
  164. package/lib/localization/gu.d.ts +3 -0
  165. package/lib/localization/gu.d.ts.map +1 -0
  166. package/lib/localization/gu.js +80 -0
  167. package/lib/localization/gu.js.map +1 -0
  168. package/lib/localization/hi.d.ts +3 -0
  169. package/lib/localization/hi.d.ts.map +1 -0
  170. package/lib/localization/hi.js +80 -0
  171. package/lib/localization/hi.js.map +1 -0
  172. package/lib/localization/index.d.ts +8 -0
  173. package/lib/localization/index.d.ts.map +1 -0
  174. package/lib/localization/index.js +32 -0
  175. package/lib/localization/index.js.map +1 -0
  176. package/lib/themes/dark.d.ts +3 -0
  177. package/lib/themes/dark.d.ts.map +1 -0
  178. package/lib/themes/dark.js +30 -0
  179. package/lib/themes/dark.js.map +1 -0
  180. package/lib/themes/index.d.ts +16 -0
  181. package/lib/themes/index.d.ts.map +1 -0
  182. package/lib/themes/index.js +56 -0
  183. package/lib/themes/index.js.map +1 -0
  184. package/lib/themes/light.d.ts +3 -0
  185. package/lib/themes/light.d.ts.map +1 -0
  186. package/lib/themes/light.js +30 -0
  187. package/lib/themes/light.js.map +1 -0
  188. package/lib/types/index.d.ts +344 -0
  189. package/lib/types/index.d.ts.map +1 -0
  190. package/lib/types/index.js +3 -0
  191. package/lib/types/index.js.map +1 -0
  192. package/lib/utils/calendarUtils.d.ts +27 -0
  193. package/lib/utils/calendarUtils.d.ts.map +1 -0
  194. package/lib/utils/calendarUtils.js +108 -0
  195. package/lib/utils/calendarUtils.js.map +1 -0
  196. package/lib/utils/dateFormatting.d.ts +29 -0
  197. package/lib/utils/dateFormatting.d.ts.map +1 -0
  198. package/lib/utils/dateFormatting.js +114 -0
  199. package/lib/utils/dateFormatting.js.map +1 -0
  200. package/lib/utils/dateParsing.d.ts +23 -0
  201. package/lib/utils/dateParsing.d.ts.map +1 -0
  202. package/lib/utils/dateParsing.js +289 -0
  203. package/lib/utils/dateParsing.js.map +1 -0
  204. package/lib/utils/dateUtils.d.ts +20 -0
  205. package/lib/utils/dateUtils.d.ts.map +1 -0
  206. package/lib/utils/dateUtils.js +115 -0
  207. package/lib/utils/dateUtils.js.map +1 -0
  208. package/lib/utils/dateValidation.d.ts +36 -0
  209. package/lib/utils/dateValidation.d.ts.map +1 -0
  210. package/lib/utils/dateValidation.js +196 -0
  211. package/lib/utils/dateValidation.js.map +1 -0
  212. package/lib/utils/index.d.ts +7 -0
  213. package/lib/utils/index.d.ts.map +1 -0
  214. package/lib/utils/index.js +23 -0
  215. package/lib/utils/index.js.map +1 -0
  216. package/lib/utils/timeUtils.d.ts +78 -0
  217. package/lib/utils/timeUtils.d.ts.map +1 -0
  218. package/lib/utils/timeUtils.js +335 -0
  219. package/lib/utils/timeUtils.js.map +1 -0
  220. package/package.json +92 -3
  221. package/src/components/Calendar/Calendar.tsx +314 -0
  222. package/src/components/Calendar/CalendarGrid.tsx +47 -0
  223. package/src/components/Calendar/CalendarHeader.tsx +176 -0
  224. package/src/components/Calendar/DateCell.tsx +118 -0
  225. package/src/components/Calendar/MonthYearSelectorModal.tsx +407 -0
  226. package/src/components/Calendar/WeekDays.tsx +49 -0
  227. package/src/components/Calendar/index.ts +6 -0
  228. package/src/components/DatePicker.tsx +834 -0
  229. package/src/components/Input/CalendarPopup.tsx +168 -0
  230. package/src/components/Input/DateInput.tsx +259 -0
  231. package/src/components/Input/index.ts +2 -0
  232. package/src/components/ManualDateInput/DateInputField.tsx +493 -0
  233. package/src/components/ManualDateInput/DateValidationMessage.tsx +65 -0
  234. package/src/components/ManualDateInput/ManualDateInput.tsx +66 -0
  235. package/src/components/ManualDateInput/index.ts +3 -0
  236. package/src/components/Range/RangeDateCell.tsx +174 -0
  237. package/src/components/Range/RangePicker.tsx +484 -0
  238. package/src/components/Range/index.ts +2 -0
  239. package/src/components/Time/ClockDial.tsx +450 -0
  240. package/src/components/Time/DateTimePicker.tsx +395 -0
  241. package/src/components/Time/TimePicker.tsx +899 -0
  242. package/src/components/Time/WheelTimePicker.tsx +356 -0
  243. package/src/components/Time/index.ts +4 -0
  244. package/src/components/Wheel/WheelColumn.tsx +300 -0
  245. package/src/components/Wheel/WheelPicker.tsx +265 -0
  246. package/src/components/Wheel/index.ts +2 -0
  247. package/src/components/common/Button.tsx +125 -0
  248. package/src/components/common/IconButton.tsx +237 -0
  249. package/src/components/common/Modal.tsx +137 -0
  250. package/src/components/common/index.ts +3 -0
  251. package/src/components/index.ts +8 -0
  252. package/src/hooks/index.ts +3 -0
  253. package/src/hooks/useCalendar.ts +153 -0
  254. package/src/hooks/useDatePicker.ts +216 -0
  255. package/src/hooks/useDateRange.ts +135 -0
  256. package/src/index.ts +17 -0
  257. package/src/localization/en.ts +78 -0
  258. package/src/localization/gu.ts +78 -0
  259. package/src/localization/hi.ts +78 -0
  260. package/src/localization/index.ts +31 -0
  261. package/src/themes/dark.ts +28 -0
  262. package/src/themes/index.ts +73 -0
  263. package/src/themes/light.ts +28 -0
  264. package/src/types/index.ts +452 -0
  265. package/src/utils/calendarUtils.ts +152 -0
  266. package/src/utils/dateFormatting.ts +125 -0
  267. package/src/utils/dateParsing.ts +335 -0
  268. package/src/utils/dateUtils.ts +117 -0
  269. package/src/utils/dateValidation.ts +276 -0
  270. package/src/utils/index.ts +6 -0
  271. package/src/utils/timeUtils.ts +416 -0
@@ -0,0 +1,78 @@
1
+ import type { DatePickerLocale } from '../types';
2
+
3
+ export const enLocale: DatePickerLocale = {
4
+ code: 'en',
5
+ months: [
6
+ 'January',
7
+ 'February',
8
+ 'March',
9
+ 'April',
10
+ 'May',
11
+ 'June',
12
+ 'July',
13
+ 'August',
14
+ 'September',
15
+ 'October',
16
+ 'November',
17
+ 'December',
18
+ ],
19
+ monthsShort: [
20
+ 'Jan',
21
+ 'Feb',
22
+ 'Mar',
23
+ 'Apr',
24
+ 'May',
25
+ 'Jun',
26
+ 'Jul',
27
+ 'Aug',
28
+ 'Sep',
29
+ 'Oct',
30
+ 'Nov',
31
+ 'Dec',
32
+ ],
33
+ weekdays: [
34
+ 'Sunday',
35
+ 'Monday',
36
+ 'Tuesday',
37
+ 'Wednesday',
38
+ 'Thursday',
39
+ 'Friday',
40
+ 'Saturday',
41
+ ],
42
+ weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
43
+ weekdaysMin: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
44
+ today: 'Today',
45
+ clear: 'Clear',
46
+ cancel: 'Cancel',
47
+ confirm: 'Confirm',
48
+ apply: 'Apply',
49
+ selectDate: 'Select Date',
50
+ startDate: 'Start Date',
51
+ endDate: 'End Date',
52
+ placeholder: 'Select a date',
53
+ dayLabel: 'Day',
54
+ monthLabel: 'Month',
55
+ yearLabel: 'Year',
56
+ switchManual: 'Enter date manually',
57
+ switchCalendar: 'Pick from calendar',
58
+ am: 'AM',
59
+ pm: 'PM',
60
+ hourLabel: 'Hour',
61
+ minuteLabel: 'Minute',
62
+ secondLabel: 'Second',
63
+ selectTime: 'Select Time',
64
+ timeLabel: 'Time',
65
+ errors: {
66
+ invalidDate: 'Invalid date. Please verify your input.',
67
+ outOfRange: 'Date is outside the allowed boundaries.',
68
+ minDate: 'Date cannot be earlier than {min}.',
69
+ maxDate: 'Date cannot be later than {max}.',
70
+ disabledDate: 'This date is not available for selection.',
71
+ disabledWeekday: 'This day of the week is disabled.',
72
+ startDateAfterEndDate: 'Start date cannot be after end date.',
73
+ maxRangeExceeded: 'Selected range exceeds maximum allowed limit of {days} days.',
74
+ invalidTime: 'Invalid time. Please verify hours and minutes.',
75
+ minTime: 'Time cannot be earlier than {min}.',
76
+ maxTime: 'Time cannot be later than {max}.',
77
+ },
78
+ };
@@ -0,0 +1,78 @@
1
+ import type { DatePickerLocale } from '../types';
2
+
3
+ export const guLocale: DatePickerLocale = {
4
+ code: 'gu',
5
+ months: [
6
+ 'જાન્યુઆરી',
7
+ 'ફેબ્રુઆરી',
8
+ 'માર્ચ',
9
+ 'એપ્રિલ',
10
+ 'મે',
11
+ 'જૂન',
12
+ 'જુલાઈ',
13
+ 'ઑગસ્ટ',
14
+ 'સપ્ટેમ્બર',
15
+ 'ઑક્ટોબર',
16
+ 'નવેમ્બર',
17
+ 'ડિસેમ્બર',
18
+ ],
19
+ monthsShort: [
20
+ 'જાન્યુ',
21
+ 'ફેબ્રુ',
22
+ 'માર્ચ',
23
+ 'એપ્રિલ',
24
+ 'મે',
25
+ 'જૂન',
26
+ 'જુલાઈ',
27
+ 'ઑગ',
28
+ 'સપ્ટે',
29
+ 'ઑક્ટો',
30
+ 'નવે',
31
+ 'ડિસે',
32
+ ],
33
+ weekdays: [
34
+ 'રવિવાર',
35
+ 'સોમવાર',
36
+ 'મંગળવાર',
37
+ 'બુધવાર',
38
+ 'ગુરુવાર',
39
+ 'શુક્રવાર',
40
+ 'શનિવાર',
41
+ ],
42
+ weekdaysShort: ['રવિ', 'સોમ', 'મંગળ', 'બુધ', 'ગુરુ', 'શુક્ર', 'શનિ'],
43
+ weekdaysMin: ['ર', 'સો', 'મં', 'બુ', 'ગુ', 'શુ', 'શ'],
44
+ today: 'આજે',
45
+ clear: 'સાફ કરો',
46
+ cancel: 'રદ કરો',
47
+ confirm: 'પુષ્ટિ કરો',
48
+ apply: 'લાગુ કરો',
49
+ selectDate: 'તારીખ પસંદ કરો',
50
+ startDate: 'શરૂઆતની તારીખ',
51
+ endDate: 'અંતિમ તારીખ',
52
+ placeholder: 'તારીખ પસંદ કરો',
53
+ dayLabel: 'દિવસ',
54
+ monthLabel: 'મહિનો',
55
+ yearLabel: 'વર્ષ',
56
+ switchManual: 'મેન્યુઅલી દાખલ કરો',
57
+ switchCalendar: 'કેલેન્ડરમાંથી પસંદ કરો',
58
+ am: 'AM',
59
+ pm: 'PM',
60
+ hourLabel: 'કલાક',
61
+ minuteLabel: 'મિનિટ',
62
+ secondLabel: 'સેકન્ડ',
63
+ selectTime: 'સમય પસંદ કરો',
64
+ timeLabel: 'સમય',
65
+ errors: {
66
+ invalidDate: 'અમાન્ય તારીખ. કૃપા કરીને સાચી વિગતો દાખલ કરો.',
67
+ outOfRange: 'તારીખ માન્ય મર્યાદા બહાર છે.',
68
+ minDate: 'તારીખ {min} કરતાં પહેલાંની ન હોઈ શકે.',
69
+ maxDate: 'તારીખ {max} પછીની ન હોઈ શકે.',
70
+ disabledDate: 'આ તારીખ ઉપલબ્ધ નથી.',
71
+ disabledWeekday: 'અઠવાડિયાનો આ દિવસ અક્ષમ છે.',
72
+ startDateAfterEndDate: 'શરૂઆતની તારીખ અંતિમ તારીખ પછીની ન હોઈ શકે.',
73
+ maxRangeExceeded: 'પસંદ કરેલ તારીખો મહત્તમ માન્ય દિવસો ({days}) કરતાં વધુ છે.',
74
+ invalidTime: 'અમાન્ય સમય. કૃપા કરીને કલાક અને મિનિટ તપાસો.',
75
+ minTime: 'સમય {min} કરતાં પહેલાંનો ન હોઈ શકે.',
76
+ maxTime: 'સમય {max} પછીનો ન હોઈ શકે.',
77
+ },
78
+ };
@@ -0,0 +1,78 @@
1
+ import type { DatePickerLocale } from '../types';
2
+
3
+ export const hiLocale: DatePickerLocale = {
4
+ code: 'hi',
5
+ months: [
6
+ 'जनवरी',
7
+ 'फ़रवरी',
8
+ 'मार्च',
9
+ 'अप्रैल',
10
+ 'मई',
11
+ 'जून',
12
+ 'जुलाई',
13
+ 'अगस्त',
14
+ 'सितंबर',
15
+ 'अक्टूबर',
16
+ 'नवंबर',
17
+ 'दिसंबर',
18
+ ],
19
+ monthsShort: [
20
+ 'जन',
21
+ 'फ़र',
22
+ 'मार्च',
23
+ 'अप्रै',
24
+ 'मई',
25
+ 'जून',
26
+ 'जुल',
27
+ 'अग',
28
+ 'सित',
29
+ 'अक्तू',
30
+ 'नव',
31
+ 'दिस',
32
+ ],
33
+ weekdays: [
34
+ 'रविवार',
35
+ 'सोमवार',
36
+ 'मंगलवार',
37
+ 'बुधवार',
38
+ 'गुरुवार',
39
+ 'शुक्रवार',
40
+ 'शनिवार',
41
+ ],
42
+ weekdaysShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
43
+ weekdaysMin: ['र', 'सो', 'मं', 'बु', 'गु', 'शु', 'श'],
44
+ today: 'आज',
45
+ clear: 'साफ़ करें',
46
+ cancel: 'रद्द करें',
47
+ confirm: 'पुष्टि करें',
48
+ apply: 'लागू करें',
49
+ selectDate: 'तारीख चुनें',
50
+ startDate: 'प्रारंभ तिथि',
51
+ endDate: 'समाप्ति तिथि',
52
+ placeholder: 'तारीख का चयन करें',
53
+ dayLabel: 'दिन',
54
+ monthLabel: 'महीना',
55
+ yearLabel: 'वर्ष',
56
+ switchManual: 'मैन्युअल रूप से दर्ज करें',
57
+ switchCalendar: 'कैलेंडर से चुनें',
58
+ am: 'AM',
59
+ pm: 'PM',
60
+ hourLabel: 'घंटा',
61
+ minuteLabel: 'मिनट',
62
+ secondLabel: 'सेकंड',
63
+ selectTime: 'समय चुनें',
64
+ timeLabel: 'समय',
65
+ errors: {
66
+ invalidDate: 'अमान्य तारीख। कृपया सही मान दर्ज करें।',
67
+ outOfRange: 'तारीख अनुमत सीमा से बाहर है।',
68
+ minDate: 'तारीख {min} से पहले नहीं हो सकती।',
69
+ maxDate: 'तारीख {max} के बाद नहीं हो सकती।',
70
+ disabledDate: 'यह तारीख अनुपलब्ध है।',
71
+ disabledWeekday: 'सप्ताह का यह दिन अक्षम है।',
72
+ startDateAfterEndDate: 'प्रारंभ तिथि समाप्ति तिथि के बाद नहीं हो सकती।',
73
+ maxRangeExceeded: 'चयनित सीमा अधिकतम अनुमत दिनों ({days}) से अधिक है।',
74
+ invalidTime: 'अमान्य समय। कृपया घंटे और मिनट जांचें।',
75
+ minTime: 'समय {min} से पहले नहीं हो सकता।',
76
+ maxTime: 'समय {max} के बाद नहीं हो सकता।',
77
+ },
78
+ };
@@ -0,0 +1,31 @@
1
+ import { enLocale } from './en';
2
+ import { hiLocale } from './hi';
3
+ import { guLocale } from './gu';
4
+ import type { DatePickerLocale, SupportedLocale } from '../types';
5
+
6
+ export const locales: Record<SupportedLocale, DatePickerLocale> = {
7
+ en: enLocale,
8
+ hi: hiLocale,
9
+ gu: guLocale,
10
+ };
11
+
12
+ export const getLocale = (
13
+ locale?: SupportedLocale | DatePickerLocale
14
+ ): DatePickerLocale => {
15
+ if (!locale) {
16
+ return enLocale;
17
+ }
18
+ if (typeof locale === 'string') {
19
+ return locales[locale as SupportedLocale] || enLocale;
20
+ }
21
+ return {
22
+ ...enLocale,
23
+ ...locale,
24
+ errors: {
25
+ ...enLocale.errors,
26
+ ...(locale.errors || {}),
27
+ },
28
+ };
29
+ };
30
+
31
+ export { enLocale, hiLocale, guLocale };
@@ -0,0 +1,28 @@
1
+ import type { DatePickerTheme } from '../types';
2
+
3
+ export const darkTheme: DatePickerTheme = {
4
+ backgroundColor: '#0F172A',
5
+ surfaceColor: '#1E293B',
6
+ cardColor: '#1E293B',
7
+ primaryColor: '#3B82F6',
8
+ primaryTextColor: '#FFFFFF',
9
+ textColor: '#F8FAFC',
10
+ secondaryTextColor: '#94A3B8',
11
+ disabledTextColor: '#475569',
12
+ borderColor: '#334155',
13
+ selectedDayBackgroundColor: '#3B82F6',
14
+ selectedDayTextColor: '#FFFFFF',
15
+ todayBorderColor: '#3B82F6',
16
+ todayTextColor: '#60A5FA',
17
+ rangeBetweenBackgroundColor: '#1E3A8A',
18
+ rangeBetweenTextColor: '#BFDBFE',
19
+ errorColor: '#F87171',
20
+ errorBackgroundColor: '#450A0A',
21
+ borderRadius: 12,
22
+ fontSize: {
23
+ small: 12,
24
+ medium: 14,
25
+ large: 16,
26
+ title: 18,
27
+ },
28
+ };
@@ -0,0 +1,73 @@
1
+ import { lightTheme } from './light';
2
+ import { darkTheme } from './dark';
3
+ import type { DatePickerTheme } from '../types';
4
+
5
+ export const themes: Record<'light' | 'dark', DatePickerTheme> = {
6
+ light: lightTheme,
7
+ dark: darkTheme,
8
+ };
9
+
10
+ export interface ThemeOverrides {
11
+ accentColor?: string;
12
+ primaryColor?: string;
13
+ textColor?: string;
14
+ backgroundColor?: string;
15
+ cardColor?: string;
16
+ modalBackgroundColor?: string;
17
+ borderRadius?: number;
18
+ }
19
+
20
+ export const resolveTheme = (
21
+ themeInput?: 'light' | 'dark' | Partial<DatePickerTheme>,
22
+ overrides?: ThemeOverrides
23
+ ): DatePickerTheme => {
24
+ let baseTheme = lightTheme;
25
+
26
+ if (themeInput === 'dark') {
27
+ baseTheme = darkTheme;
28
+ } else if (themeInput === 'light') {
29
+ baseTheme = lightTheme;
30
+ } else if (themeInput && typeof themeInput === 'object') {
31
+ baseTheme = {
32
+ ...lightTheme,
33
+ ...themeInput,
34
+ fontSize: {
35
+ ...lightTheme.fontSize,
36
+ ...(themeInput.fontSize || {}),
37
+ },
38
+ };
39
+ }
40
+
41
+ const resolved: DatePickerTheme = { ...baseTheme };
42
+
43
+ const accent = overrides?.accentColor || overrides?.primaryColor;
44
+ if (accent) {
45
+ resolved.primaryColor = accent;
46
+ resolved.selectedDayBackgroundColor = accent;
47
+ resolved.todayBorderColor = accent;
48
+ resolved.todayTextColor = accent;
49
+ resolved.rangeBetweenBackgroundColor = `${accent}20`;
50
+ resolved.rangeBetweenTextColor = accent;
51
+ }
52
+
53
+ if (overrides?.textColor) {
54
+ resolved.textColor = overrides.textColor;
55
+ }
56
+
57
+ if (overrides?.backgroundColor) {
58
+ resolved.backgroundColor = overrides.backgroundColor;
59
+ resolved.cardColor = overrides.backgroundColor;
60
+ }
61
+
62
+ if (overrides?.cardColor || overrides?.modalBackgroundColor) {
63
+ resolved.cardColor = (overrides.cardColor || overrides.modalBackgroundColor)!;
64
+ }
65
+
66
+ if (overrides?.borderRadius !== undefined) {
67
+ resolved.borderRadius = overrides.borderRadius;
68
+ }
69
+
70
+ return resolved;
71
+ };
72
+
73
+ export { lightTheme, darkTheme };
@@ -0,0 +1,28 @@
1
+ import type { DatePickerTheme } from '../types';
2
+
3
+ export const lightTheme: DatePickerTheme = {
4
+ backgroundColor: '#FFFFFF',
5
+ surfaceColor: '#F8FAFC',
6
+ cardColor: '#FFFFFF',
7
+ primaryColor: '#2563EB',
8
+ primaryTextColor: '#FFFFFF',
9
+ textColor: '#0F172A',
10
+ secondaryTextColor: '#64748B',
11
+ disabledTextColor: '#CBD5E1',
12
+ borderColor: '#E2E8F0',
13
+ selectedDayBackgroundColor: '#2563EB',
14
+ selectedDayTextColor: '#FFFFFF',
15
+ todayBorderColor: '#2563EB',
16
+ todayTextColor: '#2563EB',
17
+ rangeBetweenBackgroundColor: '#EFF6FF',
18
+ rangeBetweenTextColor: '#1D4ED8',
19
+ errorColor: '#EF4444',
20
+ errorBackgroundColor: '#FEF2F2',
21
+ borderRadius: 12,
22
+ fontSize: {
23
+ small: 12,
24
+ medium: 14,
25
+ large: 16,
26
+ title: 18,
27
+ },
28
+ };