react-native-bikram-sambat 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 (367) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +340 -0
  3. package/lib/commonjs/accessibility/index.js +25 -0
  4. package/lib/commonjs/accessibility/index.js.map +1 -0
  5. package/lib/commonjs/accessibility/labels.js +20 -0
  6. package/lib/commonjs/accessibility/labels.js.map +1 -0
  7. package/lib/commonjs/calendar/calendar-types.js +6 -0
  8. package/lib/commonjs/calendar/calendar-types.js.map +1 -0
  9. package/lib/commonjs/calendar/get-calendar-month-grid.js +114 -0
  10. package/lib/commonjs/calendar/get-calendar-month-grid.js.map +1 -0
  11. package/lib/commonjs/calendar/index.js +13 -0
  12. package/lib/commonjs/calendar/index.js.map +1 -0
  13. package/lib/commonjs/components/NepaliCalendar/CalendarDay.js +137 -0
  14. package/lib/commonjs/components/NepaliCalendar/CalendarDay.js.map +1 -0
  15. package/lib/commonjs/components/NepaliCalendar/CalendarGrid.js +116 -0
  16. package/lib/commonjs/components/NepaliCalendar/CalendarGrid.js.map +1 -0
  17. package/lib/commonjs/components/NepaliCalendar/CalendarHeader.js +114 -0
  18. package/lib/commonjs/components/NepaliCalendar/CalendarHeader.js.map +1 -0
  19. package/lib/commonjs/components/NepaliCalendar/CalendarWeekdays.js +44 -0
  20. package/lib/commonjs/components/NepaliCalendar/CalendarWeekdays.js.map +1 -0
  21. package/lib/commonjs/components/NepaliCalendar/NepaliCalendar.js +288 -0
  22. package/lib/commonjs/components/NepaliCalendar/NepaliCalendar.js.map +1 -0
  23. package/lib/commonjs/components/NepaliCalendar/index.js +13 -0
  24. package/lib/commonjs/components/NepaliCalendar/index.js.map +1 -0
  25. package/lib/commonjs/components/NepaliCalendar/types.js +6 -0
  26. package/lib/commonjs/components/NepaliCalendar/types.js.map +1 -0
  27. package/lib/commonjs/components/NepaliDatePicker/DatePickerModal.js +185 -0
  28. package/lib/commonjs/components/NepaliDatePicker/DatePickerModal.js.map +1 -0
  29. package/lib/commonjs/components/NepaliDatePicker/NepaliDatePicker.js +148 -0
  30. package/lib/commonjs/components/NepaliDatePicker/NepaliDatePicker.js.map +1 -0
  31. package/lib/commonjs/components/NepaliDatePicker/index.js +20 -0
  32. package/lib/commonjs/components/NepaliDatePicker/index.js.map +1 -0
  33. package/lib/commonjs/components/NepaliDatePicker/types.js +6 -0
  34. package/lib/commonjs/components/NepaliDatePicker/types.js.map +1 -0
  35. package/lib/commonjs/components/NepaliRangePicker/NepaliRangePicker.js +187 -0
  36. package/lib/commonjs/components/NepaliRangePicker/NepaliRangePicker.js.map +1 -0
  37. package/lib/commonjs/components/NepaliRangePicker/RangePickerModal.js +275 -0
  38. package/lib/commonjs/components/NepaliRangePicker/RangePickerModal.js.map +1 -0
  39. package/lib/commonjs/components/NepaliRangePicker/index.js +57 -0
  40. package/lib/commonjs/components/NepaliRangePicker/index.js.map +1 -0
  41. package/lib/commonjs/components/NepaliRangePicker/range-utils.js +70 -0
  42. package/lib/commonjs/components/NepaliRangePicker/range-utils.js.map +1 -0
  43. package/lib/commonjs/components/NepaliRangePicker/types.js +6 -0
  44. package/lib/commonjs/components/NepaliRangePicker/types.js.map +1 -0
  45. package/lib/commonjs/core/arithmetic.js +36 -0
  46. package/lib/commonjs/core/arithmetic.js.map +1 -0
  47. package/lib/commonjs/core/bsData.js +89 -0
  48. package/lib/commonjs/core/bsData.js.map +1 -0
  49. package/lib/commonjs/core/conversion.js +53 -0
  50. package/lib/commonjs/core/conversion.js.map +1 -0
  51. package/lib/commonjs/core/dateKey.js +31 -0
  52. package/lib/commonjs/core/dateKey.js.map +1 -0
  53. package/lib/commonjs/core/epochDay.js +47 -0
  54. package/lib/commonjs/core/epochDay.js.map +1 -0
  55. package/lib/commonjs/core/format/format.js +86 -0
  56. package/lib/commonjs/core/format/format.js.map +1 -0
  57. package/lib/commonjs/core/format/index.js +20 -0
  58. package/lib/commonjs/core/format/index.js.map +1 -0
  59. package/lib/commonjs/core/format/parse.js +41 -0
  60. package/lib/commonjs/core/format/parse.js.map +1 -0
  61. package/lib/commonjs/core/format/tokens.js +9 -0
  62. package/lib/commonjs/core/format/tokens.js.map +1 -0
  63. package/lib/commonjs/core/index.js +116 -0
  64. package/lib/commonjs/core/index.js.map +1 -0
  65. package/lib/commonjs/core/locale/en.js +15 -0
  66. package/lib/commonjs/core/locale/en.js.map +1 -0
  67. package/lib/commonjs/core/locale/index.js +20 -0
  68. package/lib/commonjs/core/locale/index.js.map +1 -0
  69. package/lib/commonjs/core/locale/ne.js +15 -0
  70. package/lib/commonjs/core/locale/ne.js.map +1 -0
  71. package/lib/commonjs/core/locale/types.js +2 -0
  72. package/lib/commonjs/core/locale/types.js.map +1 -0
  73. package/lib/commonjs/core/numerals/index.js +19 -0
  74. package/lib/commonjs/core/numerals/index.js.map +1 -0
  75. package/lib/commonjs/core/numerals/nepali-numerals.js +28 -0
  76. package/lib/commonjs/core/numerals/nepali-numerals.js.map +1 -0
  77. package/lib/commonjs/core/types.js +2 -0
  78. package/lib/commonjs/core/types.js.map +1 -0
  79. package/lib/commonjs/core/validation.js +125 -0
  80. package/lib/commonjs/core/validation.js.map +1 -0
  81. package/lib/commonjs/core/validation.test.js +248 -0
  82. package/lib/commonjs/core/validation.test.js.map +1 -0
  83. package/lib/commonjs/exports.test.js +133 -0
  84. package/lib/commonjs/exports.test.js.map +1 -0
  85. package/lib/commonjs/index.js +94 -0
  86. package/lib/commonjs/index.js.map +1 -0
  87. package/lib/commonjs/package.json +1 -0
  88. package/lib/commonjs/phase2.test.js +446 -0
  89. package/lib/commonjs/phase2.test.js.map +1 -0
  90. package/lib/commonjs/phase3.test.js +91 -0
  91. package/lib/commonjs/phase3.test.js.map +1 -0
  92. package/lib/commonjs/phase4.test.js +89 -0
  93. package/lib/commonjs/phase4.test.js.map +1 -0
  94. package/lib/commonjs/phase5.test.js +246 -0
  95. package/lib/commonjs/phase5.test.js.map +1 -0
  96. package/lib/commonjs/phase7.test.js +284 -0
  97. package/lib/commonjs/phase7.test.js.map +1 -0
  98. package/lib/commonjs/range-helpers.test.js +182 -0
  99. package/lib/commonjs/range-helpers.test.js.map +1 -0
  100. package/lib/commonjs/theme/create-theme.js +37 -0
  101. package/lib/commonjs/theme/create-theme.js.map +1 -0
  102. package/lib/commonjs/theme/default-theme.js +99 -0
  103. package/lib/commonjs/theme/default-theme.js.map +1 -0
  104. package/lib/commonjs/theme/index.js +26 -0
  105. package/lib/commonjs/theme/index.js.map +1 -0
  106. package/lib/commonjs/theme/types.js +6 -0
  107. package/lib/commonjs/theme/types.js.map +1 -0
  108. package/lib/commonjs/utils/date-helpers.js +106 -0
  109. package/lib/commonjs/utils/date-helpers.js.map +1 -0
  110. package/lib/commonjs/utils/index.js +49 -0
  111. package/lib/commonjs/utils/index.js.map +1 -0
  112. package/lib/module/accessibility/index.js +4 -0
  113. package/lib/module/accessibility/index.js.map +1 -0
  114. package/lib/module/accessibility/labels.js +15 -0
  115. package/lib/module/accessibility/labels.js.map +1 -0
  116. package/lib/module/calendar/calendar-types.js +4 -0
  117. package/lib/module/calendar/calendar-types.js.map +1 -0
  118. package/lib/module/calendar/get-calendar-month-grid.js +111 -0
  119. package/lib/module/calendar/get-calendar-month-grid.js.map +1 -0
  120. package/lib/module/calendar/index.js +4 -0
  121. package/lib/module/calendar/index.js.map +1 -0
  122. package/lib/module/components/NepaliCalendar/CalendarDay.js +132 -0
  123. package/lib/module/components/NepaliCalendar/CalendarDay.js.map +1 -0
  124. package/lib/module/components/NepaliCalendar/CalendarGrid.js +111 -0
  125. package/lib/module/components/NepaliCalendar/CalendarGrid.js.map +1 -0
  126. package/lib/module/components/NepaliCalendar/CalendarHeader.js +109 -0
  127. package/lib/module/components/NepaliCalendar/CalendarHeader.js.map +1 -0
  128. package/lib/module/components/NepaliCalendar/CalendarWeekdays.js +39 -0
  129. package/lib/module/components/NepaliCalendar/CalendarWeekdays.js.map +1 -0
  130. package/lib/module/components/NepaliCalendar/NepaliCalendar.js +283 -0
  131. package/lib/module/components/NepaliCalendar/NepaliCalendar.js.map +1 -0
  132. package/lib/module/components/NepaliCalendar/index.js +4 -0
  133. package/lib/module/components/NepaliCalendar/index.js.map +1 -0
  134. package/lib/module/components/NepaliCalendar/types.js +4 -0
  135. package/lib/module/components/NepaliCalendar/types.js.map +1 -0
  136. package/lib/module/components/NepaliDatePicker/DatePickerModal.js +180 -0
  137. package/lib/module/components/NepaliDatePicker/DatePickerModal.js.map +1 -0
  138. package/lib/module/components/NepaliDatePicker/NepaliDatePicker.js +143 -0
  139. package/lib/module/components/NepaliDatePicker/NepaliDatePicker.js.map +1 -0
  140. package/lib/module/components/NepaliDatePicker/index.js +5 -0
  141. package/lib/module/components/NepaliDatePicker/index.js.map +1 -0
  142. package/lib/module/components/NepaliDatePicker/types.js +4 -0
  143. package/lib/module/components/NepaliDatePicker/types.js.map +1 -0
  144. package/lib/module/components/NepaliRangePicker/NepaliRangePicker.js +182 -0
  145. package/lib/module/components/NepaliRangePicker/NepaliRangePicker.js.map +1 -0
  146. package/lib/module/components/NepaliRangePicker/RangePickerModal.js +270 -0
  147. package/lib/module/components/NepaliRangePicker/RangePickerModal.js.map +1 -0
  148. package/lib/module/components/NepaliRangePicker/index.js +6 -0
  149. package/lib/module/components/NepaliRangePicker/index.js.map +1 -0
  150. package/lib/module/components/NepaliRangePicker/range-utils.js +61 -0
  151. package/lib/module/components/NepaliRangePicker/range-utils.js.map +1 -0
  152. package/lib/module/components/NepaliRangePicker/types.js +4 -0
  153. package/lib/module/components/NepaliRangePicker/types.js.map +1 -0
  154. package/lib/module/core/arithmetic.js +29 -0
  155. package/lib/module/core/arithmetic.js.map +1 -0
  156. package/lib/module/core/bsData.js +82 -0
  157. package/lib/module/core/bsData.js.map +1 -0
  158. package/lib/module/core/conversion.js +48 -0
  159. package/lib/module/core/conversion.js.map +1 -0
  160. package/lib/module/core/dateKey.js +26 -0
  161. package/lib/module/core/dateKey.js.map +1 -0
  162. package/lib/module/core/epochDay.js +39 -0
  163. package/lib/module/core/epochDay.js.map +1 -0
  164. package/lib/module/core/format/format.js +82 -0
  165. package/lib/module/core/format/format.js.map +1 -0
  166. package/lib/module/core/format/index.js +5 -0
  167. package/lib/module/core/format/index.js.map +1 -0
  168. package/lib/module/core/format/parse.js +37 -0
  169. package/lib/module/core/format/parse.js.map +1 -0
  170. package/lib/module/core/format/tokens.js +5 -0
  171. package/lib/module/core/format/tokens.js.map +1 -0
  172. package/lib/module/core/index.js +13 -0
  173. package/lib/module/core/index.js.map +1 -0
  174. package/lib/module/core/locale/en.js +11 -0
  175. package/lib/module/core/locale/en.js.map +1 -0
  176. package/lib/module/core/locale/index.js +5 -0
  177. package/lib/module/core/locale/index.js.map +1 -0
  178. package/lib/module/core/locale/ne.js +11 -0
  179. package/lib/module/core/locale/ne.js.map +1 -0
  180. package/lib/module/core/locale/types.js +2 -0
  181. package/lib/module/core/locale/types.js.map +1 -0
  182. package/lib/module/core/numerals/index.js +4 -0
  183. package/lib/module/core/numerals/index.js.map +1 -0
  184. package/lib/module/core/numerals/nepali-numerals.js +23 -0
  185. package/lib/module/core/numerals/nepali-numerals.js.map +1 -0
  186. package/lib/module/core/types.js +2 -0
  187. package/lib/module/core/types.js.map +1 -0
  188. package/lib/module/core/validation.js +115 -0
  189. package/lib/module/core/validation.js.map +1 -0
  190. package/lib/module/core/validation.test.js +248 -0
  191. package/lib/module/core/validation.test.js.map +1 -0
  192. package/lib/module/exports.test.js +133 -0
  193. package/lib/module/exports.test.js.map +1 -0
  194. package/lib/module/index.js +11 -0
  195. package/lib/module/index.js.map +1 -0
  196. package/lib/module/package.json +1 -0
  197. package/lib/module/phase2.test.js +446 -0
  198. package/lib/module/phase2.test.js.map +1 -0
  199. package/lib/module/phase3.test.js +91 -0
  200. package/lib/module/phase3.test.js.map +1 -0
  201. package/lib/module/phase4.test.js +89 -0
  202. package/lib/module/phase4.test.js.map +1 -0
  203. package/lib/module/phase5.test.js +246 -0
  204. package/lib/module/phase5.test.js.map +1 -0
  205. package/lib/module/phase7.test.js +284 -0
  206. package/lib/module/phase7.test.js.map +1 -0
  207. package/lib/module/range-helpers.test.js +182 -0
  208. package/lib/module/range-helpers.test.js.map +1 -0
  209. package/lib/module/theme/create-theme.js +33 -0
  210. package/lib/module/theme/create-theme.js.map +1 -0
  211. package/lib/module/theme/default-theme.js +95 -0
  212. package/lib/module/theme/default-theme.js.map +1 -0
  213. package/lib/module/theme/index.js +5 -0
  214. package/lib/module/theme/index.js.map +1 -0
  215. package/lib/module/theme/types.js +4 -0
  216. package/lib/module/theme/types.js.map +1 -0
  217. package/lib/module/utils/date-helpers.js +96 -0
  218. package/lib/module/utils/date-helpers.js.map +1 -0
  219. package/lib/module/utils/index.js +4 -0
  220. package/lib/module/utils/index.js.map +1 -0
  221. package/lib/typescript/src/accessibility/index.d.ts +2 -0
  222. package/lib/typescript/src/accessibility/index.d.ts.map +1 -0
  223. package/lib/typescript/src/accessibility/labels.d.ts +6 -0
  224. package/lib/typescript/src/accessibility/labels.d.ts.map +1 -0
  225. package/lib/typescript/src/calendar/calendar-types.d.ts +23 -0
  226. package/lib/typescript/src/calendar/calendar-types.d.ts.map +1 -0
  227. package/lib/typescript/src/calendar/get-calendar-month-grid.d.ts +3 -0
  228. package/lib/typescript/src/calendar/get-calendar-month-grid.d.ts.map +1 -0
  229. package/lib/typescript/src/calendar/index.d.ts +3 -0
  230. package/lib/typescript/src/calendar/index.d.ts.map +1 -0
  231. package/lib/typescript/src/components/NepaliCalendar/CalendarDay.d.ts +23 -0
  232. package/lib/typescript/src/components/NepaliCalendar/CalendarDay.d.ts.map +1 -0
  233. package/lib/typescript/src/components/NepaliCalendar/CalendarGrid.d.ts +25 -0
  234. package/lib/typescript/src/components/NepaliCalendar/CalendarGrid.d.ts.map +1 -0
  235. package/lib/typescript/src/components/NepaliCalendar/CalendarHeader.d.ts +17 -0
  236. package/lib/typescript/src/components/NepaliCalendar/CalendarHeader.d.ts.map +1 -0
  237. package/lib/typescript/src/components/NepaliCalendar/CalendarWeekdays.d.ts +11 -0
  238. package/lib/typescript/src/components/NepaliCalendar/CalendarWeekdays.d.ts.map +1 -0
  239. package/lib/typescript/src/components/NepaliCalendar/NepaliCalendar.d.ts +4 -0
  240. package/lib/typescript/src/components/NepaliCalendar/NepaliCalendar.d.ts.map +1 -0
  241. package/lib/typescript/src/components/NepaliCalendar/index.d.ts +3 -0
  242. package/lib/typescript/src/components/NepaliCalendar/index.d.ts.map +1 -0
  243. package/lib/typescript/src/components/NepaliCalendar/types.d.ts +52 -0
  244. package/lib/typescript/src/components/NepaliCalendar/types.d.ts.map +1 -0
  245. package/lib/typescript/src/components/NepaliDatePicker/DatePickerModal.d.ts +4 -0
  246. package/lib/typescript/src/components/NepaliDatePicker/DatePickerModal.d.ts.map +1 -0
  247. package/lib/typescript/src/components/NepaliDatePicker/NepaliDatePicker.d.ts +4 -0
  248. package/lib/typescript/src/components/NepaliDatePicker/NepaliDatePicker.d.ts.map +1 -0
  249. package/lib/typescript/src/components/NepaliDatePicker/index.d.ts +4 -0
  250. package/lib/typescript/src/components/NepaliDatePicker/index.d.ts.map +1 -0
  251. package/lib/typescript/src/components/NepaliDatePicker/types.d.ts +50 -0
  252. package/lib/typescript/src/components/NepaliDatePicker/types.d.ts.map +1 -0
  253. package/lib/typescript/src/components/NepaliRangePicker/NepaliRangePicker.d.ts +4 -0
  254. package/lib/typescript/src/components/NepaliRangePicker/NepaliRangePicker.d.ts.map +1 -0
  255. package/lib/typescript/src/components/NepaliRangePicker/RangePickerModal.d.ts +4 -0
  256. package/lib/typescript/src/components/NepaliRangePicker/RangePickerModal.d.ts.map +1 -0
  257. package/lib/typescript/src/components/NepaliRangePicker/index.d.ts +5 -0
  258. package/lib/typescript/src/components/NepaliRangePicker/index.d.ts.map +1 -0
  259. package/lib/typescript/src/components/NepaliRangePicker/range-utils.d.ts +13 -0
  260. package/lib/typescript/src/components/NepaliRangePicker/range-utils.d.ts.map +1 -0
  261. package/lib/typescript/src/components/NepaliRangePicker/types.d.ts +61 -0
  262. package/lib/typescript/src/components/NepaliRangePicker/types.d.ts.map +1 -0
  263. package/lib/typescript/src/core/arithmetic.d.ts +6 -0
  264. package/lib/typescript/src/core/arithmetic.d.ts.map +1 -0
  265. package/lib/typescript/src/core/bsData.d.ts +39 -0
  266. package/lib/typescript/src/core/bsData.d.ts.map +1 -0
  267. package/lib/typescript/src/core/conversion.d.ts +4 -0
  268. package/lib/typescript/src/core/conversion.d.ts.map +1 -0
  269. package/lib/typescript/src/core/dateKey.d.ts +4 -0
  270. package/lib/typescript/src/core/dateKey.d.ts.map +1 -0
  271. package/lib/typescript/src/core/epochDay.d.ts +7 -0
  272. package/lib/typescript/src/core/epochDay.d.ts.map +1 -0
  273. package/lib/typescript/src/core/format/format.d.ts +8 -0
  274. package/lib/typescript/src/core/format/format.d.ts.map +1 -0
  275. package/lib/typescript/src/core/format/index.d.ts +5 -0
  276. package/lib/typescript/src/core/format/index.d.ts.map +1 -0
  277. package/lib/typescript/src/core/format/parse.d.ts +7 -0
  278. package/lib/typescript/src/core/format/parse.d.ts.map +1 -0
  279. package/lib/typescript/src/core/format/tokens.d.ts +4 -0
  280. package/lib/typescript/src/core/format/tokens.d.ts.map +1 -0
  281. package/lib/typescript/src/core/index.d.ts +11 -0
  282. package/lib/typescript/src/core/index.d.ts.map +1 -0
  283. package/lib/typescript/src/core/locale/en.d.ts +3 -0
  284. package/lib/typescript/src/core/locale/en.d.ts.map +1 -0
  285. package/lib/typescript/src/core/locale/index.d.ts +4 -0
  286. package/lib/typescript/src/core/locale/index.d.ts.map +1 -0
  287. package/lib/typescript/src/core/locale/ne.d.ts +3 -0
  288. package/lib/typescript/src/core/locale/ne.d.ts.map +1 -0
  289. package/lib/typescript/src/core/locale/types.d.ts +11 -0
  290. package/lib/typescript/src/core/locale/types.d.ts.map +1 -0
  291. package/lib/typescript/src/core/numerals/index.d.ts +2 -0
  292. package/lib/typescript/src/core/numerals/index.d.ts.map +1 -0
  293. package/lib/typescript/src/core/numerals/nepali-numerals.d.ts +3 -0
  294. package/lib/typescript/src/core/numerals/nepali-numerals.d.ts.map +1 -0
  295. package/lib/typescript/src/core/types.d.ts +14 -0
  296. package/lib/typescript/src/core/types.d.ts.map +1 -0
  297. package/lib/typescript/src/core/validation.d.ts +17 -0
  298. package/lib/typescript/src/core/validation.d.ts.map +1 -0
  299. package/lib/typescript/src/index.d.ts +9 -0
  300. package/lib/typescript/src/index.d.ts.map +1 -0
  301. package/lib/typescript/src/theme/create-theme.d.ts +6 -0
  302. package/lib/typescript/src/theme/create-theme.d.ts.map +1 -0
  303. package/lib/typescript/src/theme/default-theme.d.ts +4 -0
  304. package/lib/typescript/src/theme/default-theme.d.ts.map +1 -0
  305. package/lib/typescript/src/theme/index.d.ts +4 -0
  306. package/lib/typescript/src/theme/index.d.ts.map +1 -0
  307. package/lib/typescript/src/theme/types.d.ts +43 -0
  308. package/lib/typescript/src/theme/types.d.ts.map +1 -0
  309. package/lib/typescript/src/utils/date-helpers.d.ts +27 -0
  310. package/lib/typescript/src/utils/date-helpers.d.ts.map +1 -0
  311. package/lib/typescript/src/utils/index.d.ts +2 -0
  312. package/lib/typescript/src/utils/index.d.ts.map +1 -0
  313. package/package.json +85 -0
  314. package/src/accessibility/index.ts +5 -0
  315. package/src/accessibility/labels.ts +22 -0
  316. package/src/calendar/calendar-types.ts +25 -0
  317. package/src/calendar/get-calendar-month-grid.ts +125 -0
  318. package/src/calendar/index.ts +2 -0
  319. package/src/components/NepaliCalendar/CalendarDay.tsx +198 -0
  320. package/src/components/NepaliCalendar/CalendarGrid.tsx +159 -0
  321. package/src/components/NepaliCalendar/CalendarHeader.tsx +126 -0
  322. package/src/components/NepaliCalendar/CalendarWeekdays.tsx +49 -0
  323. package/src/components/NepaliCalendar/NepaliCalendar.tsx +279 -0
  324. package/src/components/NepaliCalendar/index.ts +6 -0
  325. package/src/components/NepaliCalendar/types.ts +62 -0
  326. package/src/components/NepaliDatePicker/DatePickerModal.tsx +220 -0
  327. package/src/components/NepaliDatePicker/NepaliDatePicker.tsx +171 -0
  328. package/src/components/NepaliDatePicker/index.ts +3 -0
  329. package/src/components/NepaliDatePicker/types.ts +70 -0
  330. package/src/components/NepaliRangePicker/NepaliRangePicker.tsx +206 -0
  331. package/src/components/NepaliRangePicker/RangePickerModal.tsx +336 -0
  332. package/src/components/NepaliRangePicker/index.ts +11 -0
  333. package/src/components/NepaliRangePicker/range-utils.ts +75 -0
  334. package/src/components/NepaliRangePicker/types.ts +84 -0
  335. package/src/core/arithmetic.ts +34 -0
  336. package/src/core/bsData.ts +115 -0
  337. package/src/core/conversion.ts +73 -0
  338. package/src/core/dateKey.ts +31 -0
  339. package/src/core/epochDay.ts +49 -0
  340. package/src/core/format/format.ts +108 -0
  341. package/src/core/format/index.ts +4 -0
  342. package/src/core/format/parse.ts +68 -0
  343. package/src/core/format/tokens.ts +35 -0
  344. package/src/core/index.ts +10 -0
  345. package/src/core/locale/en.ts +23 -0
  346. package/src/core/locale/index.ts +3 -0
  347. package/src/core/locale/ne.ts +31 -0
  348. package/src/core/locale/types.ts +12 -0
  349. package/src/core/numerals/index.ts +1 -0
  350. package/src/core/numerals/nepali-numerals.ts +27 -0
  351. package/src/core/types.ts +15 -0
  352. package/src/core/validation.test.ts +207 -0
  353. package/src/core/validation.ts +141 -0
  354. package/src/exports.test.ts +135 -0
  355. package/src/index.ts +8 -0
  356. package/src/phase2.test.ts +424 -0
  357. package/src/phase3.test.ts +83 -0
  358. package/src/phase4.test.ts +86 -0
  359. package/src/phase5.test.ts +257 -0
  360. package/src/phase7.test.ts +307 -0
  361. package/src/range-helpers.test.ts +153 -0
  362. package/src/theme/create-theme.ts +29 -0
  363. package/src/theme/default-theme.ts +99 -0
  364. package/src/theme/index.ts +3 -0
  365. package/src/theme/types.ts +44 -0
  366. package/src/utils/date-helpers.ts +146 -0
  367. package/src/utils/index.ts +9 -0
