@webority-technologies/mobile 0.0.1

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 (536) hide show
  1. package/README.md +399 -0
  2. package/lib/commonjs/api/publicClient.js +73 -0
  3. package/lib/commonjs/api/userClient.js +290 -0
  4. package/lib/commonjs/auth/authStore.js +107 -0
  5. package/lib/commonjs/auth/index.js +44 -0
  6. package/lib/commonjs/auth/jwt.js +84 -0
  7. package/lib/commonjs/components/Accordion/Accordion.js +257 -0
  8. package/lib/commonjs/components/Accordion/index.js +26 -0
  9. package/lib/commonjs/components/Avatar/Avatar.js +283 -0
  10. package/lib/commonjs/components/Avatar/index.js +26 -0
  11. package/lib/commonjs/components/Badge/Badge.js +212 -0
  12. package/lib/commonjs/components/Badge/index.js +20 -0
  13. package/lib/commonjs/components/Banner/Banner.js +276 -0
  14. package/lib/commonjs/components/Banner/index.js +20 -0
  15. package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +288 -0
  16. package/lib/commonjs/components/BottomNavigation/index.js +20 -0
  17. package/lib/commonjs/components/BottomSheet/BottomSheet.js +367 -0
  18. package/lib/commonjs/components/BottomSheet/index.js +20 -0
  19. package/lib/commonjs/components/Button/Button.js +281 -0
  20. package/lib/commonjs/components/Button/index.js +20 -0
  21. package/lib/commonjs/components/Card/Card.js +194 -0
  22. package/lib/commonjs/components/Card/index.js +20 -0
  23. package/lib/commonjs/components/Carousel/Carousel.js +475 -0
  24. package/lib/commonjs/components/Carousel/index.js +20 -0
  25. package/lib/commonjs/components/Checkbox/Checkbox.js +165 -0
  26. package/lib/commonjs/components/Checkbox/index.js +20 -0
  27. package/lib/commonjs/components/Chip/Chip.js +272 -0
  28. package/lib/commonjs/components/Chip/index.js +20 -0
  29. package/lib/commonjs/components/DatePicker/DatePicker.js +813 -0
  30. package/lib/commonjs/components/DatePicker/index.js +20 -0
  31. package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +622 -0
  32. package/lib/commonjs/components/DateRangePicker/index.js +20 -0
  33. package/lib/commonjs/components/Dialog/Dialog.js +215 -0
  34. package/lib/commonjs/components/Dialog/index.js +20 -0
  35. package/lib/commonjs/components/Divider/Divider.js +118 -0
  36. package/lib/commonjs/components/Divider/index.js +20 -0
  37. package/lib/commonjs/components/Drawer/Drawer.js +344 -0
  38. package/lib/commonjs/components/Drawer/index.js +20 -0
  39. package/lib/commonjs/components/EmptyState/EmptyState.js +201 -0
  40. package/lib/commonjs/components/EmptyState/index.js +20 -0
  41. package/lib/commonjs/components/FAB/FAB.js +457 -0
  42. package/lib/commonjs/components/FAB/index.js +26 -0
  43. package/lib/commonjs/components/Field/Field.js +127 -0
  44. package/lib/commonjs/components/Field/index.js +20 -0
  45. package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.js +81 -0
  46. package/lib/commonjs/components/ForceUpdateDialog/index.js +20 -0
  47. package/lib/commonjs/components/Header/Header.js +339 -0
  48. package/lib/commonjs/components/Header/index.js +20 -0
  49. package/lib/commonjs/components/Icon/Icon.js +120 -0
  50. package/lib/commonjs/components/Icon/index.js +20 -0
  51. package/lib/commonjs/components/ImageGallery/ImageGallery.js +463 -0
  52. package/lib/commonjs/components/ImageGallery/index.js +20 -0
  53. package/lib/commonjs/components/Input/Input.js +390 -0
  54. package/lib/commonjs/components/Input/index.js +20 -0
  55. package/lib/commonjs/components/ListItem/ListItem.js +241 -0
  56. package/lib/commonjs/components/ListItem/index.js +20 -0
  57. package/lib/commonjs/components/LoadingSpinner/LoadingSpinner.js +183 -0
  58. package/lib/commonjs/components/LoadingSpinner/index.js +20 -0
  59. package/lib/commonjs/components/Modal/Modal.js +239 -0
  60. package/lib/commonjs/components/Modal/index.js +20 -0
  61. package/lib/commonjs/components/NumberInput/NumberInput.js +392 -0
  62. package/lib/commonjs/components/NumberInput/index.js +20 -0
  63. package/lib/commonjs/components/OTPInput/OTPInput.js +375 -0
  64. package/lib/commonjs/components/OTPInput/index.js +20 -0
  65. package/lib/commonjs/components/ProgressBar/ProgressBar.js +149 -0
  66. package/lib/commonjs/components/ProgressBar/index.js +20 -0
  67. package/lib/commonjs/components/Radio/Radio.js +160 -0
  68. package/lib/commonjs/components/Radio/RadioGroup.js +43 -0
  69. package/lib/commonjs/components/Radio/index.js +39 -0
  70. package/lib/commonjs/components/Rating/Rating.js +236 -0
  71. package/lib/commonjs/components/Rating/index.js +20 -0
  72. package/lib/commonjs/components/SearchBar/SearchBar.js +274 -0
  73. package/lib/commonjs/components/SearchBar/index.js +20 -0
  74. package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +184 -0
  75. package/lib/commonjs/components/SegmentedControl/index.js +20 -0
  76. package/lib/commonjs/components/Select/Select.js +540 -0
  77. package/lib/commonjs/components/Select/index.js +20 -0
  78. package/lib/commonjs/components/SkeletonLoader/SkeletonContent.js +191 -0
  79. package/lib/commonjs/components/SkeletonLoader/SkeletonLoader.js +311 -0
  80. package/lib/commonjs/components/SkeletonLoader/index.js +57 -0
  81. package/lib/commonjs/components/Slider/Slider.js +443 -0
  82. package/lib/commonjs/components/Slider/index.js +20 -0
  83. package/lib/commonjs/components/Stepper/Stepper.js +403 -0
  84. package/lib/commonjs/components/Stepper/index.js +20 -0
  85. package/lib/commonjs/components/Swipeable/Swipeable.js +349 -0
  86. package/lib/commonjs/components/Swipeable/index.js +20 -0
  87. package/lib/commonjs/components/Switch/Switch.js +173 -0
  88. package/lib/commonjs/components/Switch/index.js +20 -0
  89. package/lib/commonjs/components/Tabs/Tabs.js +204 -0
  90. package/lib/commonjs/components/Tabs/index.js +20 -0
  91. package/lib/commonjs/components/TimePicker/TimePicker.js +551 -0
  92. package/lib/commonjs/components/TimePicker/index.js +20 -0
  93. package/lib/commonjs/components/Toast/Toast.js +273 -0
  94. package/lib/commonjs/components/Toast/ToastProvider.js +195 -0
  95. package/lib/commonjs/components/Toast/index.js +39 -0
  96. package/lib/commonjs/components/Tooltip/Tooltip.js +363 -0
  97. package/lib/commonjs/components/Tooltip/index.js +20 -0
  98. package/lib/commonjs/components/index.js +392 -0
  99. package/lib/commonjs/config/index.js +63 -0
  100. package/lib/commonjs/formatters/currency.js +61 -0
  101. package/lib/commonjs/formatters/date.js +156 -0
  102. package/lib/commonjs/formatters/index.js +77 -0
  103. package/lib/commonjs/formatters/initials.js +28 -0
  104. package/lib/commonjs/formatters/number.js +76 -0
  105. package/lib/commonjs/formatters/phone.js +59 -0
  106. package/lib/commonjs/hooks/index.js +27 -0
  107. package/lib/commonjs/hooks/useDebounce.js +17 -0
  108. package/lib/commonjs/hooks/usePressAnimation.js +44 -0
  109. package/lib/commonjs/hooks/useToggle.js +22 -0
  110. package/lib/commonjs/index.js +628 -0
  111. package/lib/commonjs/initSDK.js +47 -0
  112. package/lib/commonjs/initUI.js +24 -0
  113. package/lib/commonjs/initUserAuth.js +40 -0
  114. package/lib/commonjs/logger/index.js +127 -0
  115. package/lib/commonjs/network/NetworkStatusBanner.js +89 -0
  116. package/lib/commonjs/network/index.js +32 -0
  117. package/lib/commonjs/network/networkStatus.js +88 -0
  118. package/lib/commonjs/package.json +1 -0
  119. package/lib/commonjs/permissions/index.js +180 -0
  120. package/lib/commonjs/storage/index.js +187 -0
  121. package/lib/commonjs/theme/ThemeContext.js +73 -0
  122. package/lib/commonjs/theme/index.js +93 -0
  123. package/lib/commonjs/theme/merge.js +30 -0
  124. package/lib/commonjs/theme/tokens.js +319 -0
  125. package/lib/commonjs/theme/types.js +6 -0
  126. package/lib/commonjs/types/vector-icons.d.js +2 -0
  127. package/lib/commonjs/utils/dimensions.js +31 -0
  128. package/lib/commonjs/utils/hapticUtils.js +57 -0
  129. package/lib/commonjs/utils/imageCompression.js +51 -0
  130. package/lib/commonjs/utils/index.js +83 -0
  131. package/lib/commonjs/utils/responsive.js +48 -0
  132. package/lib/commonjs/utils/shadows.js +12 -0
  133. package/lib/commonjs/utils/spacing.js +86 -0
  134. package/lib/commonjs/validators/index.js +165 -0
  135. package/lib/commonjs/versionCheck/index.js +338 -0
  136. package/lib/module/api/publicClient.js +69 -0
  137. package/lib/module/api/userClient.js +283 -0
  138. package/lib/module/auth/authStore.js +100 -0
  139. package/lib/module/auth/index.js +5 -0
  140. package/lib/module/auth/jwt.js +78 -0
  141. package/lib/module/components/Accordion/Accordion.js +251 -0
  142. package/lib/module/components/Accordion/index.js +4 -0
  143. package/lib/module/components/Avatar/Avatar.js +278 -0
  144. package/lib/module/components/Avatar/index.js +4 -0
  145. package/lib/module/components/Badge/Badge.js +208 -0
  146. package/lib/module/components/Badge/index.js +4 -0
  147. package/lib/module/components/Banner/Banner.js +272 -0
  148. package/lib/module/components/Banner/index.js +4 -0
  149. package/lib/module/components/BottomNavigation/BottomNavigation.js +284 -0
  150. package/lib/module/components/BottomNavigation/index.js +4 -0
  151. package/lib/module/components/BottomSheet/BottomSheet.js +363 -0
  152. package/lib/module/components/BottomSheet/index.js +4 -0
  153. package/lib/module/components/Button/Button.js +277 -0
  154. package/lib/module/components/Button/index.js +4 -0
  155. package/lib/module/components/Card/Card.js +190 -0
  156. package/lib/module/components/Card/index.js +4 -0
  157. package/lib/module/components/Carousel/Carousel.js +471 -0
  158. package/lib/module/components/Carousel/index.js +4 -0
  159. package/lib/module/components/Checkbox/Checkbox.js +161 -0
  160. package/lib/module/components/Checkbox/index.js +4 -0
  161. package/lib/module/components/Chip/Chip.js +268 -0
  162. package/lib/module/components/Chip/index.js +4 -0
  163. package/lib/module/components/DatePicker/DatePicker.js +808 -0
  164. package/lib/module/components/DatePicker/index.js +4 -0
  165. package/lib/module/components/DateRangePicker/DateRangePicker.js +618 -0
  166. package/lib/module/components/DateRangePicker/index.js +4 -0
  167. package/lib/module/components/Dialog/Dialog.js +210 -0
  168. package/lib/module/components/Dialog/index.js +4 -0
  169. package/lib/module/components/Divider/Divider.js +114 -0
  170. package/lib/module/components/Divider/index.js +4 -0
  171. package/lib/module/components/Drawer/Drawer.js +340 -0
  172. package/lib/module/components/Drawer/index.js +4 -0
  173. package/lib/module/components/EmptyState/EmptyState.js +197 -0
  174. package/lib/module/components/EmptyState/index.js +4 -0
  175. package/lib/module/components/FAB/FAB.js +452 -0
  176. package/lib/module/components/FAB/index.js +4 -0
  177. package/lib/module/components/Field/Field.js +123 -0
  178. package/lib/module/components/Field/index.js +4 -0
  179. package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +75 -0
  180. package/lib/module/components/ForceUpdateDialog/index.js +4 -0
  181. package/lib/module/components/Header/Header.js +335 -0
  182. package/lib/module/components/Header/index.js +4 -0
  183. package/lib/module/components/Icon/Icon.js +111 -0
  184. package/lib/module/components/Icon/index.js +4 -0
  185. package/lib/module/components/ImageGallery/ImageGallery.js +458 -0
  186. package/lib/module/components/ImageGallery/index.js +4 -0
  187. package/lib/module/components/Input/Input.js +384 -0
  188. package/lib/module/components/Input/index.js +4 -0
  189. package/lib/module/components/ListItem/ListItem.js +237 -0
  190. package/lib/module/components/ListItem/index.js +4 -0
  191. package/lib/module/components/LoadingSpinner/LoadingSpinner.js +179 -0
  192. package/lib/module/components/LoadingSpinner/index.js +4 -0
  193. package/lib/module/components/Modal/Modal.js +235 -0
  194. package/lib/module/components/Modal/index.js +4 -0
  195. package/lib/module/components/NumberInput/NumberInput.js +388 -0
  196. package/lib/module/components/NumberInput/index.js +4 -0
  197. package/lib/module/components/OTPInput/OTPInput.js +371 -0
  198. package/lib/module/components/OTPInput/index.js +4 -0
  199. package/lib/module/components/ProgressBar/ProgressBar.js +145 -0
  200. package/lib/module/components/ProgressBar/index.js +4 -0
  201. package/lib/module/components/Radio/Radio.js +155 -0
  202. package/lib/module/components/Radio/RadioGroup.js +38 -0
  203. package/lib/module/components/Radio/index.js +5 -0
  204. package/lib/module/components/Rating/Rating.js +232 -0
  205. package/lib/module/components/Rating/index.js +4 -0
  206. package/lib/module/components/SearchBar/SearchBar.js +270 -0
  207. package/lib/module/components/SearchBar/index.js +4 -0
  208. package/lib/module/components/SegmentedControl/SegmentedControl.js +180 -0
  209. package/lib/module/components/SegmentedControl/index.js +4 -0
  210. package/lib/module/components/Select/Select.js +536 -0
  211. package/lib/module/components/Select/index.js +4 -0
  212. package/lib/module/components/SkeletonLoader/SkeletonContent.js +186 -0
  213. package/lib/module/components/SkeletonLoader/SkeletonLoader.js +301 -0
  214. package/lib/module/components/SkeletonLoader/index.js +5 -0
  215. package/lib/module/components/Slider/Slider.js +439 -0
  216. package/lib/module/components/Slider/index.js +4 -0
  217. package/lib/module/components/Stepper/Stepper.js +399 -0
  218. package/lib/module/components/Stepper/index.js +4 -0
  219. package/lib/module/components/Swipeable/Swipeable.js +344 -0
  220. package/lib/module/components/Swipeable/index.js +4 -0
  221. package/lib/module/components/Switch/Switch.js +169 -0
  222. package/lib/module/components/Switch/index.js +4 -0
  223. package/lib/module/components/Tabs/Tabs.js +200 -0
  224. package/lib/module/components/Tabs/index.js +4 -0
  225. package/lib/module/components/TimePicker/TimePicker.js +545 -0
  226. package/lib/module/components/TimePicker/index.js +4 -0
  227. package/lib/module/components/Toast/Toast.js +268 -0
  228. package/lib/module/components/Toast/ToastProvider.js +187 -0
  229. package/lib/module/components/Toast/index.js +5 -0
  230. package/lib/module/components/Tooltip/Tooltip.js +358 -0
  231. package/lib/module/components/Tooltip/index.js +4 -0
  232. package/lib/module/components/index.js +47 -0
  233. package/lib/module/config/index.js +55 -0
  234. package/lib/module/formatters/currency.js +56 -0
  235. package/lib/module/formatters/date.js +148 -0
  236. package/lib/module/formatters/index.js +8 -0
  237. package/lib/module/formatters/initials.js +23 -0
  238. package/lib/module/formatters/number.js +69 -0
  239. package/lib/module/formatters/phone.js +53 -0
  240. package/lib/module/hooks/index.js +6 -0
  241. package/lib/module/hooks/useDebounce.js +12 -0
  242. package/lib/module/hooks/usePressAnimation.js +39 -0
  243. package/lib/module/hooks/useToggle.js +17 -0
  244. package/lib/module/index.js +37 -0
  245. package/lib/module/initSDK.js +42 -0
  246. package/lib/module/initUI.js +19 -0
  247. package/lib/module/initUserAuth.js +36 -0
  248. package/lib/module/logger/index.js +123 -0
  249. package/lib/module/network/NetworkStatusBanner.js +83 -0
  250. package/lib/module/network/index.js +5 -0
  251. package/lib/module/network/networkStatus.js +81 -0
  252. package/lib/module/package.json +1 -0
  253. package/lib/module/permissions/index.js +177 -0
  254. package/lib/module/storage/index.js +183 -0
  255. package/lib/module/theme/ThemeContext.js +65 -0
  256. package/lib/module/theme/index.js +48 -0
  257. package/lib/module/theme/merge.js +25 -0
  258. package/lib/module/theme/tokens.js +315 -0
  259. package/lib/module/theme/types.js +4 -0
  260. package/lib/module/types/vector-icons.d.js +2 -0
  261. package/lib/module/utils/dimensions.js +4 -0
  262. package/lib/module/utils/hapticUtils.js +51 -0
  263. package/lib/module/utils/imageCompression.js +46 -0
  264. package/lib/module/utils/index.js +8 -0
  265. package/lib/module/utils/responsive.js +42 -0
  266. package/lib/module/utils/shadows.js +7 -0
  267. package/lib/module/utils/spacing.js +82 -0
  268. package/lib/module/validators/index.js +143 -0
  269. package/lib/module/versionCheck/index.js +334 -0
  270. package/lib/typescript/commonjs/api/publicClient.d.ts +11 -0
  271. package/lib/typescript/commonjs/api/userClient.d.ts +18 -0
  272. package/lib/typescript/commonjs/auth/authStore.d.ts +20 -0
  273. package/lib/typescript/commonjs/auth/index.d.ts +5 -0
  274. package/lib/typescript/commonjs/auth/jwt.d.ts +31 -0
  275. package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +33 -0
  276. package/lib/typescript/commonjs/components/Accordion/index.d.ts +3 -0
  277. package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +42 -0
  278. package/lib/typescript/commonjs/components/Avatar/index.d.ts +3 -0
  279. package/lib/typescript/commonjs/components/Badge/Badge.d.ts +27 -0
  280. package/lib/typescript/commonjs/components/Badge/index.d.ts +3 -0
  281. package/lib/typescript/commonjs/components/Banner/Banner.d.ts +27 -0
  282. package/lib/typescript/commonjs/components/Banner/index.d.ts +3 -0
  283. package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +34 -0
  284. package/lib/typescript/commonjs/components/BottomNavigation/index.d.ts +3 -0
  285. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +45 -0
  286. package/lib/typescript/commonjs/components/BottomSheet/index.d.ts +3 -0
  287. package/lib/typescript/commonjs/components/Button/Button.d.ts +29 -0
  288. package/lib/typescript/commonjs/components/Button/index.d.ts +3 -0
  289. package/lib/typescript/commonjs/components/Card/Card.d.ts +29 -0
  290. package/lib/typescript/commonjs/components/Card/index.d.ts +3 -0
  291. package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +66 -0
  292. package/lib/typescript/commonjs/components/Carousel/index.d.ts +3 -0
  293. package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +24 -0
  294. package/lib/typescript/commonjs/components/Checkbox/index.d.ts +3 -0
  295. package/lib/typescript/commonjs/components/Chip/Chip.d.ts +25 -0
  296. package/lib/typescript/commonjs/components/Chip/index.d.ts +3 -0
  297. package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +25 -0
  298. package/lib/typescript/commonjs/components/DatePicker/index.d.ts +3 -0
  299. package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +32 -0
  300. package/lib/typescript/commonjs/components/DateRangePicker/index.d.ts +3 -0
  301. package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +25 -0
  302. package/lib/typescript/commonjs/components/Dialog/index.d.ts +3 -0
  303. package/lib/typescript/commonjs/components/Divider/Divider.d.ts +21 -0
  304. package/lib/typescript/commonjs/components/Divider/index.d.ts +3 -0
  305. package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +53 -0
  306. package/lib/typescript/commonjs/components/Drawer/index.d.ts +3 -0
  307. package/lib/typescript/commonjs/components/EmptyState/EmptyState.d.ts +25 -0
  308. package/lib/typescript/commonjs/components/EmptyState/index.d.ts +3 -0
  309. package/lib/typescript/commonjs/components/FAB/FAB.d.ts +53 -0
  310. package/lib/typescript/commonjs/components/FAB/index.d.ts +3 -0
  311. package/lib/typescript/commonjs/components/Field/Field.d.ts +28 -0
  312. package/lib/typescript/commonjs/components/Field/index.d.ts +3 -0
  313. package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +39 -0
  314. package/lib/typescript/commonjs/components/ForceUpdateDialog/index.d.ts +3 -0
  315. package/lib/typescript/commonjs/components/Header/Header.d.ts +36 -0
  316. package/lib/typescript/commonjs/components/Header/index.d.ts +3 -0
  317. package/lib/typescript/commonjs/components/Icon/Icon.d.ts +20 -0
  318. package/lib/typescript/commonjs/components/Icon/index.d.ts +3 -0
  319. package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +41 -0
  320. package/lib/typescript/commonjs/components/ImageGallery/index.d.ts +3 -0
  321. package/lib/typescript/commonjs/components/Input/Input.d.ts +34 -0
  322. package/lib/typescript/commonjs/components/Input/index.d.ts +3 -0
  323. package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +30 -0
  324. package/lib/typescript/commonjs/components/ListItem/index.d.ts +4 -0
  325. package/lib/typescript/commonjs/components/LoadingSpinner/LoadingSpinner.d.ts +20 -0
  326. package/lib/typescript/commonjs/components/LoadingSpinner/index.d.ts +3 -0
  327. package/lib/typescript/commonjs/components/Modal/Modal.d.ts +29 -0
  328. package/lib/typescript/commonjs/components/Modal/index.d.ts +3 -0
  329. package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +35 -0
  330. package/lib/typescript/commonjs/components/NumberInput/index.d.ts +3 -0
  331. package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +29 -0
  332. package/lib/typescript/commonjs/components/OTPInput/index.d.ts +3 -0
  333. package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +21 -0
  334. package/lib/typescript/commonjs/components/ProgressBar/index.d.ts +3 -0
  335. package/lib/typescript/commonjs/components/Radio/Radio.d.ts +32 -0
  336. package/lib/typescript/commonjs/components/Radio/RadioGroup.d.ts +16 -0
  337. package/lib/typescript/commonjs/components/Radio/index.d.ts +5 -0
  338. package/lib/typescript/commonjs/components/Rating/Rating.d.ts +22 -0
  339. package/lib/typescript/commonjs/components/Rating/index.d.ts +3 -0
  340. package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +28 -0
  341. package/lib/typescript/commonjs/components/SearchBar/index.d.ts +3 -0
  342. package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +36 -0
  343. package/lib/typescript/commonjs/components/SegmentedControl/index.d.ts +3 -0
  344. package/lib/typescript/commonjs/components/Select/Select.d.ts +48 -0
  345. package/lib/typescript/commonjs/components/Select/index.d.ts +3 -0
  346. package/lib/typescript/commonjs/components/SkeletonLoader/SkeletonContent.d.ts +29 -0
  347. package/lib/typescript/commonjs/components/SkeletonLoader/SkeletonLoader.d.ts +42 -0
  348. package/lib/typescript/commonjs/components/SkeletonLoader/index.d.ts +5 -0
  349. package/lib/typescript/commonjs/components/Slider/Slider.d.ts +33 -0
  350. package/lib/typescript/commonjs/components/Slider/index.d.ts +3 -0
  351. package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +25 -0
  352. package/lib/typescript/commonjs/components/Stepper/index.d.ts +3 -0
  353. package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +45 -0
  354. package/lib/typescript/commonjs/components/Swipeable/index.d.ts +3 -0
  355. package/lib/typescript/commonjs/components/Switch/Switch.d.ts +24 -0
  356. package/lib/typescript/commonjs/components/Switch/index.d.ts +3 -0
  357. package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +37 -0
  358. package/lib/typescript/commonjs/components/Tabs/index.d.ts +3 -0
  359. package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +26 -0
  360. package/lib/typescript/commonjs/components/TimePicker/index.d.ts +3 -0
  361. package/lib/typescript/commonjs/components/Toast/Toast.d.ts +30 -0
  362. package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +26 -0
  363. package/lib/typescript/commonjs/components/Toast/index.d.ts +5 -0
  364. package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +22 -0
  365. package/lib/typescript/commonjs/components/Tooltip/index.d.ts +3 -0
  366. package/lib/typescript/commonjs/components/index.d.ts +89 -0
  367. package/lib/typescript/commonjs/config/index.d.ts +40 -0
  368. package/lib/typescript/commonjs/formatters/currency.d.ts +24 -0
  369. package/lib/typescript/commonjs/formatters/date.d.ts +22 -0
  370. package/lib/typescript/commonjs/formatters/index.d.ts +8 -0
  371. package/lib/typescript/commonjs/formatters/initials.d.ts +11 -0
  372. package/lib/typescript/commonjs/formatters/number.d.ts +15 -0
  373. package/lib/typescript/commonjs/formatters/phone.d.ts +13 -0
  374. package/lib/typescript/commonjs/hooks/index.d.ts +6 -0
  375. package/lib/typescript/commonjs/hooks/useDebounce.d.ts +2 -0
  376. package/lib/typescript/commonjs/hooks/usePressAnimation.d.ts +14 -0
  377. package/lib/typescript/commonjs/hooks/useToggle.d.ts +9 -0
  378. package/lib/typescript/commonjs/index.d.ts +37 -0
  379. package/lib/typescript/commonjs/initSDK.d.ts +40 -0
  380. package/lib/typescript/commonjs/initUI.d.ts +12 -0
  381. package/lib/typescript/commonjs/initUserAuth.d.ts +22 -0
  382. package/lib/typescript/commonjs/logger/index.d.ts +42 -0
  383. package/lib/typescript/commonjs/network/NetworkStatusBanner.d.ts +19 -0
  384. package/lib/typescript/commonjs/network/index.d.ts +5 -0
  385. package/lib/typescript/commonjs/network/networkStatus.d.ts +27 -0
  386. package/lib/typescript/commonjs/package.json +1 -0
  387. package/lib/typescript/commonjs/permissions/index.d.ts +20 -0
  388. package/lib/typescript/commonjs/storage/index.d.ts +42 -0
  389. package/lib/typescript/commonjs/theme/ThemeContext.d.ts +18 -0
  390. package/lib/typescript/commonjs/theme/index.d.ts +13 -0
  391. package/lib/typescript/commonjs/theme/merge.d.ts +3 -0
  392. package/lib/typescript/commonjs/theme/tokens.d.ts +4 -0
  393. package/lib/typescript/commonjs/theme/types.d.ts +161 -0
  394. package/lib/typescript/commonjs/utils/dimensions.d.ts +3 -0
  395. package/lib/typescript/commonjs/utils/hapticUtils.d.ts +4 -0
  396. package/lib/typescript/commonjs/utils/imageCompression.d.ts +15 -0
  397. package/lib/typescript/commonjs/utils/index.d.ts +10 -0
  398. package/lib/typescript/commonjs/utils/responsive.d.ts +23 -0
  399. package/lib/typescript/commonjs/utils/shadows.d.ts +4 -0
  400. package/lib/typescript/commonjs/utils/spacing.d.ts +61 -0
  401. package/lib/typescript/commonjs/validators/index.d.ts +46 -0
  402. package/lib/typescript/commonjs/versionCheck/index.d.ts +59 -0
  403. package/lib/typescript/module/api/publicClient.d.ts +11 -0
  404. package/lib/typescript/module/api/userClient.d.ts +18 -0
  405. package/lib/typescript/module/auth/authStore.d.ts +20 -0
  406. package/lib/typescript/module/auth/index.d.ts +5 -0
  407. package/lib/typescript/module/auth/jwt.d.ts +31 -0
  408. package/lib/typescript/module/components/Accordion/Accordion.d.ts +33 -0
  409. package/lib/typescript/module/components/Accordion/index.d.ts +3 -0
  410. package/lib/typescript/module/components/Avatar/Avatar.d.ts +42 -0
  411. package/lib/typescript/module/components/Avatar/index.d.ts +3 -0
  412. package/lib/typescript/module/components/Badge/Badge.d.ts +27 -0
  413. package/lib/typescript/module/components/Badge/index.d.ts +3 -0
  414. package/lib/typescript/module/components/Banner/Banner.d.ts +27 -0
  415. package/lib/typescript/module/components/Banner/index.d.ts +3 -0
  416. package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +34 -0
  417. package/lib/typescript/module/components/BottomNavigation/index.d.ts +3 -0
  418. package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +45 -0
  419. package/lib/typescript/module/components/BottomSheet/index.d.ts +3 -0
  420. package/lib/typescript/module/components/Button/Button.d.ts +29 -0
  421. package/lib/typescript/module/components/Button/index.d.ts +3 -0
  422. package/lib/typescript/module/components/Card/Card.d.ts +29 -0
  423. package/lib/typescript/module/components/Card/index.d.ts +3 -0
  424. package/lib/typescript/module/components/Carousel/Carousel.d.ts +66 -0
  425. package/lib/typescript/module/components/Carousel/index.d.ts +3 -0
  426. package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +24 -0
  427. package/lib/typescript/module/components/Checkbox/index.d.ts +3 -0
  428. package/lib/typescript/module/components/Chip/Chip.d.ts +25 -0
  429. package/lib/typescript/module/components/Chip/index.d.ts +3 -0
  430. package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +25 -0
  431. package/lib/typescript/module/components/DatePicker/index.d.ts +3 -0
  432. package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +32 -0
  433. package/lib/typescript/module/components/DateRangePicker/index.d.ts +3 -0
  434. package/lib/typescript/module/components/Dialog/Dialog.d.ts +25 -0
  435. package/lib/typescript/module/components/Dialog/index.d.ts +3 -0
  436. package/lib/typescript/module/components/Divider/Divider.d.ts +21 -0
  437. package/lib/typescript/module/components/Divider/index.d.ts +3 -0
  438. package/lib/typescript/module/components/Drawer/Drawer.d.ts +53 -0
  439. package/lib/typescript/module/components/Drawer/index.d.ts +3 -0
  440. package/lib/typescript/module/components/EmptyState/EmptyState.d.ts +25 -0
  441. package/lib/typescript/module/components/EmptyState/index.d.ts +3 -0
  442. package/lib/typescript/module/components/FAB/FAB.d.ts +53 -0
  443. package/lib/typescript/module/components/FAB/index.d.ts +3 -0
  444. package/lib/typescript/module/components/Field/Field.d.ts +28 -0
  445. package/lib/typescript/module/components/Field/index.d.ts +3 -0
  446. package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +39 -0
  447. package/lib/typescript/module/components/ForceUpdateDialog/index.d.ts +3 -0
  448. package/lib/typescript/module/components/Header/Header.d.ts +36 -0
  449. package/lib/typescript/module/components/Header/index.d.ts +3 -0
  450. package/lib/typescript/module/components/Icon/Icon.d.ts +20 -0
  451. package/lib/typescript/module/components/Icon/index.d.ts +3 -0
  452. package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +41 -0
  453. package/lib/typescript/module/components/ImageGallery/index.d.ts +3 -0
  454. package/lib/typescript/module/components/Input/Input.d.ts +34 -0
  455. package/lib/typescript/module/components/Input/index.d.ts +3 -0
  456. package/lib/typescript/module/components/ListItem/ListItem.d.ts +30 -0
  457. package/lib/typescript/module/components/ListItem/index.d.ts +4 -0
  458. package/lib/typescript/module/components/LoadingSpinner/LoadingSpinner.d.ts +20 -0
  459. package/lib/typescript/module/components/LoadingSpinner/index.d.ts +3 -0
  460. package/lib/typescript/module/components/Modal/Modal.d.ts +29 -0
  461. package/lib/typescript/module/components/Modal/index.d.ts +3 -0
  462. package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +35 -0
  463. package/lib/typescript/module/components/NumberInput/index.d.ts +3 -0
  464. package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +29 -0
  465. package/lib/typescript/module/components/OTPInput/index.d.ts +3 -0
  466. package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +21 -0
  467. package/lib/typescript/module/components/ProgressBar/index.d.ts +3 -0
  468. package/lib/typescript/module/components/Radio/Radio.d.ts +32 -0
  469. package/lib/typescript/module/components/Radio/RadioGroup.d.ts +16 -0
  470. package/lib/typescript/module/components/Radio/index.d.ts +5 -0
  471. package/lib/typescript/module/components/Rating/Rating.d.ts +22 -0
  472. package/lib/typescript/module/components/Rating/index.d.ts +3 -0
  473. package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +28 -0
  474. package/lib/typescript/module/components/SearchBar/index.d.ts +3 -0
  475. package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +36 -0
  476. package/lib/typescript/module/components/SegmentedControl/index.d.ts +3 -0
  477. package/lib/typescript/module/components/Select/Select.d.ts +48 -0
  478. package/lib/typescript/module/components/Select/index.d.ts +3 -0
  479. package/lib/typescript/module/components/SkeletonLoader/SkeletonContent.d.ts +29 -0
  480. package/lib/typescript/module/components/SkeletonLoader/SkeletonLoader.d.ts +42 -0
  481. package/lib/typescript/module/components/SkeletonLoader/index.d.ts +5 -0
  482. package/lib/typescript/module/components/Slider/Slider.d.ts +33 -0
  483. package/lib/typescript/module/components/Slider/index.d.ts +3 -0
  484. package/lib/typescript/module/components/Stepper/Stepper.d.ts +25 -0
  485. package/lib/typescript/module/components/Stepper/index.d.ts +3 -0
  486. package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +45 -0
  487. package/lib/typescript/module/components/Swipeable/index.d.ts +3 -0
  488. package/lib/typescript/module/components/Switch/Switch.d.ts +24 -0
  489. package/lib/typescript/module/components/Switch/index.d.ts +3 -0
  490. package/lib/typescript/module/components/Tabs/Tabs.d.ts +37 -0
  491. package/lib/typescript/module/components/Tabs/index.d.ts +3 -0
  492. package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +26 -0
  493. package/lib/typescript/module/components/TimePicker/index.d.ts +3 -0
  494. package/lib/typescript/module/components/Toast/Toast.d.ts +30 -0
  495. package/lib/typescript/module/components/Toast/ToastProvider.d.ts +26 -0
  496. package/lib/typescript/module/components/Toast/index.d.ts +5 -0
  497. package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +22 -0
  498. package/lib/typescript/module/components/Tooltip/index.d.ts +3 -0
  499. package/lib/typescript/module/components/index.d.ts +89 -0
  500. package/lib/typescript/module/config/index.d.ts +40 -0
  501. package/lib/typescript/module/formatters/currency.d.ts +24 -0
  502. package/lib/typescript/module/formatters/date.d.ts +22 -0
  503. package/lib/typescript/module/formatters/index.d.ts +8 -0
  504. package/lib/typescript/module/formatters/initials.d.ts +11 -0
  505. package/lib/typescript/module/formatters/number.d.ts +15 -0
  506. package/lib/typescript/module/formatters/phone.d.ts +13 -0
  507. package/lib/typescript/module/hooks/index.d.ts +6 -0
  508. package/lib/typescript/module/hooks/useDebounce.d.ts +2 -0
  509. package/lib/typescript/module/hooks/usePressAnimation.d.ts +14 -0
  510. package/lib/typescript/module/hooks/useToggle.d.ts +9 -0
  511. package/lib/typescript/module/index.d.ts +37 -0
  512. package/lib/typescript/module/initSDK.d.ts +40 -0
  513. package/lib/typescript/module/initUI.d.ts +12 -0
  514. package/lib/typescript/module/initUserAuth.d.ts +22 -0
  515. package/lib/typescript/module/logger/index.d.ts +42 -0
  516. package/lib/typescript/module/network/NetworkStatusBanner.d.ts +19 -0
  517. package/lib/typescript/module/network/index.d.ts +5 -0
  518. package/lib/typescript/module/network/networkStatus.d.ts +27 -0
  519. package/lib/typescript/module/package.json +1 -0
  520. package/lib/typescript/module/permissions/index.d.ts +20 -0
  521. package/lib/typescript/module/storage/index.d.ts +42 -0
  522. package/lib/typescript/module/theme/ThemeContext.d.ts +18 -0
  523. package/lib/typescript/module/theme/index.d.ts +13 -0
  524. package/lib/typescript/module/theme/merge.d.ts +3 -0
  525. package/lib/typescript/module/theme/tokens.d.ts +4 -0
  526. package/lib/typescript/module/theme/types.d.ts +161 -0
  527. package/lib/typescript/module/utils/dimensions.d.ts +3 -0
  528. package/lib/typescript/module/utils/hapticUtils.d.ts +4 -0
  529. package/lib/typescript/module/utils/imageCompression.d.ts +15 -0
  530. package/lib/typescript/module/utils/index.d.ts +10 -0
  531. package/lib/typescript/module/utils/responsive.d.ts +23 -0
  532. package/lib/typescript/module/utils/shadows.d.ts +4 -0
  533. package/lib/typescript/module/utils/spacing.d.ts +61 -0
  534. package/lib/typescript/module/validators/index.d.ts +46 -0
  535. package/lib/typescript/module/versionCheck/index.d.ts +59 -0
  536. package/package.json +137 -0
