@oxy.so/bloom 4.32.0 → 4.34.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 (609) hide show
  1. package/docs/adoption-matrix.mdx +5 -4
  2. package/docs/date-picker.mdx +15 -28
  3. package/docs/locale.mdx +50 -0
  4. package/docs/provider.mdx +11 -0
  5. package/lib/commonjs/activity-feed/ActivityFeed.js +7 -4
  6. package/lib/commonjs/activity-feed/ActivityFeed.js.map +1 -1
  7. package/lib/commonjs/alert-dialog/AlertDialog.js +4 -1
  8. package/lib/commonjs/alert-dialog/AlertDialog.js.map +1 -1
  9. package/lib/commonjs/announcement/Announcement.js +5 -4
  10. package/lib/commonjs/announcement/Announcement.js.map +1 -1
  11. package/lib/commonjs/app-shell/ProOfferCard.js +5 -4
  12. package/lib/commonjs/app-shell/ProOfferCard.js.map +1 -1
  13. package/lib/commonjs/calendar/shared.js +5 -11
  14. package/lib/commonjs/calendar/shared.js.map +1 -1
  15. package/lib/commonjs/chart-cards/medical-parts.js +6 -2
  16. package/lib/commonjs/chart-cards/medical-parts.js.map +1 -1
  17. package/lib/commonjs/chat-composer/ComposerBanner.js +5 -3
  18. package/lib/commonjs/chat-composer/ComposerBanner.js.map +1 -1
  19. package/lib/commonjs/chat-list/ChatSearchField.js +4 -1
  20. package/lib/commonjs/chat-list/ChatSearchField.js.map +1 -1
  21. package/lib/commonjs/composer-panel/ComposerPopover.js +3 -1
  22. package/lib/commonjs/composer-panel/ComposerPopover.js.map +1 -1
  23. package/lib/commonjs/data-table/DataTableRowActions.js +6 -4
  24. package/lib/commonjs/data-table/DataTableRowActions.js.map +1 -1
  25. package/lib/commonjs/data-table/DataTableSearch.js +5 -3
  26. package/lib/commonjs/data-table/DataTableSearch.js.map +1 -1
  27. package/lib/commonjs/date-picker/Calendar.js +11 -2
  28. package/lib/commonjs/date-picker/Calendar.js.map +1 -1
  29. package/lib/commonjs/date-picker/CalendarMonth.js +4 -3
  30. package/lib/commonjs/date-picker/CalendarMonth.js.map +1 -1
  31. package/lib/commonjs/date-picker/DatePicker.js +13 -4
  32. package/lib/commonjs/date-picker/DatePicker.js.map +1 -1
  33. package/lib/commonjs/date-picker/DateRangePicker.js +17 -13
  34. package/lib/commonjs/date-picker/DateRangePicker.js.map +1 -1
  35. package/lib/commonjs/date-picker/MeetingScheduler.js +18 -13
  36. package/lib/commonjs/date-picker/MeetingScheduler.js.map +1 -1
  37. package/lib/commonjs/date-picker/PickerShell.js +5 -5
  38. package/lib/commonjs/date-picker/PickerShell.js.map +1 -1
  39. package/lib/commonjs/date-picker/calendar-grid.js +7 -21
  40. package/lib/commonjs/date-picker/calendar-grid.js.map +1 -1
  41. package/lib/commonjs/date-picker/messages.js +526 -0
  42. package/lib/commonjs/date-picker/messages.js.map +1 -0
  43. package/lib/commonjs/dialog/DialogHeader.js +12 -7
  44. package/lib/commonjs/dialog/DialogHeader.js.map +1 -1
  45. package/lib/commonjs/dialog/SheetShell.js +4 -2
  46. package/lib/commonjs/dialog/SheetShell.js.map +1 -1
  47. package/lib/commonjs/dropdown-menu/DropdownMenu.js +4 -1
  48. package/lib/commonjs/dropdown-menu/DropdownMenu.js.map +1 -1
  49. package/lib/commonjs/dropdown-menu/DropdownMenu.web.js +4 -1
  50. package/lib/commonjs/dropdown-menu/DropdownMenu.web.js.map +1 -1
  51. package/lib/commonjs/floating/FloatingPanel.js +3 -1
  52. package/lib/commonjs/floating/FloatingPanel.js.map +1 -1
  53. package/lib/commonjs/home-search/HomeSearchBar.js +5 -4
  54. package/lib/commonjs/home-search/HomeSearchBar.js.map +1 -1
  55. package/lib/commonjs/home-search/SavedSearchCard.js +7 -5
  56. package/lib/commonjs/home-search/SavedSearchCard.js.map +1 -1
  57. package/lib/commonjs/index.js +1063 -1034
  58. package/lib/commonjs/index.js.map +1 -1
  59. package/lib/commonjs/index.web.js +1063 -1034
  60. package/lib/commonjs/index.web.js.map +1 -1
  61. package/lib/commonjs/listing-card/ListingCard.js +5 -5
  62. package/lib/commonjs/listing-card/ListingCard.js.map +1 -1
  63. package/lib/commonjs/listing-details/ReviewCard.js +7 -5
  64. package/lib/commonjs/listing-details/ReviewCard.js.map +1 -1
  65. package/lib/commonjs/listing-editor/ListingQualityMeter.js +5 -4
  66. package/lib/commonjs/listing-editor/ListingQualityMeter.js.map +1 -1
  67. package/lib/commonjs/locale/common-messages.js +517 -0
  68. package/lib/commonjs/locale/common-messages.js.map +1 -0
  69. package/lib/commonjs/locale/context.js +35 -0
  70. package/lib/commonjs/locale/context.js.map +1 -0
  71. package/lib/commonjs/locale/format-date.js +34 -0
  72. package/lib/commonjs/locale/format-date.js.map +1 -0
  73. package/lib/commonjs/locale/index.js +32 -0
  74. package/lib/commonjs/locale/index.js.map +1 -0
  75. package/lib/commonjs/locale/languages.js +35 -0
  76. package/lib/commonjs/locale/languages.js.map +1 -0
  77. package/lib/commonjs/locale/messages.js +34 -0
  78. package/lib/commonjs/locale/messages.js.map +1 -0
  79. package/lib/commonjs/locale/plural.js +53 -0
  80. package/lib/commonjs/locale/plural.js.map +1 -0
  81. package/lib/commonjs/map-marker/MapListingPreview.js +7 -5
  82. package/lib/commonjs/map-marker/MapListingPreview.js.map +1 -1
  83. package/lib/commonjs/media-card/FriendActivityCard.js +3 -1
  84. package/lib/commonjs/media-card/FriendActivityCard.js.map +1 -1
  85. package/lib/commonjs/media-card/GenreCard.js +3 -1
  86. package/lib/commonjs/media-card/GenreCard.js.map +1 -1
  87. package/lib/commonjs/media-card/MediaCard.js +3 -1
  88. package/lib/commonjs/media-card/MediaCard.js.map +1 -1
  89. package/lib/commonjs/media-card/QuickAccessTile.js +4 -3
  90. package/lib/commonjs/media-card/QuickAccessTile.js.map +1 -1
  91. package/lib/commonjs/media-card/RecapCard.js +4 -3
  92. package/lib/commonjs/media-card/RecapCard.js.map +1 -1
  93. package/lib/commonjs/media-card/parts.js +5 -2
  94. package/lib/commonjs/media-card/parts.js.map +1 -1
  95. package/lib/commonjs/media-header/MediaActionBar.js +5 -4
  96. package/lib/commonjs/media-header/MediaActionBar.js.map +1 -1
  97. package/lib/commonjs/media-header/PopularTracks.js +5 -4
  98. package/lib/commonjs/media-header/PopularTracks.js.map +1 -1
  99. package/lib/commonjs/media-header/parts.js +6 -2
  100. package/lib/commonjs/media-header/parts.js.map +1 -1
  101. package/lib/commonjs/media-shelf/Shelf.js +7 -4
  102. package/lib/commonjs/media-shelf/Shelf.js.map +1 -1
  103. package/lib/commonjs/media-shelf/ShelfSkeleton.js +5 -3
  104. package/lib/commonjs/media-shelf/ShelfSkeleton.js.map +1 -1
  105. package/lib/commonjs/menubar/Menubar.web.js +4 -1
  106. package/lib/commonjs/menubar/Menubar.web.js.map +1 -1
  107. package/lib/commonjs/message-media/FileMessage.js +5 -3
  108. package/lib/commonjs/message-media/FileMessage.js.map +1 -1
  109. package/lib/commonjs/message-media/parts.js +4 -1
  110. package/lib/commonjs/message-media/parts.js.map +1 -1
  111. package/lib/commonjs/music-library/SearchField.js +4 -1
  112. package/lib/commonjs/music-library/SearchField.js.map +1 -1
  113. package/lib/commonjs/overlay/Overlay.js +4 -1
  114. package/lib/commonjs/overlay/Overlay.js.map +1 -1
  115. package/lib/commonjs/page-header/PageHeader.js +5 -4
  116. package/lib/commonjs/page-header/PageHeader.js.map +1 -1
  117. package/lib/commonjs/pagination/Pagination.js +7 -5
  118. package/lib/commonjs/pagination/Pagination.js.map +1 -1
  119. package/lib/commonjs/place-card/PlaceCard.js +5 -5
  120. package/lib/commonjs/place-card/PlaceCard.js.map +1 -1
  121. package/lib/commonjs/place-reviews/PlaceReviewCard.js +7 -5
  122. package/lib/commonjs/place-reviews/PlaceReviewCard.js.map +1 -1
  123. package/lib/commonjs/place-reviews/WriteReviewPrompt.js +5 -3
  124. package/lib/commonjs/place-reviews/WriteReviewPrompt.js.map +1 -1
  125. package/lib/commonjs/provider/BloomProvider.js +18 -13
  126. package/lib/commonjs/provider/BloomProvider.js.map +1 -1
  127. package/lib/commonjs/recent-hires-card/RecentHiresCard.js +7 -5
  128. package/lib/commonjs/recent-hires-card/RecentHiresCard.js.map +1 -1
  129. package/lib/commonjs/settings-modal/SettingsModal.js +3 -1
  130. package/lib/commonjs/settings-modal/SettingsModal.js.map +1 -1
  131. package/lib/commonjs/sidebar/Sidebar.js +5 -4
  132. package/lib/commonjs/sidebar/Sidebar.js.map +1 -1
  133. package/lib/commonjs/stay-filters/AmenityFilter.js +6 -2
  134. package/lib/commonjs/stay-filters/AmenityFilter.js.map +1 -1
  135. package/lib/commonjs/stay-search/GuestPicker.js +5 -3
  136. package/lib/commonjs/stay-search/GuestPicker.js.map +1 -1
  137. package/lib/commonjs/stepper/Stepper.js +4 -1
  138. package/lib/commonjs/stepper/Stepper.js.map +1 -1
  139. package/lib/commonjs/toast/ToastContent.js +3 -1
  140. package/lib/commonjs/toast/ToastContent.js.map +1 -1
  141. package/lib/commonjs/vendor-card/VendorCard.js +3 -2
  142. package/lib/commonjs/vendor-card/VendorCard.js.map +1 -1
  143. package/lib/commonjs/wizard/WizardFooter.js +7 -5
  144. package/lib/commonjs/wizard/WizardFooter.js.map +1 -1
  145. package/lib/module/activity-feed/ActivityFeed.js +8 -3
  146. package/lib/module/activity-feed/ActivityFeed.js.map +1 -1
  147. package/lib/module/alert-dialog/AlertDialog.js +4 -1
  148. package/lib/module/alert-dialog/AlertDialog.js.map +1 -1
  149. package/lib/module/announcement/Announcement.js +6 -3
  150. package/lib/module/announcement/Announcement.js.map +1 -1
  151. package/lib/module/app-shell/ProOfferCard.js +6 -3
  152. package/lib/module/app-shell/ProOfferCard.js.map +1 -1
  153. package/lib/module/calendar/shared.js +5 -11
  154. package/lib/module/calendar/shared.js.map +1 -1
  155. package/lib/module/chart-cards/medical-parts.js +6 -2
  156. package/lib/module/chart-cards/medical-parts.js.map +1 -1
  157. package/lib/module/chat-composer/ComposerBanner.js +6 -2
  158. package/lib/module/chat-composer/ComposerBanner.js.map +1 -1
  159. package/lib/module/chat-list/ChatSearchField.js +6 -3
  160. package/lib/module/chat-list/ChatSearchField.js.map +1 -1
  161. package/lib/module/composer-panel/ComposerPopover.js +3 -1
  162. package/lib/module/composer-panel/ComposerPopover.js.map +1 -1
  163. package/lib/module/data-table/DataTableRowActions.js +7 -3
  164. package/lib/module/data-table/DataTableRowActions.js.map +1 -1
  165. package/lib/module/data-table/DataTableSearch.js +6 -2
  166. package/lib/module/data-table/DataTableSearch.js.map +1 -1
  167. package/lib/module/date-picker/Calendar.js +11 -2
  168. package/lib/module/date-picker/Calendar.js.map +1 -1
  169. package/lib/module/date-picker/CalendarMonth.js +4 -3
  170. package/lib/module/date-picker/CalendarMonth.js.map +1 -1
  171. package/lib/module/date-picker/DatePicker.js +13 -4
  172. package/lib/module/date-picker/DatePicker.js.map +1 -1
  173. package/lib/module/date-picker/DateRangePicker.js +17 -13
  174. package/lib/module/date-picker/DateRangePicker.js.map +1 -1
  175. package/lib/module/date-picker/MeetingScheduler.js +18 -13
  176. package/lib/module/date-picker/MeetingScheduler.js.map +1 -1
  177. package/lib/module/date-picker/PickerShell.js +6 -4
  178. package/lib/module/date-picker/PickerShell.js.map +1 -1
  179. package/lib/module/date-picker/calendar-grid.js +7 -21
  180. package/lib/module/date-picker/calendar-grid.js.map +1 -1
  181. package/lib/module/date-picker/messages.js +523 -0
  182. package/lib/module/date-picker/messages.js.map +1 -0
  183. package/lib/module/dialog/DialogHeader.js +12 -7
  184. package/lib/module/dialog/DialogHeader.js.map +1 -1
  185. package/lib/module/dialog/SheetShell.js +4 -2
  186. package/lib/module/dialog/SheetShell.js.map +1 -1
  187. package/lib/module/dropdown-menu/DropdownMenu.js +4 -1
  188. package/lib/module/dropdown-menu/DropdownMenu.js.map +1 -1
  189. package/lib/module/dropdown-menu/DropdownMenu.web.js +4 -1
  190. package/lib/module/dropdown-menu/DropdownMenu.web.js.map +1 -1
  191. package/lib/module/floating/FloatingPanel.js +3 -1
  192. package/lib/module/floating/FloatingPanel.js.map +1 -1
  193. package/lib/module/home-search/HomeSearchBar.js +6 -3
  194. package/lib/module/home-search/HomeSearchBar.js.map +1 -1
  195. package/lib/module/home-search/SavedSearchCard.js +8 -4
  196. package/lib/module/home-search/SavedSearchCard.js.map +1 -1
  197. package/lib/module/index.js +1 -0
  198. package/lib/module/index.js.map +1 -1
  199. package/lib/module/index.web.js +1 -0
  200. package/lib/module/index.web.js.map +1 -1
  201. package/lib/module/listing-card/ListingCard.js +6 -4
  202. package/lib/module/listing-card/ListingCard.js.map +1 -1
  203. package/lib/module/listing-details/ReviewCard.js +8 -4
  204. package/lib/module/listing-details/ReviewCard.js.map +1 -1
  205. package/lib/module/listing-editor/ListingQualityMeter.js +6 -3
  206. package/lib/module/listing-editor/ListingQualityMeter.js.map +1 -1
  207. package/lib/module/locale/common-messages.js +513 -0
  208. package/lib/module/locale/common-messages.js.map +1 -0
  209. package/lib/module/locale/context.js +30 -0
  210. package/lib/module/locale/context.js.map +1 -0
  211. package/lib/module/locale/format-date.js +30 -0
  212. package/lib/module/locale/format-date.js.map +1 -0
  213. package/lib/module/locale/index.js +7 -0
  214. package/lib/module/locale/index.js.map +1 -0
  215. package/lib/module/locale/languages.js +29 -0
  216. package/lib/module/locale/languages.js.map +1 -0
  217. package/lib/module/locale/messages.js +30 -0
  218. package/lib/module/locale/messages.js.map +1 -0
  219. package/lib/module/locale/plural.js +48 -0
  220. package/lib/module/locale/plural.js.map +1 -0
  221. package/lib/module/map-marker/MapListingPreview.js +8 -4
  222. package/lib/module/map-marker/MapListingPreview.js.map +1 -1
  223. package/lib/module/media-card/FriendActivityCard.js +3 -1
  224. package/lib/module/media-card/FriendActivityCard.js.map +1 -1
  225. package/lib/module/media-card/GenreCard.js +3 -1
  226. package/lib/module/media-card/GenreCard.js.map +1 -1
  227. package/lib/module/media-card/MediaCard.js +5 -3
  228. package/lib/module/media-card/MediaCard.js.map +1 -1
  229. package/lib/module/media-card/QuickAccessTile.js +5 -2
  230. package/lib/module/media-card/QuickAccessTile.js.map +1 -1
  231. package/lib/module/media-card/RecapCard.js +5 -2
  232. package/lib/module/media-card/RecapCard.js.map +1 -1
  233. package/lib/module/media-card/parts.js +5 -2
  234. package/lib/module/media-card/parts.js.map +1 -1
  235. package/lib/module/media-header/MediaActionBar.js +6 -3
  236. package/lib/module/media-header/MediaActionBar.js.map +1 -1
  237. package/lib/module/media-header/PopularTracks.js +6 -3
  238. package/lib/module/media-header/PopularTracks.js.map +1 -1
  239. package/lib/module/media-header/parts.js +8 -3
  240. package/lib/module/media-header/parts.js.map +1 -1
  241. package/lib/module/media-shelf/Shelf.js +8 -3
  242. package/lib/module/media-shelf/Shelf.js.map +1 -1
  243. package/lib/module/media-shelf/ShelfSkeleton.js +6 -2
  244. package/lib/module/media-shelf/ShelfSkeleton.js.map +1 -1
  245. package/lib/module/menubar/Menubar.web.js +4 -1
  246. package/lib/module/menubar/Menubar.web.js.map +1 -1
  247. package/lib/module/message-media/FileMessage.js +6 -2
  248. package/lib/module/message-media/FileMessage.js.map +1 -1
  249. package/lib/module/message-media/parts.js +6 -2
  250. package/lib/module/message-media/parts.js.map +1 -1
  251. package/lib/module/music-library/SearchField.js +6 -3
  252. package/lib/module/music-library/SearchField.js.map +1 -1
  253. package/lib/module/overlay/Overlay.js +4 -1
  254. package/lib/module/overlay/Overlay.js.map +1 -1
  255. package/lib/module/page-header/PageHeader.js +6 -3
  256. package/lib/module/page-header/PageHeader.js.map +1 -1
  257. package/lib/module/pagination/Pagination.js +8 -4
  258. package/lib/module/pagination/Pagination.js.map +1 -1
  259. package/lib/module/place-card/PlaceCard.js +6 -4
  260. package/lib/module/place-card/PlaceCard.js.map +1 -1
  261. package/lib/module/place-reviews/PlaceReviewCard.js +8 -4
  262. package/lib/module/place-reviews/PlaceReviewCard.js.map +1 -1
  263. package/lib/module/place-reviews/WriteReviewPrompt.js +6 -2
  264. package/lib/module/place-reviews/WriteReviewPrompt.js.map +1 -1
  265. package/lib/module/provider/BloomProvider.js +16 -11
  266. package/lib/module/provider/BloomProvider.js.map +1 -1
  267. package/lib/module/recent-hires-card/RecentHiresCard.js +8 -4
  268. package/lib/module/recent-hires-card/RecentHiresCard.js.map +1 -1
  269. package/lib/module/settings-modal/SettingsModal.js +3 -1
  270. package/lib/module/settings-modal/SettingsModal.js.map +1 -1
  271. package/lib/module/sidebar/Sidebar.js +6 -3
  272. package/lib/module/sidebar/Sidebar.js.map +1 -1
  273. package/lib/module/stay-filters/AmenityFilter.js +8 -3
  274. package/lib/module/stay-filters/AmenityFilter.js.map +1 -1
  275. package/lib/module/stay-search/GuestPicker.js +6 -2
  276. package/lib/module/stay-search/GuestPicker.js.map +1 -1
  277. package/lib/module/stepper/Stepper.js +4 -1
  278. package/lib/module/stepper/Stepper.js.map +1 -1
  279. package/lib/module/toast/ToastContent.js +3 -1
  280. package/lib/module/toast/ToastContent.js.map +1 -1
  281. package/lib/module/vendor-card/VendorCard.js +5 -3
  282. package/lib/module/vendor-card/VendorCard.js.map +1 -1
  283. package/lib/module/wizard/WizardFooter.js +8 -4
  284. package/lib/module/wizard/WizardFooter.js.map +1 -1
  285. package/lib/typescript/commonjs/activity-feed/ActivityFeed.d.ts +1 -1
  286. package/lib/typescript/commonjs/activity-feed/ActivityFeed.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/alert-dialog/AlertDialog.d.ts +1 -1
  288. package/lib/typescript/commonjs/alert-dialog/AlertDialog.d.ts.map +1 -1
  289. package/lib/typescript/commonjs/alert-dialog/index.d.ts +1 -1
  290. package/lib/typescript/commonjs/alert-dialog/index.d.ts.map +1 -1
  291. package/lib/typescript/commonjs/alert-dialog/index.web.d.ts +1 -1
  292. package/lib/typescript/commonjs/alert-dialog/index.web.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/announcement/Announcement.d.ts +1 -1
  294. package/lib/typescript/commonjs/announcement/Announcement.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/app-shell/ProOfferCard.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/calendar/shared.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/chart-cards/medical-parts.d.ts +1 -1
  298. package/lib/typescript/commonjs/chart-cards/medical-parts.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/chat-composer/ComposerBanner.d.ts +1 -1
  300. package/lib/typescript/commonjs/chat-composer/ComposerBanner.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/chat-list/ChatSearchField.d.ts +1 -1
  302. package/lib/typescript/commonjs/chat-list/ChatSearchField.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/composer-panel/ComposerPopover.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/data-table/DataTableRowActions.d.ts +1 -1
  305. package/lib/typescript/commonjs/data-table/DataTableRowActions.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/data-table/DataTableSearch.d.ts +1 -1
  307. package/lib/typescript/commonjs/data-table/DataTableSearch.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/date-picker/Calendar.d.ts.map +1 -1
  309. package/lib/typescript/commonjs/date-picker/CalendarMonth.d.ts +5 -3
  310. package/lib/typescript/commonjs/date-picker/CalendarMonth.d.ts.map +1 -1
  311. package/lib/typescript/commonjs/date-picker/DatePicker.d.ts +1 -1
  312. package/lib/typescript/commonjs/date-picker/DatePicker.d.ts.map +1 -1
  313. package/lib/typescript/commonjs/date-picker/DateRangePicker.d.ts +1 -1
  314. package/lib/typescript/commonjs/date-picker/DateRangePicker.d.ts.map +1 -1
  315. package/lib/typescript/commonjs/date-picker/MeetingScheduler.d.ts +1 -1
  316. package/lib/typescript/commonjs/date-picker/MeetingScheduler.d.ts.map +1 -1
  317. package/lib/typescript/commonjs/date-picker/PickerShell.d.ts +3 -3
  318. package/lib/typescript/commonjs/date-picker/PickerShell.d.ts.map +1 -1
  319. package/lib/typescript/commonjs/date-picker/calendar-grid.d.ts +1 -2
  320. package/lib/typescript/commonjs/date-picker/calendar-grid.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/date-picker/messages.d.ts +31 -0
  322. package/lib/typescript/commonjs/date-picker/messages.d.ts.map +1 -0
  323. package/lib/typescript/commonjs/date-picker/types.d.ts +28 -24
  324. package/lib/typescript/commonjs/date-picker/types.d.ts.map +1 -1
  325. package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -1
  326. package/lib/typescript/commonjs/dialog/SheetShell.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/dropdown-menu/DropdownMenu.d.ts +1 -1
  328. package/lib/typescript/commonjs/dropdown-menu/DropdownMenu.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/dropdown-menu/DropdownMenu.web.d.ts +1 -1
  330. package/lib/typescript/commonjs/dropdown-menu/DropdownMenu.web.d.ts.map +1 -1
  331. package/lib/typescript/commonjs/floating/FloatingPanel.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/home-search/HomeSearchBar.d.ts +1 -1
  333. package/lib/typescript/commonjs/home-search/HomeSearchBar.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/home-search/SavedSearchCard.d.ts +1 -1
  335. package/lib/typescript/commonjs/home-search/SavedSearchCard.d.ts.map +1 -1
  336. package/lib/typescript/commonjs/index.d.ts +2 -0
  337. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/index.web.d.ts +2 -0
  339. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  340. package/lib/typescript/commonjs/listing-card/ListingCard.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/listing-details/ReviewCard.d.ts +1 -1
  342. package/lib/typescript/commonjs/listing-details/ReviewCard.d.ts.map +1 -1
  343. package/lib/typescript/commonjs/listing-editor/ListingQualityMeter.d.ts +1 -1
  344. package/lib/typescript/commonjs/listing-editor/ListingQualityMeter.d.ts.map +1 -1
  345. package/lib/typescript/commonjs/locale/common-messages.d.ts +54 -0
  346. package/lib/typescript/commonjs/locale/common-messages.d.ts.map +1 -0
  347. package/lib/typescript/commonjs/locale/context.d.ts +18 -0
  348. package/lib/typescript/commonjs/locale/context.d.ts.map +1 -0
  349. package/lib/typescript/commonjs/locale/format-date.d.ts +13 -0
  350. package/lib/typescript/commonjs/locale/format-date.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/locale/index.d.ts +3 -0
  352. package/lib/typescript/commonjs/locale/index.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/locale/languages.d.ts +16 -0
  354. package/lib/typescript/commonjs/locale/languages.d.ts.map +1 -0
  355. package/lib/typescript/commonjs/locale/messages.d.ts +18 -0
  356. package/lib/typescript/commonjs/locale/messages.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/locale/plural.d.ts +19 -0
  358. package/lib/typescript/commonjs/locale/plural.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/map-marker/MapListingPreview.d.ts +1 -1
  360. package/lib/typescript/commonjs/map-marker/MapListingPreview.d.ts.map +1 -1
  361. package/lib/typescript/commonjs/media-card/FriendActivityCard.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/media-card/GenreCard.d.ts.map +1 -1
  363. package/lib/typescript/commonjs/media-card/MediaCard.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/media-card/QuickAccessTile.d.ts.map +1 -1
  365. package/lib/typescript/commonjs/media-card/RecapCard.d.ts.map +1 -1
  366. package/lib/typescript/commonjs/media-card/parts.d.ts +1 -1
  367. package/lib/typescript/commonjs/media-card/parts.d.ts.map +1 -1
  368. package/lib/typescript/commonjs/media-header/MediaActionBar.d.ts +1 -1
  369. package/lib/typescript/commonjs/media-header/MediaActionBar.d.ts.map +1 -1
  370. package/lib/typescript/commonjs/media-header/PopularTracks.d.ts +1 -1
  371. package/lib/typescript/commonjs/media-header/PopularTracks.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/media-header/parts.d.ts +1 -1
  373. package/lib/typescript/commonjs/media-header/parts.d.ts.map +1 -1
  374. package/lib/typescript/commonjs/media-shelf/Shelf.d.ts +1 -1
  375. package/lib/typescript/commonjs/media-shelf/Shelf.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/media-shelf/ShelfSkeleton.d.ts +1 -1
  377. package/lib/typescript/commonjs/media-shelf/ShelfSkeleton.d.ts.map +1 -1
  378. package/lib/typescript/commonjs/menubar/Menubar.web.d.ts +1 -1
  379. package/lib/typescript/commonjs/menubar/Menubar.web.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/message-media/FileMessage.d.ts +1 -1
  381. package/lib/typescript/commonjs/message-media/FileMessage.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/message-media/parts.d.ts.map +1 -1
  383. package/lib/typescript/commonjs/music-library/SearchField.d.ts +1 -1
  384. package/lib/typescript/commonjs/music-library/SearchField.d.ts.map +1 -1
  385. package/lib/typescript/commonjs/overlay/Overlay.d.ts.map +1 -1
  386. package/lib/typescript/commonjs/page-header/PageHeader.d.ts +1 -1
  387. package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
  388. package/lib/typescript/commonjs/pagination/Pagination.d.ts.map +1 -1
  389. package/lib/typescript/commonjs/place-card/PlaceCard.d.ts.map +1 -1
  390. package/lib/typescript/commonjs/place-reviews/PlaceReviewCard.d.ts +1 -1
  391. package/lib/typescript/commonjs/place-reviews/PlaceReviewCard.d.ts.map +1 -1
  392. package/lib/typescript/commonjs/place-reviews/WriteReviewPrompt.d.ts +1 -1
  393. package/lib/typescript/commonjs/place-reviews/WriteReviewPrompt.d.ts.map +1 -1
  394. package/lib/typescript/commonjs/provider/BloomProvider.d.ts +1 -1
  395. package/lib/typescript/commonjs/provider/BloomProvider.d.ts.map +1 -1
  396. package/lib/typescript/commonjs/provider/types.d.ts +6 -0
  397. package/lib/typescript/commonjs/provider/types.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/recent-hires-card/RecentHiresCard.d.ts.map +1 -1
  399. package/lib/typescript/commonjs/settings-modal/SettingsModal.d.ts.map +1 -1
  400. package/lib/typescript/commonjs/sidebar/Sidebar.d.ts.map +1 -1
  401. package/lib/typescript/commonjs/stay-filters/AmenityFilter.d.ts +1 -1
  402. package/lib/typescript/commonjs/stay-filters/AmenityFilter.d.ts.map +1 -1
  403. package/lib/typescript/commonjs/stay-search/GuestPicker.d.ts +1 -1
  404. package/lib/typescript/commonjs/stay-search/GuestPicker.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/stepper/Stepper.d.ts +1 -1
  406. package/lib/typescript/commonjs/stepper/Stepper.d.ts.map +1 -1
  407. package/lib/typescript/commonjs/toast/ToastContent.d.ts.map +1 -1
  408. package/lib/typescript/commonjs/vendor-card/VendorCard.d.ts.map +1 -1
  409. package/lib/typescript/commonjs/wizard/WizardFooter.d.ts +1 -1
  410. package/lib/typescript/commonjs/wizard/WizardFooter.d.ts.map +1 -1
  411. package/lib/typescript/module/activity-feed/ActivityFeed.d.ts +1 -1
  412. package/lib/typescript/module/activity-feed/ActivityFeed.d.ts.map +1 -1
  413. package/lib/typescript/module/alert-dialog/AlertDialog.d.ts +1 -1
  414. package/lib/typescript/module/alert-dialog/AlertDialog.d.ts.map +1 -1
  415. package/lib/typescript/module/alert-dialog/index.d.ts +1 -1
  416. package/lib/typescript/module/alert-dialog/index.d.ts.map +1 -1
  417. package/lib/typescript/module/alert-dialog/index.web.d.ts +1 -1
  418. package/lib/typescript/module/alert-dialog/index.web.d.ts.map +1 -1
  419. package/lib/typescript/module/announcement/Announcement.d.ts +1 -1
  420. package/lib/typescript/module/announcement/Announcement.d.ts.map +1 -1
  421. package/lib/typescript/module/app-shell/ProOfferCard.d.ts.map +1 -1
  422. package/lib/typescript/module/calendar/shared.d.ts.map +1 -1
  423. package/lib/typescript/module/chart-cards/medical-parts.d.ts +1 -1
  424. package/lib/typescript/module/chart-cards/medical-parts.d.ts.map +1 -1
  425. package/lib/typescript/module/chat-composer/ComposerBanner.d.ts +1 -1
  426. package/lib/typescript/module/chat-composer/ComposerBanner.d.ts.map +1 -1
  427. package/lib/typescript/module/chat-list/ChatSearchField.d.ts +1 -1
  428. package/lib/typescript/module/chat-list/ChatSearchField.d.ts.map +1 -1
  429. package/lib/typescript/module/composer-panel/ComposerPopover.d.ts.map +1 -1
  430. package/lib/typescript/module/data-table/DataTableRowActions.d.ts +1 -1
  431. package/lib/typescript/module/data-table/DataTableRowActions.d.ts.map +1 -1
  432. package/lib/typescript/module/data-table/DataTableSearch.d.ts +1 -1
  433. package/lib/typescript/module/data-table/DataTableSearch.d.ts.map +1 -1
  434. package/lib/typescript/module/date-picker/Calendar.d.ts.map +1 -1
  435. package/lib/typescript/module/date-picker/CalendarMonth.d.ts +5 -3
  436. package/lib/typescript/module/date-picker/CalendarMonth.d.ts.map +1 -1
  437. package/lib/typescript/module/date-picker/DatePicker.d.ts +1 -1
  438. package/lib/typescript/module/date-picker/DatePicker.d.ts.map +1 -1
  439. package/lib/typescript/module/date-picker/DateRangePicker.d.ts +1 -1
  440. package/lib/typescript/module/date-picker/DateRangePicker.d.ts.map +1 -1
  441. package/lib/typescript/module/date-picker/MeetingScheduler.d.ts +1 -1
  442. package/lib/typescript/module/date-picker/MeetingScheduler.d.ts.map +1 -1
  443. package/lib/typescript/module/date-picker/PickerShell.d.ts +3 -3
  444. package/lib/typescript/module/date-picker/PickerShell.d.ts.map +1 -1
  445. package/lib/typescript/module/date-picker/calendar-grid.d.ts +1 -2
  446. package/lib/typescript/module/date-picker/calendar-grid.d.ts.map +1 -1
  447. package/lib/typescript/module/date-picker/messages.d.ts +31 -0
  448. package/lib/typescript/module/date-picker/messages.d.ts.map +1 -0
  449. package/lib/typescript/module/date-picker/types.d.ts +28 -24
  450. package/lib/typescript/module/date-picker/types.d.ts.map +1 -1
  451. package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -1
  452. package/lib/typescript/module/dialog/SheetShell.d.ts.map +1 -1
  453. package/lib/typescript/module/dropdown-menu/DropdownMenu.d.ts +1 -1
  454. package/lib/typescript/module/dropdown-menu/DropdownMenu.d.ts.map +1 -1
  455. package/lib/typescript/module/dropdown-menu/DropdownMenu.web.d.ts +1 -1
  456. package/lib/typescript/module/dropdown-menu/DropdownMenu.web.d.ts.map +1 -1
  457. package/lib/typescript/module/floating/FloatingPanel.d.ts.map +1 -1
  458. package/lib/typescript/module/home-search/HomeSearchBar.d.ts +1 -1
  459. package/lib/typescript/module/home-search/HomeSearchBar.d.ts.map +1 -1
  460. package/lib/typescript/module/home-search/SavedSearchCard.d.ts +1 -1
  461. package/lib/typescript/module/home-search/SavedSearchCard.d.ts.map +1 -1
  462. package/lib/typescript/module/index.d.ts +2 -0
  463. package/lib/typescript/module/index.d.ts.map +1 -1
  464. package/lib/typescript/module/index.web.d.ts +2 -0
  465. package/lib/typescript/module/index.web.d.ts.map +1 -1
  466. package/lib/typescript/module/listing-card/ListingCard.d.ts.map +1 -1
  467. package/lib/typescript/module/listing-details/ReviewCard.d.ts +1 -1
  468. package/lib/typescript/module/listing-details/ReviewCard.d.ts.map +1 -1
  469. package/lib/typescript/module/listing-editor/ListingQualityMeter.d.ts +1 -1
  470. package/lib/typescript/module/listing-editor/ListingQualityMeter.d.ts.map +1 -1
  471. package/lib/typescript/module/locale/common-messages.d.ts +54 -0
  472. package/lib/typescript/module/locale/common-messages.d.ts.map +1 -0
  473. package/lib/typescript/module/locale/context.d.ts +18 -0
  474. package/lib/typescript/module/locale/context.d.ts.map +1 -0
  475. package/lib/typescript/module/locale/format-date.d.ts +13 -0
  476. package/lib/typescript/module/locale/format-date.d.ts.map +1 -0
  477. package/lib/typescript/module/locale/index.d.ts +3 -0
  478. package/lib/typescript/module/locale/index.d.ts.map +1 -0
  479. package/lib/typescript/module/locale/languages.d.ts +16 -0
  480. package/lib/typescript/module/locale/languages.d.ts.map +1 -0
  481. package/lib/typescript/module/locale/messages.d.ts +18 -0
  482. package/lib/typescript/module/locale/messages.d.ts.map +1 -0
  483. package/lib/typescript/module/locale/plural.d.ts +19 -0
  484. package/lib/typescript/module/locale/plural.d.ts.map +1 -0
  485. package/lib/typescript/module/map-marker/MapListingPreview.d.ts +1 -1
  486. package/lib/typescript/module/map-marker/MapListingPreview.d.ts.map +1 -1
  487. package/lib/typescript/module/media-card/FriendActivityCard.d.ts.map +1 -1
  488. package/lib/typescript/module/media-card/GenreCard.d.ts.map +1 -1
  489. package/lib/typescript/module/media-card/MediaCard.d.ts.map +1 -1
  490. package/lib/typescript/module/media-card/QuickAccessTile.d.ts.map +1 -1
  491. package/lib/typescript/module/media-card/RecapCard.d.ts.map +1 -1
  492. package/lib/typescript/module/media-card/parts.d.ts +1 -1
  493. package/lib/typescript/module/media-card/parts.d.ts.map +1 -1
  494. package/lib/typescript/module/media-header/MediaActionBar.d.ts +1 -1
  495. package/lib/typescript/module/media-header/MediaActionBar.d.ts.map +1 -1
  496. package/lib/typescript/module/media-header/PopularTracks.d.ts +1 -1
  497. package/lib/typescript/module/media-header/PopularTracks.d.ts.map +1 -1
  498. package/lib/typescript/module/media-header/parts.d.ts +1 -1
  499. package/lib/typescript/module/media-header/parts.d.ts.map +1 -1
  500. package/lib/typescript/module/media-shelf/Shelf.d.ts +1 -1
  501. package/lib/typescript/module/media-shelf/Shelf.d.ts.map +1 -1
  502. package/lib/typescript/module/media-shelf/ShelfSkeleton.d.ts +1 -1
  503. package/lib/typescript/module/media-shelf/ShelfSkeleton.d.ts.map +1 -1
  504. package/lib/typescript/module/menubar/Menubar.web.d.ts +1 -1
  505. package/lib/typescript/module/menubar/Menubar.web.d.ts.map +1 -1
  506. package/lib/typescript/module/message-media/FileMessage.d.ts +1 -1
  507. package/lib/typescript/module/message-media/FileMessage.d.ts.map +1 -1
  508. package/lib/typescript/module/message-media/parts.d.ts.map +1 -1
  509. package/lib/typescript/module/music-library/SearchField.d.ts +1 -1
  510. package/lib/typescript/module/music-library/SearchField.d.ts.map +1 -1
  511. package/lib/typescript/module/overlay/Overlay.d.ts.map +1 -1
  512. package/lib/typescript/module/page-header/PageHeader.d.ts +1 -1
  513. package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
  514. package/lib/typescript/module/pagination/Pagination.d.ts.map +1 -1
  515. package/lib/typescript/module/place-card/PlaceCard.d.ts.map +1 -1
  516. package/lib/typescript/module/place-reviews/PlaceReviewCard.d.ts +1 -1
  517. package/lib/typescript/module/place-reviews/PlaceReviewCard.d.ts.map +1 -1
  518. package/lib/typescript/module/place-reviews/WriteReviewPrompt.d.ts +1 -1
  519. package/lib/typescript/module/place-reviews/WriteReviewPrompt.d.ts.map +1 -1
  520. package/lib/typescript/module/provider/BloomProvider.d.ts +1 -1
  521. package/lib/typescript/module/provider/BloomProvider.d.ts.map +1 -1
  522. package/lib/typescript/module/provider/types.d.ts +6 -0
  523. package/lib/typescript/module/provider/types.d.ts.map +1 -1
  524. package/lib/typescript/module/recent-hires-card/RecentHiresCard.d.ts.map +1 -1
  525. package/lib/typescript/module/settings-modal/SettingsModal.d.ts.map +1 -1
  526. package/lib/typescript/module/sidebar/Sidebar.d.ts.map +1 -1
  527. package/lib/typescript/module/stay-filters/AmenityFilter.d.ts +1 -1
  528. package/lib/typescript/module/stay-filters/AmenityFilter.d.ts.map +1 -1
  529. package/lib/typescript/module/stay-search/GuestPicker.d.ts +1 -1
  530. package/lib/typescript/module/stay-search/GuestPicker.d.ts.map +1 -1
  531. package/lib/typescript/module/stepper/Stepper.d.ts +1 -1
  532. package/lib/typescript/module/stepper/Stepper.d.ts.map +1 -1
  533. package/lib/typescript/module/toast/ToastContent.d.ts.map +1 -1
  534. package/lib/typescript/module/vendor-card/VendorCard.d.ts.map +1 -1
  535. package/lib/typescript/module/wizard/WizardFooter.d.ts +1 -1
  536. package/lib/typescript/module/wizard/WizardFooter.d.ts.map +1 -1
  537. package/package.json +18 -1
  538. package/src/activity-feed/ActivityFeed.tsx +6 -2
  539. package/src/alert-dialog/AlertDialog.tsx +4 -1
  540. package/src/announcement/Announcement.tsx +4 -1
  541. package/src/app-shell/ProOfferCard.tsx +4 -1
  542. package/src/calendar/shared.ts +5 -12
  543. package/src/chart-cards/medical-parts.tsx +6 -2
  544. package/src/chat-composer/ComposerBanner.tsx +4 -1
  545. package/src/chat-list/ChatSearchField.tsx +4 -1
  546. package/src/composer-panel/ComposerPopover.tsx +3 -1
  547. package/src/data-table/DataTableRowActions.tsx +5 -2
  548. package/src/data-table/DataTableSearch.tsx +4 -1
  549. package/src/date-picker/Calendar.tsx +8 -2
  550. package/src/date-picker/CalendarMonth.tsx +8 -5
  551. package/src/date-picker/DatePicker.tsx +10 -4
  552. package/src/date-picker/DateRangePicker.tsx +14 -13
  553. package/src/date-picker/MeetingScheduler.tsx +17 -11
  554. package/src/date-picker/PickerShell.tsx +6 -5
  555. package/src/date-picker/calendar-grid.ts +16 -23
  556. package/src/date-picker/messages.ts +470 -0
  557. package/src/date-picker/types.ts +28 -24
  558. package/src/dialog/DialogHeader.tsx +12 -7
  559. package/src/dialog/SheetShell.tsx +4 -2
  560. package/src/dropdown-menu/DropdownMenu.tsx +4 -1
  561. package/src/dropdown-menu/DropdownMenu.web.tsx +4 -1
  562. package/src/floating/FloatingPanel.tsx +3 -1
  563. package/src/home-search/HomeSearchBar.tsx +4 -1
  564. package/src/home-search/SavedSearchCard.tsx +6 -2
  565. package/src/index.ts +2 -0
  566. package/src/index.web.ts +2 -0
  567. package/src/listing-card/ListingCard.tsx +4 -2
  568. package/src/listing-details/ReviewCard.tsx +6 -2
  569. package/src/listing-editor/ListingQualityMeter.tsx +4 -1
  570. package/src/locale/common-messages.ts +554 -0
  571. package/src/locale/context.ts +23 -0
  572. package/src/locale/format-date.ts +28 -0
  573. package/src/locale/index.ts +4 -0
  574. package/src/locale/languages.ts +45 -0
  575. package/src/locale/messages.ts +29 -0
  576. package/src/locale/plural.ts +53 -0
  577. package/src/map-marker/MapListingPreview.tsx +6 -2
  578. package/src/media-card/FriendActivityCard.tsx +3 -1
  579. package/src/media-card/GenreCard.tsx +3 -1
  580. package/src/media-card/MediaCard.tsx +3 -1
  581. package/src/media-card/QuickAccessTile.tsx +3 -1
  582. package/src/media-card/RecapCard.tsx +3 -1
  583. package/src/media-card/parts.tsx +5 -2
  584. package/src/media-header/MediaActionBar.tsx +4 -1
  585. package/src/media-header/PopularTracks.tsx +4 -1
  586. package/src/media-header/parts.tsx +6 -2
  587. package/src/media-shelf/Shelf.tsx +6 -2
  588. package/src/media-shelf/ShelfSkeleton.tsx +4 -1
  589. package/src/menubar/Menubar.web.tsx +4 -1
  590. package/src/message-media/FileMessage.tsx +4 -1
  591. package/src/message-media/parts.tsx +4 -1
  592. package/src/music-library/SearchField.tsx +4 -1
  593. package/src/overlay/Overlay.tsx +4 -1
  594. package/src/page-header/PageHeader.tsx +4 -1
  595. package/src/pagination/Pagination.tsx +6 -2
  596. package/src/place-card/PlaceCard.tsx +4 -2
  597. package/src/place-reviews/PlaceReviewCard.tsx +6 -2
  598. package/src/place-reviews/WriteReviewPrompt.tsx +4 -1
  599. package/src/provider/BloomProvider.tsx +39 -35
  600. package/src/provider/types.ts +6 -0
  601. package/src/recent-hires-card/RecentHiresCard.tsx +6 -2
  602. package/src/settings-modal/SettingsModal.tsx +3 -1
  603. package/src/sidebar/Sidebar.tsx +4 -1
  604. package/src/stay-filters/AmenityFilter.tsx +6 -2
  605. package/src/stay-search/GuestPicker.tsx +4 -1
  606. package/src/stepper/Stepper.tsx +4 -1
  607. package/src/toast/ToastContent.tsx +3 -1
  608. package/src/vendor-card/VendorCard.tsx +3 -1
  609. package/src/wizard/WizardFooter.tsx +6 -2