@@ -0,0 +1,257 @@
1
+ import {
2
+ isDateInRange,
3
+ isRangeStart,
4
+ isRangeEnd,
5
+ normalizeRange,
6
+ selectRangeDate,
7
+ getRangeDateKey,
8
+ } from './components/NepaliRangePicker/range-utils';
9
+ import type { DateRangeValue } from './components/NepaliRangePicker/types';
10
+
11
+ const d = (y: number, m: number, day: number) =>
12
+ ({ calendar: 'BS' as const, year: y, month: m, day });
13
+
14
+ describe('range-utils', () => {
15
+ describe('isDateInRange', () => {
16
+ it('returns true for date between start and end', () => {
17
+ const range: DateRangeValue = {
18
+ start: d(2081, 1, 1),
19
+ end: d(2081, 1, 15),
20
+ };
21
+ expect(isDateInRange(d(2081, 1, 5), range)).toBe(true);
22
+ });
23
+
24
+ it('returns true for start date', () => {
25
+ const range: DateRangeValue = {
26
+ start: d(2081, 1, 1),
27
+ end: d(2081, 1, 15),
28
+ };
29
+ expect(isDateInRange(d(2081, 1, 1), range)).toBe(true);
30
+ });
31
+
32
+ it('returns true for end date', () => {
33
+ const range: DateRangeValue = {
34
+ start: d(2081, 1, 1),
35
+ end: d(2081, 1, 15),
36
+ };
37
+ expect(isDateInRange(d(2081, 1, 15), range)).toBe(true);
38
+ });
39
+
40
+ it('returns false for date before range', () => {
41
+ const range: DateRangeValue = {
42
+ start: d(2081, 1, 5),
43
+ end: d(2081, 1, 15),
44
+ };
45
+ expect(isDateInRange(d(2081, 1, 1), range)).toBe(false);
46
+ });
47
+
48
+ it('returns false for date after range', () => {
49
+ const range: DateRangeValue = {
50
+ start: d(2081, 1, 1),
51
+ end: d(2081, 1, 10),
52
+ };
53
+ expect(isDateInRange(d(2081, 1, 15), range)).toBe(false);
54
+ });
55
+
56
+ it('returns false when range has no end', () => {
57
+ const range: DateRangeValue = {
58
+ start: d(2081, 1, 1),
59
+ end: null,
60
+ };
61
+ expect(isDateInRange(d(2081, 1, 5), range)).toBe(false);
62
+ });
63
+
64
+ it('returns false when range has no start', () => {
65
+ const range: DateRangeValue = {
66
+ start: null,
67
+ end: d(2081, 1, 15),
68
+ };
69
+ expect(isDateInRange(d(2081, 1, 5), range)).toBe(false);
70
+ });
71
+ });
72
+
73
+ describe('isRangeStart', () => {
74
+ it('returns true for start date', () => {
75
+ const range: DateRangeValue = {
76
+ start: d(2081, 1, 5),
77
+ end: d(2081, 1, 15),
78
+ };
79
+ expect(isRangeStart(d(2081, 1, 5), range)).toBe(true);
80
+ });
81
+
82
+ it('returns false for non-start date', () => {
83
+ const range: DateRangeValue = {
84
+ start: d(2081, 1, 5),
85
+ end: d(2081, 1, 15),
86
+ };
87
+ expect(isRangeStart(d(2081, 1, 10), range)).toBe(false);
88
+ });
89
+
90
+ it('returns false when no start', () => {
91
+ const range: DateRangeValue = { start: null, end: null };
92
+ expect(isRangeStart(d(2081, 1, 5), range)).toBe(false);
93
+ });
94
+ });
95
+
96
+ describe('isRangeEnd', () => {
97
+ it('returns true for end date', () => {
98
+ const range: DateRangeValue = {
99
+ start: d(2081, 1, 5),
100
+ end: d(2081, 1, 15),
101
+ };
102
+ expect(isRangeEnd(d(2081, 1, 15), range)).toBe(true);
103
+ });
104
+
105
+ it('returns false for non-end date', () => {
106
+ const range: DateRangeValue = {
107
+ start: d(2081, 1, 5),
108
+ end: d(2081, 1, 15),
109
+ };
110
+ expect(isRangeEnd(d(2081, 1, 10), range)).toBe(false);
111
+ });
112
+
113
+ it('returns false when no end', () => {
114
+ const range: DateRangeValue = { start: null, end: null };
115
+ expect(isRangeEnd(d(2081, 1, 15), range)).toBe(false);
116
+ });
117
+ });
118
+
119
+ describe('normalizeRange', () => {
120
+ it('keeps correct order when start <= end', () => {
121
+ const result = normalizeRange(d(2081, 1, 1), d(2081, 1, 15));
122
+ expect(result.start).toEqual(d(2081, 1, 1));
123
+ expect(result.end).toEqual(d(2081, 1, 15));
124
+ });
125
+
126
+ it('swaps when start > end', () => {
127
+ const result = normalizeRange(d(2081, 1, 15), d(2081, 1, 1));
128
+ expect(result.start).toEqual(d(2081, 1, 1));
129
+ expect(result.end).toEqual(d(2081, 1, 15));
130
+ });
131
+
132
+ it('allows same day when allowSameDay is true', () => {
133
+ const result = normalizeRange(d(2081, 1, 5), d(2081, 1, 5), {
134
+ allowSameDay: true,
135
+ });
136
+ expect(result.start).toEqual(d(2081, 1, 5));
137
+ expect(result.end).toEqual(d(2081, 1, 5));
138
+ });
139
+
140
+ it('rejects same day when allowSameDay is false', () => {
141
+ const result = normalizeRange(d(2081, 1, 5), d(2081, 1, 5), {
142
+ allowSameDay: false,
143
+ });
144
+ expect(result.start).toEqual(d(2081, 1, 5));
145
+ expect(result.end).toBeNull();
146
+ });
147
+ });
148
+
149
+ describe('selectRangeDate', () => {
150
+ it('selects start when no start exists', () => {
151
+ const current: DateRangeValue = { start: null, end: null };
152
+ const result = selectRangeDate(current, d(2081, 1, 5));
153
+ expect(result.start).toEqual(d(2081, 1, 5));
154
+ expect(result.end).toBeNull();
155
+ });
156
+
157
+ it('selects end when start exists but no end', () => {
158
+ const current: DateRangeValue = { start: d(2081, 1, 1), end: null };
159
+ const result = selectRangeDate(current, d(2081, 1, 15));
160
+ expect(result.start).toEqual(d(2081, 1, 1));
161
+ expect(result.end).toEqual(d(2081, 1, 15));
162
+ });
163
+
164
+ it('swaps when second date is before start', () => {
165
+ const current: DateRangeValue = { start: d(2081, 1, 15), end: null };
166
+ const result = selectRangeDate(current, d(2081, 1, 1));
167
+ expect(result.start).toEqual(d(2081, 1, 1));
168
+ expect(result.end).toEqual(d(2081, 1, 15));
169
+ });
170
+
171
+ it('starts new range when both start and end exist', () => {
172
+ const current: DateRangeValue = {
173
+ start: d(2081, 1, 1),
174
+ end: d(2081, 1, 15),
175
+ };
176
+ const result = selectRangeDate(current, d(2081, 2, 1));
177
+ expect(result.start).toEqual(d(2081, 2, 1));
178
+ expect(result.end).toBeNull();
179
+ });
180
+
181
+ it('rejects same day when allowSameDay is false', () => {
182
+ const current: DateRangeValue = { start: d(2081, 1, 5), end: null };
183
+ const result = selectRangeDate(current, d(2081, 1, 5), {
184
+ allowSameDay: false,
185
+ });
186
+ expect(result.start).toEqual(d(2081, 1, 5));
187
+ expect(result.end).toBeNull();
188
+ });
189
+
190
+ it('allows same day when allowSameDay is true', () => {
191
+ const current: DateRangeValue = { start: d(2081, 1, 5), end: null };
192
+ const result = selectRangeDate(current, d(2081, 1, 5), {
193
+ allowSameDay: true,
194
+ });
195
+ expect(result.start).toEqual(d(2081, 1, 5));
196
+ expect(result.end).toEqual(d(2081, 1, 5));
197
+ });
198
+ });
199
+
200
+ describe('getRangeDateKey', () => {
201
+ it('returns "start" for start date', () => {
202
+ const range: DateRangeValue = {
203
+ start: d(2081, 1, 5),
204
+ end: d(2081, 1, 15),
205
+ };
206
+ expect(getRangeDateKey(range, d(2081, 1, 5))).toBe('start');
207
+ });
208
+
209
+ it('returns "end" for end date', () => {
210
+ const range: DateRangeValue = {
211
+ start: d(2081, 1, 5),
212
+ end: d(2081, 1, 15),
213
+ };
214
+ expect(getRangeDateKey(range, d(2081, 1, 15))).toBe('end');
215
+ });
216
+
217
+ it('returns "in-range" for middle date', () => {
218
+ const range: DateRangeValue = {
219
+ start: d(2081, 1, 5),
220
+ end: d(2081, 1, 15),
221
+ };
222
+ expect(getRangeDateKey(range, d(2081, 1, 10))).toBe('in-range');
223
+ });
224
+
225
+ it('returns "none" for date outside range', () => {
226
+ const range: DateRangeValue = {
227
+ start: d(2081, 1, 5),
228
+ end: d(2081, 1, 15),
229
+ };
230
+ expect(getRangeDateKey(range, d(2081, 1, 1))).toBe('none');
231
+ });
232
+
233
+ it('returns "start" when range only has start', () => {
234
+ const range: DateRangeValue = {
235
+ start: d(2081, 1, 5),
236
+ end: null,
237
+ };
238
+ expect(getRangeDateKey(range, d(2081, 1, 5))).toBe('start');
239
+ });
240
+
241
+ it('returns "end" when range only has end', () => {
242
+ const range: DateRangeValue = {
243
+ start: null,
244
+ end: d(2081, 1, 15),
245
+ };
246
+ expect(getRangeDateKey(range, d(2081, 1, 15))).toBe('end');
247
+ });
248
+
249
+ it('returns "none" when range is empty', () => {
250
+ const range: DateRangeValue = {
251
+ start: null,
252
+ end: null,
253
+ };
254
+ expect(getRangeDateKey(range, d(2081, 1, 5))).toBe('none');
255
+ });
256
+ });
257
+ });
@@ -0,0 +1,307 @@
1
+ import {
2
+ safeFormatBSDate,
3
+ getSafeInitialBSDate,
4
+ createDateAccessibilityLabel,
5
+ isDateDisabled,
6
+ } from './utils';
7
+ import { LIGHT_THEME, DARK_THEME } from './theme';
8
+ import { EN_LOCALE, NE_LOCALE } from './core/locale';
9
+ import { getDefaultSupportedBSDate } from './core/validation';
10
+
11
+ const d = (y: number, m: number, day: number) =>
12
+ ({ calendar: 'BS' as const, year: y, month: m, day });
13
+
14
+ describe('safeFormatBSDate', () => {
15
+ it('returns null for null', () => {
16
+ expect(safeFormatBSDate(null, 'yyyy-MM-dd')).toBeNull();
17
+ });
18
+
19
+ it('returns null for undefined', () => {
20
+ expect(safeFormatBSDate(undefined, 'yyyy-MM-dd')).toBeNull();
21
+ });
22
+
23
+ it('formats valid in-range date', () => {
24
+ const result = safeFormatBSDate(d(2081, 1, 5), 'yyyy-MM-dd');
25
+ expect(result).toBe('2081-01-05');
26
+ });
27
+
28
+ it('returns null for out-of-range date', () => {
29
+ const result = safeFormatBSDate(d(2082, 1, 1), 'yyyy-MM-dd');
30
+ expect(result).toBeNull();
31
+ });
32
+
33
+ it('returns null for invalid date structure', () => {
34
+ const result = safeFormatBSDate(
35
+ { calendar: 'BS', year: 2081, month: 1, day: 100 },
36
+ 'yyyy-MM-dd'
37
+ );
38
+ expect(result).toBeNull();
39
+ });
40
+
41
+ it('formats with Nepali locale and devanagari numerals', () => {
42
+ const result = safeFormatBSDate(d(2081, 1, 5), 'dd MMMM yyyy', 'ne', 'devanagari');
43
+ expect(result).toBe('०५ बैशाख २०८१');
44
+ });
45
+ });
46
+
47
+ describe('getSafeInitialBSDate', () => {
48
+ it('returns valid in-range value', () => {
49
+ const value = d(2081, 3, 15);
50
+ expect(getSafeInitialBSDate(value, undefined)).toEqual(value);
51
+ });
52
+
53
+ it('falls back to defaultValue when value is null', () => {
54
+ const def = d(2081, 5, 1);
55
+ expect(getSafeInitialBSDate(null, def)).toEqual(def);
56
+ });
57
+
58
+ it('falls back to default supported date when both are invalid', () => {
59
+ const result = getSafeInitialBSDate(
60
+ { calendar: 'BS', year: 2099, month: 1, day: 1 },
61
+ { calendar: 'BS', year: 2099, month: 1, day: 1 }
62
+ );
63
+ expect(result).toEqual(getDefaultSupportedBSDate());
64
+ });
65
+
66
+ it('falls back to default supported date when both are null/undefined', () => {
67
+ const result = getSafeInitialBSDate(null, undefined);
68
+ expect(result).toEqual(getDefaultSupportedBSDate());
69
+ });
70
+ });
71
+
72
+ describe('isDateDisabled', () => {
73
+ it('disables dates before minDate', () => {
74
+ expect(
75
+ isDateDisabled(d(2081, 1, 5), {
76
+ minDate: d(2081, 1, 10),
77
+ dateKey: '2081-01-05',
78
+ })
79
+ ).toBe(true);
80
+ });
81
+
82
+ it('disables dates after maxDate', () => {
83
+ expect(
84
+ isDateDisabled(d(2081, 1, 15), {
85
+ maxDate: d(2081, 1, 10),
86
+ dateKey: '2081-01-15',
87
+ })
88
+ ).toBe(true);
89
+ });
90
+
91
+ it('disables dates in disabled array', () => {
92
+ expect(
93
+ isDateDisabled(d(2081, 1, 5), {
94
+ disabledDates: ['2081-01-05', '2081-01-10'],
95
+ dateKey: '2081-01-05',
96
+ })
97
+ ).toBe(true);
98
+ });
99
+
100
+ it('disables dates via predicate function', () => {
101
+ expect(
102
+ isDateDisabled(d(2081, 1, 5), {
103
+ disabledDates: () => true,
104
+ dateKey: '2081-01-05',
105
+ })
106
+ ).toBe(true);
107
+ });
108
+
109
+ it('does not disable dates within bounds', () => {
110
+ expect(
111
+ isDateDisabled(d(2081, 1, 10), {
112
+ minDate: d(2081, 1, 5),
113
+ maxDate: d(2081, 1, 15),
114
+ dateKey: '2081-01-10',
115
+ })
116
+ ).toBe(false);
117
+ });
118
+ });
119
+
120
+ describe('createDateAccessibilityLabel', () => {
121
+ const date = d(2081, 1, 5);
122
+
123
+ it('returns plain date label', () => {
124
+ const label = createDateAccessibilityLabel(date, EN_LOCALE, {});
125
+ expect(label).toBe('2081 Baisakh 5');
126
+ });
127
+
128
+ it('includes selected state', () => {
129
+ const label = createDateAccessibilityLabel(date, EN_LOCALE, { selected: true });
130
+ expect(label).toBe('2081 Baisakh 5, selected');
131
+ });
132
+
133
+ it('includes today state', () => {
134
+ const label = createDateAccessibilityLabel(date, EN_LOCALE, { today: true });
135
+ expect(label).toBe('2081 Baisakh 5, today');
136
+ });
137
+
138
+ it('includes disabled state', () => {
139
+ const label = createDateAccessibilityLabel(date, EN_LOCALE, { disabled: true });
140
+ expect(label).toBe('2081 Baisakh 5, disabled');
141
+ });
142
+
143
+ it('includes range start state', () => {
144
+ const label = createDateAccessibilityLabel(date, EN_LOCALE, { rangeStart: true });
145
+ expect(label).toBe('2081 Baisakh 5, range start');
146
+ });
147
+
148
+ it('includes range end state', () => {
149
+ const label = createDateAccessibilityLabel(date, EN_LOCALE, { rangeEnd: true });
150
+ expect(label).toBe('2081 Baisakh 5, range end');
151
+ });
152
+
153
+ it('includes in-range state', () => {
154
+ const label = createDateAccessibilityLabel(date, EN_LOCALE, { inRange: true });
155
+ expect(label).toBe('2081 Baisakh 5, in selected range');
156
+ });
157
+
158
+ it('combines multiple states', () => {
159
+ const label = createDateAccessibilityLabel(date, EN_LOCALE, {
160
+ selected: true,
161
+ today: true,
162
+ });
163
+ expect(label).toBe('2081 Baisakh 5, selected, today');
164
+ });
165
+
166
+ it('includes marked label', () => {
167
+ const label = createDateAccessibilityLabel(date, EN_LOCALE, {
168
+ markedLabel: 'New Year',
169
+ });
170
+ expect(label).toBe('2081 Baisakh 5, New Year');
171
+ });
172
+
173
+ it('works with Nepali locale', () => {
174
+ const label = createDateAccessibilityLabel(date, NE_LOCALE, { selected: true });
175
+ expect(label).toContain('बैशाख');
176
+ expect(label).toContain('selected');
177
+ });
178
+ });
179
+
180
+ describe('theme defaults', () => {
181
+ it('LIGHT_THEME has all required color keys', () => {
182
+ const colors = LIGHT_THEME.colors;
183
+ expect(colors.background).toBeDefined();
184
+ expect(colors.surface).toBeDefined();
185
+ expect(colors.text).toBeDefined();
186
+ expect(colors.mutedText).toBeDefined();
187
+ expect(colors.primary).toBeDefined();
188
+ expect(colors.primaryText).toBeDefined();
189
+ expect(colors.todayBorder).toBeDefined();
190
+ expect(colors.disabledText).toBeDefined();
191
+ expect(colors.outsideMonthText).toBeDefined();
192
+ expect(colors.border).toBeDefined();
193
+ expect(colors.marker).toBeDefined();
194
+ expect(colors.overlay).toBeDefined();
195
+ expect(colors.modalBackground).toBeDefined();
196
+ expect(colors.fieldBackground).toBeDefined();
197
+ expect(colors.fieldBorder).toBeDefined();
198
+ expect(colors.placeholderText).toBeDefined();
199
+ expect(colors.rangeBackground).toBeDefined();
200
+ expect(colors.rangeText).toBeDefined();
201
+ expect(colors.rangeStartBackground).toBeDefined();
202
+ expect(colors.rangeEndBackground).toBeDefined();
203
+ expect(colors.danger).toBeDefined();
204
+ });
205
+
206
+ it('DARK_THEME has all required color keys', () => {
207
+ const colors = DARK_THEME.colors;
208
+ expect(colors.background).toBeDefined();
209
+ expect(colors.overlay).toBeDefined();
210
+ expect(colors.modalBackground).toBeDefined();
211
+ expect(colors.fieldBackground).toBeDefined();
212
+ expect(colors.fieldBorder).toBeDefined();
213
+ expect(colors.placeholderText).toBeDefined();
214
+ expect(colors.danger).toBeDefined();
215
+ });
216
+
217
+ it('LIGHT_THEME has dark enough contrast for primary text', () => {
218
+ expect(LIGHT_THEME.colors.primaryText).toBe('#ffffff');
219
+ expect(LIGHT_THEME.colors.primary).toBe('#2563eb');
220
+ });
221
+
222
+ it('DARK_THEME has light enough text on dark background', () => {
223
+ expect(DARK_THEME.colors.text).toBe('#f9fafb');
224
+ expect(DARK_THEME.colors.background).toBe('#111827');
225
+ });
226
+ });
227
+
228
+ describe('public exports completeness', () => {
229
+ it('exports all core functions', () => {
230
+ const pkg = require('./index');
231
+ expect(typeof pkg.toBS).toBe('function');
232
+ expect(typeof pkg.toAD).toBe('function');
233
+ expect(typeof pkg.todayBS).toBe('function');
234
+ expect(typeof pkg.isValidBSDate).toBe('function');
235
+ expect(typeof pkg.isValidADDate).toBe('function');
236
+ expect(typeof pkg.getBSMonthLength).toBe('function');
237
+ expect(typeof pkg.compareBS).toBe('function');
238
+ expect(typeof pkg.addBSDays).toBe('function');
239
+ expect(typeof pkg.subBSDays).toBe('function');
240
+ expect(typeof pkg.createBSDateKey).toBe('function');
241
+ expect(typeof pkg.parseBSDateKey).toBe('function');
242
+ expect(typeof pkg.getSupportedBSRange).toBe('function');
243
+ expect(typeof pkg.formatBS).toBe('function');
244
+ expect(typeof pkg.parseBS).toBe('function');
245
+ expect(typeof pkg.toNepaliNumerals).toBe('function');
246
+ expect(typeof pkg.toLatinNumerals).toBe('function');
247
+ expect(typeof pkg.getCalendarMonthGrid).toBe('function');
248
+ });
249
+
250
+ it('exports all components', () => {
251
+ const pkg = require('./index');
252
+ expect(typeof pkg.NepaliCalendar).toBe('function');
253
+ expect(typeof pkg.NepaliDatePicker).toBe('function');
254
+ expect(typeof pkg.DatePickerModal).toBe('function');
255
+ expect(typeof pkg.NepaliRangePicker).toBe('function');
256
+ expect(typeof pkg.RangePickerModal).toBe('function');
257
+ });
258
+
259
+ it('exports all types', () => {
260
+ const pkg = require('./index');
261
+ expect(pkg.BSDateValue).toBeUndefined();
262
+ expect(pkg.ADDateValue).toBeUndefined();
263
+ expect(pkg.DateRangeValue).toBeUndefined();
264
+ expect(pkg.CalendarTheme).toBeUndefined();
265
+ expect(pkg.CalendarMarkedDate).toBeUndefined();
266
+ expect(pkg.NepaliCalendarProps).toBeUndefined();
267
+ expect(pkg.NepaliDatePickerProps).toBeUndefined();
268
+ expect(pkg.DatePickerModalProps).toBeUndefined();
269
+ expect(pkg.NepaliRangePickerProps).toBeUndefined();
270
+ expect(pkg.RangePickerModalProps).toBeUndefined();
271
+ expect(pkg.CalendarLocale).toBeUndefined();
272
+ expect(pkg.LocaleCode).toBeUndefined();
273
+ expect(pkg.NumeralSystem).toBeUndefined();
274
+ });
275
+
276
+ it('exports safe UI helpers', () => {
277
+ const pkg = require('./index');
278
+ expect(typeof pkg.safeFormatBSDate).toBe('function');
279
+ expect(typeof pkg.getSafeInitialBSDate).toBe('function');
280
+ expect(typeof pkg.isDateDisabled).toBe('function');
281
+ expect(typeof pkg.createDateAccessibilityLabel).toBe('function');
282
+ });
283
+
284
+ it('exports range utils', () => {
285
+ const pkg = require('./index');
286
+ expect(typeof pkg.isDateInRange).toBe('function');
287
+ expect(typeof pkg.isRangeStart).toBe('function');
288
+ expect(typeof pkg.isRangeEnd).toBe('function');
289
+ expect(typeof pkg.normalizeRange).toBe('function');
290
+ expect(typeof pkg.selectRangeDate).toBe('function');
291
+ expect(typeof pkg.getRangeDateKey).toBe('function');
292
+ });
293
+
294
+ it('exports theme utilities', () => {
295
+ const pkg = require('./index');
296
+ expect(pkg.LIGHT_THEME).toBeDefined();
297
+ expect(pkg.DARK_THEME).toBeDefined();
298
+ expect(typeof pkg.useCalendarTheme).toBe('function');
299
+ });
300
+
301
+ it('exports accessibility labels', () => {
302
+ const pkg = require('./index');
303
+ expect(typeof pkg.getDayAccessibilityLabel).toBe('function');
304
+ expect(pkg.HEADER_PREV_MONTH_LABEL).toBe('Previous month');
305
+ expect(pkg.HEADER_NEXT_MONTH_LABEL).toBe('Next month');
306
+ });
307
+ });