@@ -0,0 +1,813 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.DatePicker = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _index = require("../../theme/index.js");
10
+ var _index2 = require("../../utils/index.js");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ const DAY_MS = 24 * 60 * 60 * 1000;
14
+ const GRID_SIZE = 12; // 4 cols x 3 rows for year / decade grids
15
+ const DECADE_SPAN = 10;
16
+ const startOfDay = date => {
17
+ const d = new Date(date.getFullYear(), date.getMonth(), date.getDate());
18
+ return d;
19
+ };
20
+ const isSameDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
21
+ const toIso = date => {
22
+ const y = date.getFullYear();
23
+ const m = String(date.getMonth() + 1).padStart(2, '0');
24
+ const d = String(date.getDate()).padStart(2, '0');
25
+ return `${y}-${m}-${d}`;
26
+ };
27
+ const addMonths = (date, delta) => new Date(date.getFullYear(), date.getMonth() + delta, 1);
28
+ const buildMonthMatrix = (anchor, weekStartsOn) => {
29
+ const year = anchor.getFullYear();
30
+ const month = anchor.getMonth();
31
+ const firstOfMonth = new Date(year, month, 1);
32
+ const firstWeekday = firstOfMonth.getDay();
33
+ const offset = (firstWeekday - weekStartsOn + 7) % 7;
34
+ const gridStart = new Date(year, month, 1 - offset);
35
+ const cells = [];
36
+ for (let i = 0; i < 42; i += 1) {
37
+ const d = new Date(gridStart.getTime() + i * DAY_MS);
38
+ cells.push({
39
+ date: d,
40
+ inMonth: d.getMonth() === month,
41
+ iso: toIso(d)
42
+ });
43
+ }
44
+ return cells;
45
+ };
46
+ const weekdayLabels = (locale, weekStartsOn) => {
47
+ // Reference Sunday Jan 4 1970 (weekday 0) — pick 7 consecutive days starting at weekStartsOn.
48
+ const fmt = new Intl.DateTimeFormat(locale, {
49
+ weekday: 'short'
50
+ });
51
+ const labels = [];
52
+ for (let i = 0; i < 7; i += 1) {
53
+ const day = (weekStartsOn + i) % 7;
54
+ // Jan 4 1970 = Sunday (day 0); shift to the right weekday.
55
+ const ref = new Date(1970, 0, 4 + day);
56
+ labels.push(fmt.format(ref));
57
+ }
58
+ return labels;
59
+ };
60
+ const formatMonthYear = (date, locale) => new Intl.DateTimeFormat(locale, {
61
+ month: 'long',
62
+ year: 'numeric'
63
+ }).format(date);
64
+ const formatLongDate = (date, locale) => new Intl.DateTimeFormat(locale, {
65
+ weekday: 'long',
66
+ year: 'numeric',
67
+ month: 'long',
68
+ day: 'numeric'
69
+ }).format(date);
70
+ const decadeStartFor = year => Math.floor(year / DECADE_SPAN) * DECADE_SPAN;
71
+
72
+ // 12 years centered on the anchor year: 4 prior, anchor, 7 following.
73
+ const buildYearCells = anchorYear => {
74
+ const start = anchorYear - 4;
75
+ return Array.from({
76
+ length: GRID_SIZE
77
+ }, (_, i) => start + i);
78
+ };
79
+
80
+ // 12 decades centered on the anchor decade: 4 prior, anchor decade, 7 following.
81
+ const buildDecadeCells = anchorYear => {
82
+ const startDecade = decadeStartFor(anchorYear) - 4 * DECADE_SPAN;
83
+ return Array.from({
84
+ length: GRID_SIZE
85
+ }, (_, i) => startDecade + i * DECADE_SPAN);
86
+ };
87
+ const DatePicker = props => {
88
+ const {
89
+ visible,
90
+ value,
91
+ onSelect,
92
+ onClose,
93
+ minDate,
94
+ maxDate,
95
+ disabledDates,
96
+ mode = 'modal',
97
+ locale = 'en-IN',
98
+ weekStartsOn = 0,
99
+ title = 'Select Date',
100
+ confirmLabel = 'Confirm',
101
+ cancelLabel = 'Cancel',
102
+ style,
103
+ testID
104
+ } = props;
105
+ const theme = (0, _index.useTheme)();
106
+ const styles = (0, _react.useMemo)(() => buildStyles(theme), [theme]);
107
+ const today = (0, _react.useMemo)(() => startOfDay(new Date()), []);
108
+ const initialAnchor = value ? startOfDay(value) : today;
109
+ const [anchor, setAnchor] = (0, _react.useState)(initialAnchor);
110
+ const [pendingDate, setPendingDate] = (0, _react.useState)(value ? startOfDay(value) : null);
111
+ const [viewMode, setViewMode] = (0, _react.useState)('days');
112
+
113
+ // Animations
114
+ const backdrop = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
115
+ const sheet = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
116
+ const monthSlide = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
117
+ const monthFade = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
118
+ const selectScale = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
119
+ const viewFade = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
120
+ const viewScale = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
121
+ const headerScale = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
122
+
123
+ // Sync anchor / pending when value prop changes.
124
+ (0, _react.useEffect)(() => {
125
+ if (value) {
126
+ const d = startOfDay(value);
127
+ setPendingDate(d);
128
+ setAnchor(d);
129
+ } else {
130
+ setPendingDate(null);
131
+ }
132
+ }, [value]);
133
+
134
+ // Modal open / close animation.
135
+ (0, _react.useEffect)(() => {
136
+ if (mode !== 'modal') return;
137
+ if (visible) {
138
+ backdrop.setValue(0);
139
+ sheet.setValue(0);
140
+ _reactNative.Animated.parallel([_reactNative.Animated.timing(backdrop, {
141
+ toValue: 1,
142
+ duration: theme.motion.duration.normal,
143
+ easing: _reactNative.Easing.out(_reactNative.Easing.cubic),
144
+ useNativeDriver: true
145
+ }), _reactNative.Animated.spring(sheet, {
146
+ toValue: 1,
147
+ damping: theme.motion.spring.gentle.damping,
148
+ stiffness: theme.motion.spring.gentle.stiffness,
149
+ mass: theme.motion.spring.gentle.mass,
150
+ useNativeDriver: true
151
+ })]).start();
152
+ }
153
+ }, [visible, mode, backdrop, sheet, theme.motion]);
154
+ const disabledIsoSet = (0, _react.useMemo)(() => {
155
+ const set = new Set();
156
+ disabledDates?.forEach(d => set.add(toIso(startOfDay(d))));
157
+ return set;
158
+ }, [disabledDates]);
159
+ const minDay = (0, _react.useMemo)(() => minDate ? startOfDay(minDate) : null, [minDate]);
160
+ const maxDay = (0, _react.useMemo)(() => maxDate ? startOfDay(maxDate) : null, [maxDate]);
161
+ const isDisabled = (0, _react.useCallback)(date => {
162
+ if (minDay && date.getTime() < minDay.getTime()) return true;
163
+ if (maxDay && date.getTime() > maxDay.getTime()) return true;
164
+ if (disabledIsoSet.has(toIso(date))) return true;
165
+ return false;
166
+ }, [minDay, maxDay, disabledIsoSet]);
167
+ const cells = (0, _react.useMemo)(() => buildMonthMatrix(anchor, weekStartsOn), [anchor, weekStartsOn]);
168
+ const yearCells = (0, _react.useMemo)(() => buildYearCells(anchor.getFullYear()), [anchor]);
169
+ const decadeCells = (0, _react.useMemo)(() => buildDecadeCells(anchor.getFullYear()), [anchor]);
170
+ const weekdays = (0, _react.useMemo)(() => weekdayLabels(locale, weekStartsOn), [locale, weekStartsOn]);
171
+ const headerLabel = (0, _react.useMemo)(() => {
172
+ if (viewMode === 'days') return formatMonthYear(anchor, locale);
173
+ if (viewMode === 'years') {
174
+ const first = yearCells[0];
175
+ const last = yearCells[yearCells.length - 1];
176
+ return `${first} - ${last}`;
177
+ }
178
+ const first = decadeCells[0];
179
+ const last = decadeCells[decadeCells.length - 1] + (DECADE_SPAN - 1);
180
+ return `${first} - ${last}`;
181
+ }, [anchor, decadeCells, locale, viewMode, yearCells]);
182
+ const isYearDisabled = (0, _react.useCallback)(year => {
183
+ if (minDay && year < minDay.getFullYear()) return true;
184
+ if (maxDay && year > maxDay.getFullYear()) return true;
185
+ return false;
186
+ }, [minDay, maxDay]);
187
+ const isDecadeDisabled = (0, _react.useCallback)(decadeStart => {
188
+ const decadeEnd = decadeStart + DECADE_SPAN - 1;
189
+ if (minDay && decadeEnd < minDay.getFullYear()) return true;
190
+ if (maxDay && decadeStart > maxDay.getFullYear()) return true;
191
+ return false;
192
+ }, [minDay, maxDay]);
193
+ const animateMonthChange = (0, _react.useCallback)(delta => {
194
+ (0, _index2.triggerHaptic)('impactLight');
195
+ const direction = delta > 0 ? 1 : -1;
196
+ const distance = 32;
197
+ _reactNative.Animated.sequence([_reactNative.Animated.parallel([_reactNative.Animated.timing(monthSlide, {
198
+ toValue: -direction * distance,
199
+ duration: 140,
200
+ easing: _reactNative.Easing.out(_reactNative.Easing.quad),
201
+ useNativeDriver: true
202
+ }), _reactNative.Animated.timing(monthFade, {
203
+ toValue: 0,
204
+ duration: 140,
205
+ useNativeDriver: true
206
+ })]), _reactNative.Animated.timing(monthSlide, {
207
+ toValue: direction * distance,
208
+ duration: 0,
209
+ useNativeDriver: true
210
+ }), _reactNative.Animated.parallel([_reactNative.Animated.timing(monthSlide, {
211
+ toValue: 0,
212
+ duration: 160,
213
+ easing: _reactNative.Easing.out(_reactNative.Easing.cubic),
214
+ useNativeDriver: true
215
+ }), _reactNative.Animated.timing(monthFade, {
216
+ toValue: 1,
217
+ duration: 160,
218
+ useNativeDriver: true
219
+ })])]).start();
220
+ const next = addMonths(anchor, delta);
221
+ setAnchor(next);
222
+ _reactNative.AccessibilityInfo.announceForAccessibility(formatMonthYear(next, locale));
223
+ }, [anchor, locale, monthFade, monthSlide]);
224
+ const goPrev = (0, _react.useCallback)(() => {
225
+ if (viewMode === 'days') {
226
+ animateMonthChange(-1);
227
+ return;
228
+ }
229
+ (0, _index2.triggerHaptic)('impactLight');
230
+ if (viewMode === 'years') {
231
+ setAnchor(prev => new Date(prev.getFullYear() - GRID_SIZE, prev.getMonth(), 1));
232
+ } else {
233
+ setAnchor(prev => new Date(prev.getFullYear() - GRID_SIZE * DECADE_SPAN, prev.getMonth(), 1));
234
+ }
235
+ }, [animateMonthChange, viewMode]);
236
+ const goNext = (0, _react.useCallback)(() => {
237
+ if (viewMode === 'days') {
238
+ animateMonthChange(1);
239
+ return;
240
+ }
241
+ (0, _index2.triggerHaptic)('impactLight');
242
+ if (viewMode === 'years') {
243
+ setAnchor(prev => new Date(prev.getFullYear() + GRID_SIZE, prev.getMonth(), 1));
244
+ } else {
245
+ setAnchor(prev => new Date(prev.getFullYear() + GRID_SIZE * DECADE_SPAN, prev.getMonth(), 1));
246
+ }
247
+ }, [animateMonthChange, viewMode]);
248
+
249
+ // View-mode transition: fade + scale (200ms, native driver).
250
+ const animateViewTransition = (0, _react.useCallback)(() => {
251
+ viewFade.setValue(0);
252
+ viewScale.setValue(0.9);
253
+ _reactNative.Animated.parallel([_reactNative.Animated.timing(viewFade, {
254
+ toValue: 1,
255
+ duration: 200,
256
+ easing: _reactNative.Easing.out(_reactNative.Easing.cubic),
257
+ useNativeDriver: true
258
+ }), _reactNative.Animated.timing(viewScale, {
259
+ toValue: 1,
260
+ duration: 200,
261
+ easing: _reactNative.Easing.out(_reactNative.Easing.cubic),
262
+ useNativeDriver: true
263
+ })]).start();
264
+ }, [viewFade, viewScale]);
265
+ const cycleViewMode = (0, _react.useCallback)(() => {
266
+ (0, _index2.triggerHaptic)('selection');
267
+ _reactNative.Animated.sequence([_reactNative.Animated.timing(headerScale, {
268
+ toValue: 0.96,
269
+ duration: 80,
270
+ useNativeDriver: true
271
+ }), _reactNative.Animated.timing(headerScale, {
272
+ toValue: 1,
273
+ duration: 100,
274
+ useNativeDriver: true
275
+ })]).start();
276
+ setViewMode(prev => {
277
+ if (prev === 'days') return 'years';
278
+ if (prev === 'years') return 'decades';
279
+ return 'years';
280
+ });
281
+ animateViewTransition();
282
+ }, [animateViewTransition, headerScale]);
283
+ const pickYear = (0, _react.useCallback)(year => {
284
+ (0, _index2.triggerHaptic)('selection');
285
+ setAnchor(prev => new Date(year, prev.getMonth(), 1));
286
+ setViewMode('days');
287
+ animateViewTransition();
288
+ }, [animateViewTransition]);
289
+ const pickDecade = (0, _react.useCallback)(decadeStart => {
290
+ (0, _index2.triggerHaptic)('selection');
291
+ // Anchor mid-decade so the year grid centers nicely on this decade.
292
+ setAnchor(prev => new Date(decadeStart + 4, prev.getMonth(), 1));
293
+ setViewMode('years');
294
+ animateViewTransition();
295
+ }, [animateViewTransition]);
296
+ const pressDay = (0, _react.useCallback)(cell => {
297
+ if (isDisabled(cell.date)) return;
298
+ (0, _index2.triggerHaptic)('selection');
299
+ setPendingDate(cell.date);
300
+ if (!cell.inMonth) {
301
+ setAnchor(new Date(cell.date.getFullYear(), cell.date.getMonth(), 1));
302
+ }
303
+ selectScale.setValue(0.7);
304
+ _reactNative.Animated.spring(selectScale, {
305
+ toValue: 1,
306
+ damping: theme.motion.spring.bouncy.damping,
307
+ stiffness: theme.motion.spring.bouncy.stiffness,
308
+ mass: theme.motion.spring.bouncy.mass,
309
+ useNativeDriver: true
310
+ }).start();
311
+ }, [isDisabled, selectScale, theme.motion.spring.bouncy]);
312
+ const handleClose = (0, _react.useCallback)(() => {
313
+ if (mode !== 'modal') {
314
+ onClose();
315
+ return;
316
+ }
317
+ _reactNative.Animated.parallel([_reactNative.Animated.timing(backdrop, {
318
+ toValue: 0,
319
+ duration: theme.motion.duration.fast,
320
+ easing: _reactNative.Easing.in(_reactNative.Easing.cubic),
321
+ useNativeDriver: true
322
+ }), _reactNative.Animated.timing(sheet, {
323
+ toValue: 0,
324
+ duration: theme.motion.duration.fast,
325
+ easing: _reactNative.Easing.in(_reactNative.Easing.cubic),
326
+ useNativeDriver: true
327
+ })]).start(() => {
328
+ onClose();
329
+ });
330
+ }, [backdrop, mode, onClose, sheet, theme.motion.duration.fast]);
331
+ const handleCancel = (0, _react.useCallback)(() => {
332
+ (0, _index2.triggerHaptic)('selection');
333
+ handleClose();
334
+ }, [handleClose]);
335
+ const handleConfirm = (0, _react.useCallback)(() => {
336
+ if (!pendingDate) return;
337
+ (0, _index2.triggerHaptic)('notificationSuccess');
338
+ onSelect(pendingDate);
339
+ handleClose();
340
+ }, [handleClose, onSelect, pendingDate]);
341
+ const sheetTranslate = sheet.interpolate({
342
+ inputRange: [0, 1],
343
+ outputRange: [320, 0]
344
+ });
345
+ const calendar = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
346
+ style: [styles.card, style],
347
+ accessibilityRole: mode === 'modal' ? undefined : 'none',
348
+ accessible: false,
349
+ testID: testID,
350
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
351
+ style: styles.titleRow,
352
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
353
+ style: styles.title,
354
+ accessibilityRole: "header",
355
+ children: title
356
+ })
357
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
358
+ style: styles.headerRow,
359
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
360
+ onPress: goPrev,
361
+ style: ({
362
+ pressed
363
+ }) => [styles.navBtn, pressed && styles.navBtnPressed],
364
+ accessibilityRole: "button",
365
+ accessibilityLabel: viewMode === 'days' ? 'Previous month' : viewMode === 'years' ? 'Previous years' : 'Previous decades',
366
+ hitSlop: 8,
367
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
368
+ style: styles.navText,
369
+ children: '‹'
370
+ })
371
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
372
+ onPress: cycleViewMode,
373
+ style: styles.headerLabelWrap,
374
+ accessibilityRole: "button",
375
+ accessibilityLabel: viewMode === 'days' ? `${headerLabel}, switch to year selection` : viewMode === 'years' ? `${headerLabel}, switch to decade selection` : `${headerLabel}, switch to year selection`,
376
+ hitSlop: 8,
377
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
378
+ style: [styles.headerLabelInner, {
379
+ transform: [{
380
+ scale: headerScale
381
+ }],
382
+ opacity: viewMode === 'days' ? monthFade : 1
383
+ }],
384
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.Text, {
385
+ style: [styles.headerLabel, viewMode === 'days' ? {
386
+ transform: [{
387
+ translateX: monthSlide
388
+ }]
389
+ } : null],
390
+ accessibilityLiveRegion: "polite",
391
+ children: headerLabel
392
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
393
+ style: styles.headerCaret,
394
+ allowFontScaling: false,
395
+ children: ' ▾'
396
+ })]
397
+ })
398
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
399
+ onPress: goNext,
400
+ style: ({
401
+ pressed
402
+ }) => [styles.navBtn, pressed && styles.navBtnPressed],
403
+ accessibilityRole: "button",
404
+ accessibilityLabel: viewMode === 'days' ? 'Next month' : viewMode === 'years' ? 'Next years' : 'Next decades',
405
+ hitSlop: 8,
406
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
407
+ style: styles.navText,
408
+ children: '›'
409
+ })
410
+ })]
411
+ }), viewMode === 'days' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
412
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
413
+ style: styles.weekdayRow,
414
+ children: weekdays.map((wd, idx) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
415
+ style: styles.weekdayCell,
416
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
417
+ style: styles.weekdayText,
418
+ children: wd
419
+ })
420
+ }, `${wd}-${idx}`))
421
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
422
+ style: [styles.grid, {
423
+ opacity: monthFade,
424
+ transform: [{
425
+ translateX: monthSlide
426
+ }]
427
+ }],
428
+ children: Array.from({
429
+ length: 6
430
+ }).map((_, row) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
431
+ style: styles.gridRow,
432
+ children: cells.slice(row * 7, row * 7 + 7).map(cell => {
433
+ const disabled = isDisabled(cell.date);
434
+ const selected = pendingDate ? isSameDay(cell.date, pendingDate) : false;
435
+ const todayCell = isSameDay(cell.date, today);
436
+ const cellBg = selected ? theme.colors.primary : todayCell ? 'transparent' : 'transparent';
437
+ const borderColor = todayCell && !selected ? theme.colors.primary : 'transparent';
438
+ const textColor = selected ? theme.colors.text.inverse : !cell.inMonth ? theme.colors.text.tertiary : disabled ? theme.colors.text.disabled : theme.colors.text.primary;
439
+ const opacity = disabled ? 0.3 : !cell.inMonth ? 0.4 : 1;
440
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
441
+ disabled: disabled,
442
+ onPress: () => pressDay(cell),
443
+ accessibilityRole: "button",
444
+ accessibilityLabel: formatLongDate(cell.date, locale),
445
+ accessibilityState: {
446
+ selected,
447
+ disabled
448
+ },
449
+ style: styles.dayCell,
450
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
451
+ style: [styles.dayInner, {
452
+ backgroundColor: cellBg,
453
+ borderColor,
454
+ borderWidth: todayCell && !selected ? 1.5 : 0,
455
+ opacity,
456
+ transform: selected ? [{
457
+ scale: selectScale
458
+ }] : undefined
459
+ }],
460
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
461
+ style: [styles.dayText, {
462
+ color: textColor
463
+ }],
464
+ children: cell.date.getDate()
465
+ })
466
+ })
467
+ }, cell.iso);
468
+ })
469
+ }, `r-${row}`))
470
+ })]
471
+ }) : viewMode === 'years' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
472
+ style: [styles.yearGrid, {
473
+ opacity: viewFade,
474
+ transform: [{
475
+ scale: viewScale
476
+ }]
477
+ }],
478
+ children: Array.from({
479
+ length: 3
480
+ }).map((_, row) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
481
+ style: styles.gridRow,
482
+ children: yearCells.slice(row * 4, row * 4 + 4).map(year => {
483
+ const disabled = isYearDisabled(year);
484
+ const selected = pendingDate ? pendingDate.getFullYear() === year : false;
485
+ const isToday = today.getFullYear() === year;
486
+ const cellBg = selected ? theme.colors.primary : 'transparent';
487
+ const borderColor = isToday && !selected ? theme.colors.primary : 'transparent';
488
+ const textColor = selected ? theme.colors.text.inverse : disabled ? theme.colors.text.disabled : theme.colors.text.primary;
489
+ const opacity = disabled ? 0.3 : 1;
490
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
491
+ disabled: disabled,
492
+ onPress: () => pickYear(year),
493
+ accessibilityRole: "button",
494
+ accessibilityLabel: `Year ${year}`,
495
+ accessibilityState: {
496
+ selected,
497
+ disabled
498
+ },
499
+ style: styles.yearCell,
500
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
501
+ style: [styles.yearInner, {
502
+ backgroundColor: cellBg,
503
+ borderColor,
504
+ borderWidth: isToday && !selected ? 1.5 : 0,
505
+ opacity
506
+ }],
507
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
508
+ style: [styles.yearText, {
509
+ color: textColor
510
+ }],
511
+ children: year
512
+ })
513
+ })
514
+ }, `year-${year}`);
515
+ })
516
+ }, `yr-${row}`))
517
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
518
+ style: [styles.yearGrid, {
519
+ opacity: viewFade,
520
+ transform: [{
521
+ scale: viewScale
522
+ }]
523
+ }],
524
+ children: Array.from({
525
+ length: 3
526
+ }).map((_, row) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
527
+ style: styles.gridRow,
528
+ children: decadeCells.slice(row * 4, row * 4 + 4).map(decadeStart => {
529
+ const decadeEnd = decadeStart + DECADE_SPAN - 1;
530
+ const disabled = isDecadeDisabled(decadeStart);
531
+ const selected = pendingDate ? decadeStartFor(pendingDate.getFullYear()) === decadeStart : false;
532
+ const isCurrent = decadeStartFor(today.getFullYear()) === decadeStart;
533
+ const cellBg = selected ? theme.colors.primary : 'transparent';
534
+ const borderColor = isCurrent && !selected ? theme.colors.primary : 'transparent';
535
+ const textColor = selected ? theme.colors.text.inverse : disabled ? theme.colors.text.disabled : theme.colors.text.primary;
536
+ const opacity = disabled ? 0.3 : 1;
537
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
538
+ disabled: disabled,
539
+ onPress: () => pickDecade(decadeStart),
540
+ accessibilityRole: "button",
541
+ accessibilityLabel: `Decade ${decadeStart} to ${decadeEnd}`,
542
+ accessibilityState: {
543
+ selected,
544
+ disabled
545
+ },
546
+ style: styles.yearCell,
547
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
548
+ style: [styles.yearInner, {
549
+ backgroundColor: cellBg,
550
+ borderColor,
551
+ borderWidth: isCurrent && !selected ? 1.5 : 0,
552
+ opacity
553
+ }],
554
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
555
+ style: [styles.yearText, {
556
+ color: textColor
557
+ }],
558
+ children: `${decadeStart}s`
559
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
560
+ style: [styles.decadeRangeText, {
561
+ color: selected ? theme.colors.text.inverse : theme.colors.text.tertiary
562
+ }],
563
+ children: `${decadeStart}-${decadeEnd}`
564
+ })]
565
+ })
566
+ }, `decade-${decadeStart}`);
567
+ })
568
+ }, `dec-${row}`))
569
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
570
+ style: styles.footer,
571
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
572
+ onPress: handleCancel,
573
+ style: ({
574
+ pressed
575
+ }) => [styles.footerBtn, styles.footerCancel, pressed && styles.footerBtnPressed],
576
+ accessibilityRole: "button",
577
+ accessibilityLabel: cancelLabel,
578
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
579
+ style: [styles.footerBtnText, {
580
+ color: theme.colors.text.secondary
581
+ }],
582
+ children: cancelLabel
583
+ })
584
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
585
+ onPress: handleConfirm,
586
+ disabled: !pendingDate,
587
+ style: ({
588
+ pressed
589
+ }) => [styles.footerBtn, styles.footerConfirm, {
590
+ backgroundColor: theme.colors.primary,
591
+ opacity: !pendingDate ? 0.5 : 1
592
+ }, pressed && {
593
+ backgroundColor: theme.colors.primaryHover
594
+ }],
595
+ accessibilityRole: "button",
596
+ accessibilityLabel: confirmLabel,
597
+ accessibilityState: {
598
+ disabled: !pendingDate
599
+ },
600
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
601
+ style: [styles.footerBtnText, {
602
+ color: theme.colors.text.inverse
603
+ }],
604
+ children: confirmLabel
605
+ })
606
+ })]
607
+ })]
608
+ });
609
+ if (mode === 'inline') {
610
+ if (!visible) return null;
611
+ return calendar;
612
+ }
613
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Modal, {
614
+ visible: visible,
615
+ transparent: true,
616
+ statusBarTranslucent: true,
617
+ animationType: "none",
618
+ onRequestClose: handleClose,
619
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
620
+ style: [styles.backdrop, {
621
+ opacity: backdrop,
622
+ backgroundColor: theme.colors.background.overlay
623
+ }],
624
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
625
+ style: _reactNative.StyleSheet.absoluteFill,
626
+ onPress: handleClose,
627
+ accessibilityLabel: "Dismiss"
628
+ })
629
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
630
+ style: [styles.sheetWrap, {
631
+ opacity: sheet,
632
+ transform: [{
633
+ translateY: sheetTranslate
634
+ }]
635
+ }],
636
+ accessibilityViewIsModal: true,
637
+ accessibilityRole: "none",
638
+ children: calendar
639
+ })]
640
+ });
641
+ };
642
+ exports.DatePicker = DatePicker;
643
+ const buildStyles = theme => {
644
+ const cardShadow = theme.shadows.lg;
645
+ return _reactNative.StyleSheet.create({
646
+ backdrop: {
647
+ ..._reactNative.StyleSheet.absoluteFillObject
648
+ },
649
+ sheetWrap: {
650
+ position: 'absolute',
651
+ left: 0,
652
+ right: 0,
653
+ bottom: 0,
654
+ paddingHorizontal: theme.spacing.md,
655
+ paddingBottom: theme.spacing.lg
656
+ },
657
+ card: {
658
+ backgroundColor: theme.colors.background.elevated,
659
+ borderRadius: theme.radius.xl,
660
+ padding: theme.spacing.lg,
661
+ shadowColor: cardShadow.shadowColor,
662
+ shadowOffset: cardShadow.shadowOffset,
663
+ shadowOpacity: cardShadow.shadowOpacity,
664
+ shadowRadius: cardShadow.shadowRadius,
665
+ elevation: cardShadow.elevation
666
+ },
667
+ titleRow: {
668
+ marginBottom: theme.spacing.sm
669
+ },
670
+ title: {
671
+ fontSize: theme.typography.fontSize.lg,
672
+ fontWeight: theme.typography.fontWeight.semibold,
673
+ color: theme.colors.text.primary
674
+ },
675
+ headerRow: {
676
+ flexDirection: 'row',
677
+ alignItems: 'center',
678
+ justifyContent: 'space-between',
679
+ marginBottom: theme.spacing.md
680
+ },
681
+ navBtn: {
682
+ width: 36,
683
+ height: 36,
684
+ borderRadius: theme.radius.full,
685
+ alignItems: 'center',
686
+ justifyContent: 'center',
687
+ backgroundColor: theme.colors.background.secondary
688
+ },
689
+ navBtnPressed: {
690
+ backgroundColor: theme.colors.surface.pressed
691
+ },
692
+ navText: {
693
+ fontSize: 22,
694
+ lineHeight: 24,
695
+ color: theme.colors.text.primary,
696
+ fontWeight: theme.typography.fontWeight.semibold
697
+ },
698
+ headerLabelWrap: {
699
+ flex: 1,
700
+ alignItems: 'center'
701
+ },
702
+ headerLabelInner: {
703
+ flexDirection: 'row',
704
+ alignItems: 'center',
705
+ justifyContent: 'center'
706
+ },
707
+ headerLabel: {
708
+ fontSize: theme.typography.fontSize.base,
709
+ fontWeight: theme.typography.fontWeight.semibold,
710
+ color: theme.colors.text.primary
711
+ },
712
+ headerCaret: {
713
+ fontSize: theme.typography.fontSize.sm,
714
+ color: theme.colors.text.secondary,
715
+ fontWeight: theme.typography.fontWeight.semibold
716
+ },
717
+ weekdayRow: {
718
+ flexDirection: 'row',
719
+ marginBottom: theme.spacing.xs
720
+ },
721
+ weekdayCell: {
722
+ flex: 1,
723
+ alignItems: 'center',
724
+ paddingVertical: theme.spacing.xs
725
+ },
726
+ weekdayText: {
727
+ fontSize: theme.typography.fontSize.xs,
728
+ fontWeight: theme.typography.fontWeight.medium,
729
+ color: theme.colors.text.tertiary,
730
+ letterSpacing: theme.typography.letterSpacing.wide
731
+ },
732
+ grid: {
733
+ // Animated container; rows are children.
734
+ },
735
+ gridRow: {
736
+ flexDirection: 'row'
737
+ },
738
+ dayCell: {
739
+ flex: 1,
740
+ aspectRatio: 1,
741
+ alignItems: 'center',
742
+ justifyContent: 'center',
743
+ padding: 2
744
+ },
745
+ dayInner: {
746
+ width: '100%',
747
+ height: '100%',
748
+ borderRadius: theme.radius.full,
749
+ alignItems: 'center',
750
+ justifyContent: 'center'
751
+ },
752
+ dayText: {
753
+ fontSize: theme.typography.fontSize.sm,
754
+ fontWeight: theme.typography.fontWeight.medium
755
+ },
756
+ yearGrid: {
757
+ // Animated container; rows are children.
758
+ },
759
+ yearCell: {
760
+ flex: 1,
761
+ aspectRatio: 1.6,
762
+ alignItems: 'center',
763
+ justifyContent: 'center',
764
+ padding: 4
765
+ },
766
+ yearInner: {
767
+ width: '100%',
768
+ height: '100%',
769
+ borderRadius: theme.radius.lg,
770
+ alignItems: 'center',
771
+ justifyContent: 'center'
772
+ },
773
+ yearText: {
774
+ fontSize: theme.typography.fontSize.base,
775
+ fontWeight: theme.typography.fontWeight.semibold
776
+ },
777
+ decadeRangeText: {
778
+ fontSize: theme.typography.fontSize.xs,
779
+ fontWeight: theme.typography.fontWeight.medium,
780
+ marginTop: 2
781
+ },
782
+ footer: {
783
+ flexDirection: 'row',
784
+ justifyContent: 'flex-end',
785
+ alignItems: 'center',
786
+ marginTop: theme.spacing.lg,
787
+ gap: theme.spacing.sm
788
+ },
789
+ footerBtn: {
790
+ paddingHorizontal: theme.spacing.lg,
791
+ paddingVertical: theme.spacing.sm,
792
+ borderRadius: theme.radius.md,
793
+ minHeight: 40,
794
+ alignItems: 'center',
795
+ justifyContent: 'center'
796
+ },
797
+ footerCancel: {
798
+ backgroundColor: 'transparent'
799
+ },
800
+ footerConfirm: {
801
+ // backgroundColor set inline from theme.
802
+ },
803
+ footerBtnPressed: {
804
+ opacity: 0.85
805
+ },
806
+ footerBtnText: {
807
+ fontSize: theme.typography.fontSize.sm,
808
+ fontWeight: theme.typography.fontWeight.semibold
809
+ }
810
+ });
811
+ };
812
+ var _default = exports.default = DatePicker;
813
+ //# sourceMappingURL=DatePicker.js.map