@@ -3,6 +3,7 @@ import { Platform, useWindowDimensions } from 'react-native';
3
3
 
4
4
  import { addDays, buildMonthGrid, isSameMonth, startOfDay } from '../date-picker/calendar-grid';
5
5
  import type { CalendarViewEvent } from './types';
6
+ import { formatGregorian } from '../locale/format-date';
6
7
 
7
8
  export const IS_WEB = Platform.OS === 'web';
8
9
 
@@ -95,18 +96,10 @@ export function currentGmtLabel(now: Date = new Date()): string {
95
96
  return `GMT${offset >= 0 ? '+' : ''}${offset}`;
96
97
  }
97
98
 
98
- function format(date: Date, locale: string | undefined, options: Intl.DateTimeFormatOptions): string | null {
99
- try {
100
- return new Intl.DateTimeFormat(locale, options).format(date);
101
- } catch {
102
- return null;
103
- }
104
- }
105
-
106
99
  /** `Tue, Aug 11` — the details panel's date line. */
107
100
  export function formatEventDate(date: Date, locale?: string): string {
108
101
  return (
109
- format(date, locale, {
102
+ formatGregorian(date, locale, {
110
103
  weekday: 'short',
111
104
  month: 'short',
112
105
  day: 'numeric',
@@ -116,7 +109,7 @@ export function formatEventDate(date: Date, locale?: string): string {
116
109
 
117
110
  /** `Aug` — the month switcher's label below `sm`. */
118
111
  export function formatShortMonth(date: Date, locale?: string): string {
119
- return format(date, locale, { month: 'short' }) ?? String(date.getMonth() + 1);
112
+ return formatGregorian(date, locale, { month: 'short' }) ?? String(date.getMonth() + 1);
120
113
  }
121
114
 
122
115
  /** `Sun` … `Sat` — the month grid's weekday pills. */
@@ -126,8 +119,8 @@ export function weekdayShortLabels(locale?: string): { short: string; long: stri
126
119
  return fallback.map((name, index) => {
127
120
  const date = addDays(sunday, index);
128
121
  return {
129
- short: format(date, locale, { weekday: 'short' }) ?? name,
130
- long: format(date, locale, { weekday: 'long' }) ?? name,
122
+ short: formatGregorian(date, locale, { weekday: 'short' }) ?? name,
123
+ long: formatGregorian(date, locale, { weekday: 'long' }) ?? name,
131
124
  };
132
125
  });
133
126
  }
@@ -11,6 +11,7 @@ import { TABULAR } from './primitives/ChartHeader';
11
11
  import { FadeOnChange } from './primitives/FadeOnChange';
12
12
  import { useChartCardPalette } from './primitives/use-chart-palette';
13
13
  import { useCountUp } from './use-count-up';
14
+ import { useCommonMessages } from '../locale/common-messages';
14
15
 
15
16
  /**
16
17
  * Chrome shared by the medical dashboard cards (`StepsCard`,
@@ -347,12 +348,15 @@ export function WeekRangePill({
347
348
  label,
348
349
  onPrev,
349
350
  onNext,
350
- prevLabel = 'Previous',
351
- nextLabel = 'Next',
351
+ prevLabel: prevLabelProp,
352
+ nextLabel: nextLabelProp,
352
353
  width = 151,
353
354
  style,
354
355
  testID,
355
356
  }: WeekRangePillProps) {
357
+ const common = useCommonMessages();
358
+ const prevLabel = prevLabelProp ?? common.previous;
359
+ const nextLabel = nextLabelProp ?? common.next;
356
360
  const palette = useChartCardPalette();
357
361
  const interactive = !!(onPrev || onNext);
358
362
  const noop = () => {};
@@ -23,6 +23,7 @@ import {
23
23
  resolveChatComposerPalette,
24
24
  } from './shared';
25
25
  import type { ComposerBannerProps } from './types';
26
+ import { useCommonMessages } from '../locale/common-messages';
26
27
 
27
28
  /** A URL passes through; a bare id goes to the app's `ImageResolver`. */
28
29
  function isUrl(value: string): boolean {
@@ -37,12 +38,14 @@ export function ComposerBanner({
37
38
  icon,
38
39
  accentColor,
39
40
  onClose,
40
- closeLabel = 'Cancel',
41
+ closeLabel: closeLabelProp,
41
42
  trailing,
42
43
  style,
43
44
  testID,
44
45
  accessibilityLabel,
45
46
  }: ComposerBannerProps) {
47
+ const common = useCommonMessages();
48
+ const closeLabel = closeLabelProp ?? common.cancel;
46
49
  const theme = useTheme();
47
50
  const palette = resolveChatComposerPalette(theme);
48
51
  const resolveImage = useImageResolver();
@@ -18,6 +18,7 @@ import {
18
18
  resolveChatListPaint,
19
19
  } from './shared';
20
20
  import type { ChatSearchFieldProps } from './types';
21
+ import { useCommonMessages } from '../locale/common-messages';
21
22
 
22
23
  /**
23
24
  * The search pill above the conversations.
@@ -66,7 +67,7 @@ function ChatSearchFieldComponent({
66
67
  onSubmit,
67
68
  onFocus,
68
69
  onBlur,
69
- placeholder = 'Search',
70
+ placeholder: placeholderProp,
70
71
  accessibilityLabel = 'Search chats',
71
72
  clearLabel = 'Clear search',
72
73
  trailing,
@@ -74,6 +75,8 @@ function ChatSearchFieldComponent({
74
75
  style,
75
76
  testID,
76
77
  }: ChatSearchFieldProps) {
78
+ const common = useCommonMessages();
79
+ const placeholder = placeholderProp ?? common.search;
77
80
  const theme = useTheme();
78
81
  useEffect(() => {
79
82
  adoptStyleSheet(CHAT_LIST_STYLE_ID, CHAT_LIST_CSS);
@@ -36,6 +36,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
36
36
 
37
37
  import { TRANSITION_MS } from './shared';
38
38
  import type { ComposerPopoverProps } from './types';
39
+ import { useCommonMessages } from '../locale/common-messages';
39
40
 
40
41
  const GUTTER = 8;
41
42
  const EASE_OUT = Easing.bezier(0, 0, 0.2, 1);
@@ -58,6 +59,7 @@ export function ComposerPopover({
58
59
  testID,
59
60
  children,
60
61
  }: ComposerPopoverProps) {
62
+ const common = useCommonMessages();
61
63
  const window = useWindowDimensions();
62
64
  const insets = useSafeAreaInsets();
63
65
  const reducedMotion = useReducedMotion();
@@ -136,7 +138,7 @@ export function ComposerPopover({
136
138
  style={StyleSheet.absoluteFill}
137
139
  onPress={close}
138
140
  accessibilityRole="button"
139
- accessibilityLabel="Dismiss"
141
+ accessibilityLabel={common.dismiss}
140
142
  />
141
143
  <Animated.View
142
144
  testID={testID}
@@ -12,6 +12,7 @@ import { RiMore2Fill } from '../icons/remix/RiMore2Fill';
12
12
  import { useTheme } from '../theme/use-theme';
13
13
  import { DataTableRowAction } from './DataTable';
14
14
  import type { DataTableRowActionsProps } from './types';
15
+ import { useCommonMessages } from '../locale/common-messages';
15
16
 
16
17
  /** `size-[18px] text-foreground-icon-secondary` — a menu entry's glyph. */
17
18
  const MENU_ICON_SIZE = 18;
@@ -33,13 +34,15 @@ export function DataTableRowActions({
33
34
  name,
34
35
  actions = [],
35
36
  menu = [],
36
- menuLabel = 'More actions',
37
+ menuLabel: menuLabelProp,
37
38
  style,
38
39
  testID,
39
40
  }: DataTableRowActionsProps) {
41
+ const common = useCommonMessages();
42
+ const menuLabel = menuLabelProp ?? common.moreActions;
40
43
  const theme = useTheme();
41
44
  const [open, setOpen] = useState(false);
42
- const menuName = `${menuLabel} for ${name}`;
45
+ const menuName = common.labelFor(menuLabel, name);
43
46
 
44
47
  return (
45
48
  <View
@@ -6,6 +6,7 @@ import { BREAKPOINTS } from '../styles/breakpoints';
6
6
  import { TextField, TextFieldIcon, TextFieldInput } from '../text-field';
7
7
  import { TYPE_SCALE } from '../typography';
8
8
  import type { DataTableSearchProps } from './types';
9
+ import { useCommonMessages } from '../locale/common-messages';
9
10
 
10
11
  /** `w-[153px]` / `min-w-[153px]`. */
11
12
  const SEARCH_WIDTH = 153;
@@ -20,9 +21,11 @@ export function DataTableSearch({
20
21
  label,
21
22
  value,
22
23
  onValueChange,
23
- placeholder = 'Search',
24
+ placeholder: placeholderProp,
24
25
  testID,
25
26
  }: DataTableSearchProps) {
27
+ const common = useCommonMessages();
28
+ const placeholder = placeholderProp ?? common.search;
26
29
  const { width } = useWindowDimensions();
27
30
  const narrow = width < BREAKPOINTS.sm;
28
31
  return (
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
2
2
  import { View, type StyleProp, type ViewStyle } from 'react-native';
3
3
 
4
4
  import { useControllableState } from '../hooks/use-controllable-state';
5
+ import { useMessages } from '../locale/messages';
5
6
  import { adoptStyleSheet } from '../styles/adopt-style-sheet';
6
7
  import { useTheme } from '../theme/use-theme';
7
8
  import {
@@ -21,6 +22,7 @@ import {
21
22
  type DayCellState,
22
23
  } from './calendar-grid';
23
24
  import { CALENDAR_CSS, CalendarMonth, dayKey } from './CalendarMonth';
25
+ import { DATE_PICKER_MESSAGES } from './messages';
24
26
  import { resolveCalendarPalette } from './palette';
25
27
  import type {
26
28
  CalendarConstraintProps,
@@ -73,13 +75,16 @@ function CalendarFrame({
73
75
  maxDate,
74
76
  isDateUnavailable,
75
77
  weekStartsOn = 0,
76
- locale,
78
+ locale: localeProp,
77
79
  accessibilityLabel,
78
80
  labels,
79
81
  style,
80
82
  testID,
81
83
  }: CalendarFrameProps) {
82
84
  const theme = useTheme();
85
+ const { locale, messages } = useMessages(DATE_PICKER_MESSAGES, localeProp);
86
+ const previousLabel = labels?.previousMonth ?? messages.previousMonth;
87
+ const nextLabel = labels?.nextMonth ?? messages.nextMonth;
83
88
  const palette = useMemo(() => resolveCalendarPalette(theme), [theme]);
84
89
  const [firstMonth, setFirstMonth] = useState(() => startOfMonth(initialDate));
85
90
  const [focusedDate, setFocusedDate] = useState(() => startOfDay(initialDate));
@@ -202,7 +207,8 @@ function CalendarFrame({
202
207
  onKeyDown={onKeyDown}
203
208
  registerNode={registerNode}
204
209
  accessibilityLabel={accessibilityLabel}
205
- labels={labels}
210
+ previousLabel={previousLabel}
211
+ nextLabel={nextLabel}
206
212
  testID={testID ? `${testID}-month-${index}` : undefined}
207
213
  />
208
214
  ))}
@@ -14,7 +14,7 @@ import {
14
14
  type DayCellState,
15
15
  } from './calendar-grid';
16
16
  import type { CalendarPalette } from './palette';
17
- import type { CalendarLabels, WeekStart } from './types';
17
+ import type { WeekStart } from './types';
18
18
 
19
19
  /**
20
20
  * One month panel: header, weekday row and day grid.
@@ -281,7 +281,9 @@ export interface CalendarMonthProps {
281
281
  onKeyDown: (key: string, preventDefault: () => void) => void;
282
282
  registerNode: (key: string, node: View | null) => void;
283
283
  accessibilityLabel?: string;
284
- labels?: CalendarLabels;
284
+ /** The chevrons' names, already localised by the calendar. */
285
+ previousLabel: string;
286
+ nextLabel: string;
285
287
  testID?: string;
286
288
  }
287
289
 
@@ -309,7 +311,8 @@ export function CalendarMonth({
309
311
  onKeyDown,
310
312
  registerNode,
311
313
  accessibilityLabel,
312
- labels,
314
+ previousLabel,
315
+ nextLabel,
313
316
  testID,
314
317
  }: CalendarMonthProps) {
315
318
  const title = formatMonthTitle(month, locale);
@@ -341,7 +344,7 @@ export function CalendarMonth({
341
344
  {onPrevious ? (
342
345
  <NavButton
343
346
  direction="left"
344
- label={labels?.previousMonth ?? 'Previous month'}
347
+ label={previousLabel}
345
348
  onPress={onPrevious}
346
349
  disabled={previousDisabled}
347
350
  palette={palette}
@@ -358,7 +361,7 @@ export function CalendarMonth({
358
361
  {onNext ? (
359
362
  <NavButton
360
363
  direction="right"
361
- label={labels?.nextMonth ?? 'Next month'}
364
+ label={nextLabel}
362
365
  onPress={onNext}
363
366
  disabled={nextDisabled}
364
367
  palette={palette}
@@ -2,9 +2,11 @@ import React, { useState } from 'react';
2
2
  import { View } from 'react-native';
3
3
 
4
4
  import { useControllableState } from '../hooks/use-controllable-state';
5
+ import { useMessages } from '../locale/messages';
5
6
  import { Calendar } from './Calendar';
6
7
  import { formatTriggerDate } from './calendar-grid';
7
8
  import { DateChipInput } from './DateChipInput';
9
+ import { DATE_PICKER_MESSAGES } from './messages';
8
10
  import { PickerActions, PickerShell, usePickerPalette } from './PickerShell';
9
11
  import { SummaryPresence } from './SummaryPresence';
10
12
  import type { DatePickerProps } from './types';
@@ -27,8 +29,8 @@ export function DatePicker({
27
29
  value,
28
30
  defaultValue = null,
29
31
  onChange,
30
- placeholder = 'Select date',
31
- accessibilityLabel = 'Date',
32
+ placeholder: placeholderProp,
33
+ accessibilityLabel: accessibilityLabelProp,
32
34
  labels,
33
35
  disabled,
34
36
  open: openProp,
@@ -38,11 +40,14 @@ export function DatePicker({
38
40
  maxDate,
39
41
  isDateUnavailable,
40
42
  weekStartsOn,
41
- locale,
43
+ locale: localeProp,
42
44
  style,
43
45
  testID,
44
46
  }: DatePickerProps) {
45
47
  const palette = usePickerPalette();
48
+ const { locale, messages } = useMessages(DATE_PICKER_MESSAGES, localeProp);
49
+ const placeholder = placeholderProp ?? messages.datePlaceholder;
50
+ const accessibilityLabel = accessibilityLabelProp ?? messages.dateLabel;
46
51
  const [committed, setCommitted] = useControllableState<Date | null>({
47
52
  value,
48
53
  defaultValue,
@@ -128,7 +133,8 @@ export function DatePicker({
128
133
  setOpenState(false);
129
134
  }}
130
135
  applyDisabled={!pending}
131
- labels={labels}
136
+ cancelLabel={labels?.cancel ?? messages.cancel}
137
+ applyLabel={labels?.apply ?? messages.apply}
132
138
  testID={testID}
133
139
  />
134
140
  </View>
@@ -2,6 +2,7 @@ import React, { useMemo, useState } from 'react';
2
2
  import { Platform, Pressable, View, useWindowDimensions, type TextStyle } from 'react-native';
3
3
 
4
4
  import { useControllableState } from '../hooks/use-controllable-state';
5
+ import { useMessages } from '../locale/messages';
5
6
  import type { WebCssStyle } from '../styles/web-view-style';
6
7
  import { Text, TYPE_SCALE } from '../typography';
7
8
  import {
@@ -13,6 +14,7 @@ import {
13
14
  import { RangeCalendar } from './Calendar';
14
15
  import { MONTH_PANEL_WIDTH } from './CalendarMonth';
15
16
  import { DateChipInput } from './DateChipInput';
17
+ import { DATE_PICKER_MESSAGES } from './messages';
16
18
  import type { CalendarPalette } from './palette';
17
19
  import { PickerActions, PickerShell, usePickerPalette } from './PickerShell';
18
20
  import { SummaryPresence } from './SummaryPresence';
@@ -36,11 +38,6 @@ import type { DateRange, DateRangePickerProps } from './types';
36
38
  /** 16 + 118 + 12 + two panels + 8 between them + 8 — the popup width. */
37
39
  const DUAL_MONTH_WIDTH = 16 + 118 + 12 + MONTH_PANEL_WIDTH * 2 + 8 + 8;
38
40
 
39
- /** The pill's English default; `labels.daysSelected` takes the app's own plural rules. */
40
- function daysSelected(days: number): string {
41
- return `${days} day${days === 1 ? '' : 's'} selected`;
42
- }
43
-
44
41
  /** `text-body-medium`, in Inter. */
45
42
  const BODY: TextStyle = TYPE_SCALE['body-medium'];
46
43
 
@@ -90,8 +87,8 @@ export function DateRangePicker({
90
87
  value,
91
88
  defaultValue = null,
92
89
  onChange,
93
- placeholder = 'Select date range',
94
- accessibilityLabel = 'Date range',
90
+ placeholder: placeholderProp,
91
+ accessibilityLabel: accessibilityLabelProp,
95
92
  quickSelect = true,
96
93
  labels,
97
94
  disabled,
@@ -102,11 +99,14 @@ export function DateRangePicker({
102
99
  maxDate,
103
100
  isDateUnavailable,
104
101
  weekStartsOn,
105
- locale,
102
+ locale: localeProp,
106
103
  style,
107
104
  testID,
108
105
  }: DateRangePickerProps) {
109
106
  const palette = usePickerPalette();
107
+ const { locale, messages } = useMessages(DATE_PICKER_MESSAGES, localeProp);
108
+ const placeholder = placeholderProp ?? messages.rangePlaceholder;
109
+ const accessibilityLabel = accessibilityLabelProp ?? messages.rangeLabel;
110
110
  const { width: windowWidth } = useWindowDimensions();
111
111
  const [committed, setCommitted] = useControllableState<DateRange | null>({
112
112
  value,
@@ -161,7 +161,7 @@ export function DateRangePicker({
161
161
  {presets.map((preset) => (
162
162
  <PresetRow
163
163
  key={preset.key}
164
- label={labels?.presets?.[preset.key] ?? preset.label}
164
+ label={labels?.presets?.[preset.key] ?? messages.presets[preset.key]}
165
165
  active={isSameRange(pending, preset.range)}
166
166
  onPress={() => choose(preset.range)}
167
167
  palette={palette}
@@ -213,7 +213,7 @@ export function DateRangePicker({
213
213
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 5 }}>
214
214
  <DateChipInput
215
215
  date={pending.start}
216
- label={labels?.startDate ?? 'Start date'}
216
+ label={labels?.startDate ?? messages.startDate}
217
217
  palette={palette}
218
218
  onCommit={(start) =>
219
219
  setPending({ start, end: start > pending.end ? start : pending.end })
@@ -222,7 +222,7 @@ export function DateRangePicker({
222
222
  <Text style={{ ...BODY, color: palette.secondaryText }}>-</Text>
223
223
  <DateChipInput
224
224
  date={pending.end}
225
- label={labels?.endDate ?? 'End date'}
225
+ label={labels?.endDate ?? messages.endDate}
226
226
  palette={palette}
227
227
  onCommit={(end) =>
228
228
  setPending({ start: end < pending.start ? end : pending.start, end })
@@ -241,7 +241,7 @@ export function DateRangePicker({
241
241
  }}
242
242
  >
243
243
  <Text style={{ ...BODY, color: palette.secondaryText }}>
244
- {(labels?.daysSelected ?? daysSelected)(days)}
244
+ {(labels?.daysSelected ?? messages.daysSelected)(days)}
245
245
  </Text>
246
246
  </View>
247
247
  ) : null}
@@ -259,7 +259,8 @@ export function DateRangePicker({
259
259
  setOpenState(false);
260
260
  }}
261
261
  applyDisabled={!pending}
262
- labels={labels}
262
+ cancelLabel={labels?.cancel ?? messages.cancel}
263
+ applyLabel={labels?.apply ?? messages.apply}
263
264
  testID={testID}
264
265
  />
265
266
  </View>
@@ -16,11 +16,14 @@ import { useControllableState } from '../hooks/use-controllable-state';
16
16
  import { RiFlagLine } from '../icons/remix/RiFlagLine';
17
17
  import { RiGlobalLine } from '../icons/remix/RiGlobalLine';
18
18
  import { RiVideoLine } from '../icons/remix/RiVideoLine';
19
+ import { formatGregorian } from '../locale/format-date';
20
+ import { useMessages } from '../locale/messages';
19
21
  import type { WebCssStyle } from '../styles/web-view-style';
20
22
  import { useTheme } from '../theme/use-theme';
21
23
  import { Text, TYPE_SCALE } from '../typography';
22
24
  import { Calendar } from './Calendar';
23
25
  import { formatTriggerDate, today } from './calendar-grid';
26
+ import { DATE_PICKER_MESSAGES } from './messages';
24
27
  import type { CalendarPalette } from './palette';
25
28
  import { PickerShell, usePickerPalette } from './PickerShell';
26
29
  import type {
@@ -95,11 +98,11 @@ function formatTime(time: string, format: MeetingSchedulerHourFormat): string {
95
98
  }
96
99
 
97
100
  function weekdayShort(date: Date, locale?: string): string {
98
- try {
99
- return new Intl.DateTimeFormat(locale, { weekday: 'short' }).format(date).slice(0, 2);
100
- } catch {
101
- return ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'][date.getDay()] ?? '';
102
- }
101
+ return (
102
+ formatGregorian(date, locale, { weekday: 'short' })?.slice(0, 2) ??
103
+ ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'][date.getDay()] ??
104
+ ''
105
+ );
103
106
  }
104
107
 
105
108
  // ---------------------------------------------------------------------------
@@ -352,8 +355,8 @@ export function MeetingScheduler({
352
355
  defaultValue,
353
356
  onChange,
354
357
  defaultHourFormat = '24h',
355
- triggerLabel = 'Schedule a meeting',
356
- accessibilityLabel = 'Schedule meeting',
358
+ triggerLabel: triggerLabelProp,
359
+ accessibilityLabel: accessibilityLabelProp,
357
360
  labels,
358
361
  disabled,
359
362
  open: openProp,
@@ -363,11 +366,14 @@ export function MeetingScheduler({
363
366
  maxDate,
364
367
  isDateUnavailable,
365
368
  weekStartsOn,
366
- locale,
369
+ locale: localeProp,
367
370
  style,
368
371
  testID,
369
372
  }: MeetingSchedulerProps) {
370
373
  const theme = useTheme();
374
+ const { locale, messages } = useMessages(DATE_PICKER_MESSAGES, localeProp);
375
+ const triggerLabel = triggerLabelProp ?? messages.meetingTrigger;
376
+ const accessibilityLabel = accessibilityLabelProp ?? messages.meetingLabel;
371
377
  const palette = usePickerPalette();
372
378
  const { width: windowWidth } = useWindowDimensions();
373
379
  const slots = useMemo(() => timeSlots ?? defaultTimeSlots(), [timeSlots]);
@@ -397,8 +403,8 @@ export function MeetingScheduler({
397
403
 
398
404
  const wide = windowWidth >= WIDE_WIDTH + 32;
399
405
  const shadow2xs = theme.isDark ? SHADOW_2XS.dark : SHADOW_2XS.light;
400
- const sendLabel = labels?.send ?? 'Send meeting';
401
- const durationText = (labels?.duration ?? ((n: number) => `${n} minutes`))(meeting.durationMinutes);
406
+ const sendLabel = labels?.send ?? messages.send;
407
+ const durationText = (labels?.duration ?? messages.duration)(meeting.durationMinutes);
402
408
  const chevron = useMemo(() => ({ open, color: palette.secondaryText }), [open, palette.secondaryText]);
403
409
 
404
410
  const hostColumn = (
@@ -505,7 +511,7 @@ export function MeetingScheduler({
505
511
  {formatTriggerDate(pending.date, locale)}
506
512
  </Text>
507
513
  <Text style={[BODY_MEDIUM, { color: palette.secondaryText }]}>
508
- {pending.time ?? labels?.selectTime ?? 'Select a time'}
514
+ {pending.time ?? labels?.selectTime ?? messages.selectTime}
509
515
  </Text>
510
516
  </>
511
517
  ) : null}
@@ -7,7 +7,6 @@ import { RiCalendarLine as CalendarIcon } from '../icons/remix/RiCalendarLine';
7
7
  import { Popover, PopoverContent, PopoverTrigger } from '../popover';
8
8
  import { useTheme } from '../theme/use-theme';
9
9
  import { resolveCalendarPalette, type CalendarPalette } from './palette';
10
- import type { DatePickerLabels } from './types';
11
10
 
12
11
  /**
13
12
  * The chrome both pickers share (`date-picker/shared.tsx`).
@@ -100,22 +99,24 @@ export function PickerActions({
100
99
  onCancel,
101
100
  onApply,
102
101
  applyDisabled,
103
- labels,
102
+ cancelLabel,
103
+ applyLabel,
104
104
  testID,
105
105
  }: {
106
106
  onCancel: () => void;
107
107
  onApply: () => void;
108
108
  applyDisabled: boolean;
109
- labels?: DatePickerLabels;
109
+ cancelLabel: string;
110
+ applyLabel: string;
110
111
  testID?: string;
111
112
  }) {
112
113
  return (
113
114
  <View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
114
115
  <Button onPress={onCancel} testID={testID ? `${testID}-cancel` : undefined} appearance="subtle" tone="neutral">
115
- {labels?.cancel ?? 'Cancel'}
116
+ {cancelLabel}
116
117
  </Button>
117
118
  <Button onPress={onApply} disabled={applyDisabled} testID={testID ? `${testID}-apply` : undefined}>
118
- {labels?.apply ?? 'Apply'}
119
+ {applyLabel}
119
120
  </Button>
120
121
  </View>
121
122
  );
@@ -11,6 +11,7 @@
11
11
  */
12
12
 
13
13
  import type { DateRange, DateRangePreset, WeekStart } from './types';
14
+ import { formatGregorian } from '../locale/format-date';
14
15
 
15
16
  const MS_PER_DAY = 86_400_000;
16
17
 
@@ -130,37 +131,29 @@ export function weekdayLabels(
130
131
  const sunday = new Date(2023, 0, 1);
131
132
  return Array.from({ length: 7 }, (_, column) => {
132
133
  const date = addDays(sunday, (weekStartsOn + column) % 7);
133
- const long = format(date, locale, { weekday: 'long' }) ?? FALLBACK_WEEKDAYS[date.getDay()]!;
134
- const short = format(date, locale, { weekday: 'short' }) ?? long;
134
+ const long = formatGregorian(date, locale, { weekday: 'long' }) ?? FALLBACK_WEEKDAYS[date.getDay()]!;
135
+ const short = formatGregorian(date, locale, { weekday: 'short' }) ?? long;
135
136
  return { short: short.slice(0, 2), long };
136
137
  });
137
138
  }
138
139
 
139
- function format(date: Date, locale: string | undefined, options: Intl.DateTimeFormatOptions): string | null {
140
- try {
141
- return new Intl.DateTimeFormat(locale, options).format(date);
142
- } catch {
143
- return null;
144
- }
145
- }
146
-
147
140
  /** `September 2026` — the month panel's title. */
148
141
  export function formatMonthTitle(month: Date, locale?: string): string {
149
142
  return (
150
- format(month, locale, { month: 'long', year: 'numeric' }) ??
143
+ formatGregorian(month, locale, { month: 'long', year: 'numeric' }) ??
151
144
  `${month.getMonth() + 1}/${month.getFullYear()}`
152
145
  );
153
146
  }
154
147
 
155
148
  /** `Sep 16, 2026` — the trigger's label. */
156
149
  export function formatTriggerDate(date: Date, locale?: string): string {
157
- return format(date, locale, { month: 'short', day: 'numeric', year: 'numeric' }) ?? formatChipDate(date);
150
+ return formatGregorian(date, locale, { month: 'short', day: 'numeric', year: 'numeric' }) ?? formatChipDate(date);
158
151
  }
159
152
 
160
153
  /** `Wednesday, September 16, 2026` — a day button's accessible name. */
161
154
  export function formatAccessibleDate(date: Date, locale?: string): string {
162
155
  return (
163
- format(date, locale, { weekday: 'long', month: 'long', day: 'numeric', year: 'numeric' }) ??
156
+ formatGregorian(date, locale, { weekday: 'long', month: 'long', day: 'numeric', year: 'numeric' }) ??
164
157
  formatChipDate(date)
165
158
  );
166
159
  }
@@ -334,22 +327,22 @@ export function clampDate(date: Date, { minDate, maxDate }: DateConstraints): Da
334
327
  return startOfDay(date);
335
328
  }
336
329
 
337
- /** Quick-select presets, relative to `now`. `label` is the English default. */
330
+ /** Quick-select presets, relative to `now`. Their names are `DatePickerMessages.presets`. */
338
331
  export function quickSelectPresets(
339
332
  now: Date = today(),
340
- ): { key: DateRangePreset; label: string; range: DateRange }[] {
333
+ ): { key: DateRangePreset; range: DateRange }[] {
341
334
  const lastMonth = addMonths(now, -1);
342
335
  const lastYear = new Date(now.getFullYear() - 1, now.getMonth(), 1);
343
336
  const yesterday = addDays(now, -1);
344
337
  return [
345
- { key: 'today', label: 'Today', range: { start: now, end: now } },
346
- { key: 'yesterday', label: 'Yesterday', range: { start: yesterday, end: yesterday } },
347
- { key: 'lastWeek', label: 'Last week', range: { start: addDays(now, -7), end: yesterday } },
348
- { key: 'thisMonth', label: 'This month', range: { start: startOfMonth(now), end: endOfMonth(now) } },
349
- { key: 'lastMonth', label: 'Last month', range: { start: startOfMonth(lastMonth), end: endOfMonth(lastMonth) } },
350
- { key: 'thisYear', label: 'This year', range: { start: startOfYear(now), end: endOfYear(now) } },
351
- { key: 'lastYear', label: 'Last year', range: { start: startOfYear(lastYear), end: endOfYear(lastYear) } },
352
- { key: 'allTime', label: 'All time', range: { start: addMonths(now, -120), end: now } },
338
+ { key: 'today', range: { start: now, end: now } },
339
+ { key: 'yesterday', range: { start: yesterday, end: yesterday } },
340
+ { key: 'lastWeek', range: { start: addDays(now, -7), end: yesterday } },
341
+ { key: 'thisMonth', range: { start: startOfMonth(now), end: endOfMonth(now) } },
342
+ { key: 'lastMonth', range: { start: startOfMonth(lastMonth), end: endOfMonth(lastMonth) } },
343
+ { key: 'thisYear', range: { start: startOfYear(now), end: endOfYear(now) } },
344
+ { key: 'lastYear', range: { start: startOfYear(lastYear), end: endOfYear(lastYear) } },
345
+ { key: 'allTime', range: { start: addMonths(now, -120), end: now } },
353
346
  ];
354
347
  }
355
348