@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
@@ -0,0 +1,53 @@
1
+ import type { BloomLanguage } from './languages';
2
+
3
+ export type PluralCategory = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other';
4
+
5
+ /**
6
+ * The CLDR cardinal category of a whole number, for Bloom's languages.
7
+ *
8
+ * Written out rather than read from `Intl.PluralRules` because Hermes — React
9
+ * Native's engine — does not implement `PluralRules`: a catalog that called it
10
+ * would pluralise on web and throw on a phone. Whole numbers only; a count of
11
+ * days or minutes is never fractional.
12
+ */
13
+ export function pluralCategory(language: BloomLanguage, count: number): PluralCategory {
14
+ const n = Math.abs(Math.trunc(count));
15
+ const mod10 = n % 10;
16
+ const mod100 = n % 100;
17
+ switch (language) {
18
+ case 'ja':
19
+ case 'zh':
20
+ case 'id':
21
+ return 'other';
22
+ case 'fr':
23
+ case 'pt':
24
+ case 'hi':
25
+ case 'bn':
26
+ return n === 0 || n === 1 ? 'one' : 'other';
27
+ case 'ru':
28
+ if (mod10 === 1 && mod100 !== 11) return 'one';
29
+ if (mod10 >= 2 && mod10 <= 4 && (mod100 < 12 || mod100 > 14)) return 'few';
30
+ return 'many';
31
+ case 'ar':
32
+ if (n === 0) return 'zero';
33
+ if (n === 1) return 'one';
34
+ if (n === 2) return 'two';
35
+ if (mod100 >= 3 && mod100 <= 10) return 'few';
36
+ if (mod100 >= 11) return 'many';
37
+ return 'other';
38
+ default:
39
+ return n === 1 ? 'one' : 'other';
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Picks the form for `count`. `other` is required; a category a language
45
+ * uses but the caller left out falls back to it.
46
+ */
47
+ export function plural(
48
+ language: BloomLanguage,
49
+ count: number,
50
+ forms: Partial<Record<PluralCategory, string>> & { other: string },
51
+ ): string {
52
+ return (forms[pluralCategory(language, count)] ?? forms.other).replace('{n}', String(count));
53
+ }
@@ -24,6 +24,7 @@ import {
24
24
  type MapMarkerPaint,
25
25
  } from './shared';
26
26
  import type { MapListingPreviewProps } from './types';
27
+ import { useCommonMessages } from '../locale/common-messages';
27
28
 
28
29
  /**
29
30
  * The small card a map shows when a marker is pressed.
@@ -124,12 +125,15 @@ function MapListingPreviewComponent({
124
125
  onPress,
125
126
  layout = 'vertical',
126
127
  width = DEFAULT_WIDTH,
127
- closeLabel = 'Close',
128
- favoriteLabel = 'Save',
128
+ closeLabel: closeLabelProp,
129
+ favoriteLabel: favoriteLabelProp,
129
130
  accessibilityLabel,
130
131
  style,
131
132
  testID,
132
133
  }: MapListingPreviewProps) {
134
+ const common = useCommonMessages();
135
+ const closeLabel = closeLabelProp ?? common.close;
136
+ const favoriteLabel = favoriteLabelProp ?? common.save;
133
137
  const theme = useTheme();
134
138
  const paint = useMemo(() => resolveMapMarkerPaint(theme), [theme]);
135
139
  const resolver = useImageResolver();
@@ -14,6 +14,7 @@ import { Text } from '../typography';
14
14
  import { Artwork, CardLink, useMediaCardCss } from './parts';
15
15
  import { composeName, resolveMediaCardPaint, ROW_PADDING, ROW_RADIUS } from './shared';
16
16
  import type { FriendActivityCardProps } from './types';
17
+ import { useCommonMessages } from '../locale/common-messages';
17
18
 
18
19
  const AVATAR = 40;
19
20
  const DOT = 12;
@@ -50,13 +51,14 @@ function FriendActivityCardComponent({
50
51
  style,
51
52
  testID,
52
53
  }: FriendActivityCardProps) {
54
+ const common = useCommonMessages();
53
55
  const theme = useTheme();
54
56
  useMediaCardCss();
55
57
  const paint = useMemo(() => resolveMediaCardPaint(theme), [theme]);
56
58
 
57
59
  if (skeleton) {
58
60
  return (
59
- <View aria-busy accessibilityLabel="Loading" style={[{ flexDirection: 'row', gap: 12, padding: ROW_PADDING }, style]} testID={testID}>
61
+ <View aria-busy accessibilityLabel={common.loading} style={[{ flexDirection: 'row', gap: 12, padding: ROW_PADDING }, style]} testID={testID}>
60
62
  <SkeletonCircle size={AVATAR} />
61
63
  <View style={{ flex: 1, gap: 8, justifyContent: 'center' }}>
62
64
  <SkeletonBox width="35%" height={12} borderRadius={4} />
@@ -19,6 +19,7 @@ import {
19
19
  TILE_ARTWORK,
20
20
  } from './shared';
21
21
  import type { GenreCardProps, MediaCardSize } from './types';
22
+ import { useCommonMessages } from '../locale/common-messages';
22
23
 
23
24
  const TITLE: Record<MediaCardSize, TypeScaleVariant> = {
24
25
  large: 'title-2-bold',
@@ -51,6 +52,7 @@ function GenreCardComponent({
51
52
  style,
52
53
  testID,
53
54
  }: GenreCardProps) {
55
+ const common = useCommonMessages();
54
56
  const theme = useTheme();
55
57
  useMediaCardCss();
56
58
  const resolver = useImageResolver();
@@ -62,7 +64,7 @@ function GenreCardComponent({
62
64
 
63
65
  if (skeleton) {
64
66
  return (
65
- <View aria-busy accessibilityLabel="Loading" style={[{ width: side, aspectRatio: 1 }, style]} testID={testID}>
67
+ <View aria-busy accessibilityLabel={common.loading} style={[{ width: side, aspectRatio: 1 }, style]} testID={testID}>
66
68
  <SkeletonBox width="100%" height="100%" borderRadius={GENRE_RADIUS} />
67
69
  </View>
68
70
  );
@@ -24,6 +24,7 @@ import {
24
24
  TILE_RADIUS,
25
25
  } from './shared';
26
26
  import type { MediaCardLayout, MediaCardProps, MediaCardSize } from './types';
27
+ import { useCommonMessages } from '../locale/common-messages';
27
28
 
28
29
  /**
29
30
  * The anatomy every music card shares.
@@ -92,6 +93,7 @@ export function MediaCardSkeleton({
92
93
  style?: StyleProp<ViewStyle>;
93
94
  testID?: string;
94
95
  }) {
96
+ const common = useCommonMessages();
95
97
  const box = resolveArtworkBox(size, layout, aspectRatio, artworkSize);
96
98
  const row = layout === 'row';
97
99
  const padding = row ? ROW_PADDING : TILE_PADDING;
@@ -103,7 +105,7 @@ export function MediaCardSkeleton({
103
105
  return (
104
106
  <View
105
107
  aria-busy
106
- accessibilityLabel="Loading"
108
+ accessibilityLabel={common.loading}
107
109
  style={[
108
110
  {
109
111
  flexDirection: row ? 'row' : 'column',
@@ -18,6 +18,7 @@ import {
18
18
  resolvePlayVisibility,
19
19
  } from './shared';
20
20
  import type { QuickAccessTileProps } from './types';
21
+ import { useCommonMessages } from '../locale/common-messages';
21
22
 
22
23
  /**
23
24
  * The compact home-screen shortcut, laid out 2–4 to a row.
@@ -55,13 +56,14 @@ function QuickAccessTileComponent({
55
56
  style,
56
57
  testID,
57
58
  }: QuickAccessTileProps) {
59
+ const common = useCommonMessages();
58
60
  const theme = useTheme();
59
61
  useMediaCardCss();
60
62
  const paint = useMemo(() => resolveMediaCardPaint(theme), [theme]);
61
63
 
62
64
  if (skeleton) {
63
65
  return (
64
- <View aria-busy accessibilityLabel="Loading" style={style} testID={testID}>
66
+ <View aria-busy accessibilityLabel={common.loading} style={style} testID={testID}>
65
67
  <SkeletonBox width="100%" height={QUICK_TILE_HEIGHT} borderRadius={QUICK_TILE_RADIUS} />
66
68
  </View>
67
69
  );
@@ -12,6 +12,7 @@ import { Text } from '../typography';
12
12
  import { Artwork, CoverGradient, useMediaCardCss } from './parts';
13
13
  import { IS_WEB, RECAP_RADIUS, resolveCoverTint, resolveMediaCardPaint, type CoverTint } from './shared';
14
14
  import type { RecapCardProps } from './types';
15
+ import { useCommonMessages } from '../locale/common-messages';
15
16
 
16
17
  /**
17
18
  * The share pill over a generated cover. Not `Button`: its fill is the cover's
@@ -76,6 +77,7 @@ function RecapCardComponent({
76
77
  style,
77
78
  testID,
78
79
  }: RecapCardProps) {
80
+ const common = useCommonMessages();
79
81
  const theme = useTheme();
80
82
  useMediaCardCss();
81
83
  const paint = useMemo(() => resolveMediaCardPaint(theme), [theme]);
@@ -83,7 +85,7 @@ function RecapCardComponent({
83
85
 
84
86
  if (skeleton) {
85
87
  return (
86
- <View aria-busy accessibilityLabel="Loading" style={style} testID={testID}>
88
+ <View aria-busy accessibilityLabel={common.loading} style={style} testID={testID}>
87
89
  <SkeletonBox width="100%" height={360} borderRadius={RECAP_RADIUS} />
88
90
  </View>
89
91
  );
@@ -37,6 +37,7 @@ import {
37
37
  } from './shared';
38
38
  import type { MediaCardMenuItem } from './types';
39
39
  import type { BloomIconComponent } from '../icons/icon-component';
40
+ import { useCommonMessages } from '../locale/common-messages';
40
41
 
41
42
  export function useMediaCardCss(): void {
42
43
  React.useEffect(() => {
@@ -324,7 +325,7 @@ export function hasMenu(menu: React.ReactNode, items?: ReadonlyArray<MediaCardMe
324
325
  export function CardMenu({
325
326
  items,
326
327
  menu,
327
- label = 'More options',
328
+ label: labelProp,
328
329
  subject,
329
330
  open,
330
331
  onOpenChange,
@@ -340,7 +341,9 @@ export function CardMenu({
340
341
  reveal: boolean;
341
342
  testID?: string;
342
343
  }) {
343
- const name = `${label} for ${subject}`;
344
+ const common = useCommonMessages();
345
+ const label = labelProp ?? common.moreOptions;
346
+ const name = common.labelFor(label, subject);
344
347
  return (
345
348
  <View
346
349
  {...webDataSet({ bloomMediaCardMenu: '', ...(reveal ? { bloomMediaCardReveal: 'hover' } : null) })}
@@ -33,6 +33,7 @@ import type {
33
33
  MediaMoreButtonProps,
34
34
  ShuffleButtonProps,
35
35
  } from './types';
36
+ import { useCommonMessages } from '../locale/common-messages';
36
37
 
37
38
  /**
38
39
  * The row of controls under a media header.
@@ -144,10 +145,12 @@ ShuffleButton.displayName = 'ShuffleButton';
144
145
 
145
146
  function MediaMoreButtonComponent({
146
147
  onPress,
147
- accessibilityLabel = 'More options',
148
+ accessibilityLabel: accessibilityLabelProp,
148
149
  size = 28,
149
150
  ...rest
150
151
  }: MediaMoreButtonProps) {
152
+ const common = useCommonMessages();
153
+ const accessibilityLabel = accessibilityLabelProp ?? common.moreOptions;
151
154
  return (
152
155
  <MediaIconButton
153
156
  icon={RiMoreFill}
@@ -11,6 +11,7 @@ import { Text } from '../typography';
11
11
  import { useImageUri, useMediaHeaderPaint } from './parts';
12
12
  import { type MediaHeaderPaint } from './shared';
13
13
  import type { PopularTrack, PopularTracksProps } from './types';
14
+ import { useCommonMessages } from '../locale/common-messages';
14
15
 
15
16
  /**
16
17
  * An artist's most played tracks: five rows, "See more" shows ten.
@@ -129,13 +130,15 @@ function PopularTracksComponent({
129
130
  expanded: expandedProp,
130
131
  onExpandedChange,
131
132
  showMoreLabel = 'See more',
132
- showLessLabel = 'Show less',
133
+ showLessLabel: showLessLabelProp,
133
134
  activeTrackId,
134
135
  playing = false,
135
136
  onTrackPress,
136
137
  style,
137
138
  testID,
138
139
  }: PopularTracksProps) {
140
+ const common = useCommonMessages();
141
+ const showLessLabel = showLessLabelProp ?? common.showLess;
139
142
  const paint = useMediaHeaderPaint();
140
143
  const [expandedState, setExpandedState] = useState(false);
141
144
  const expanded = expandedProp ?? expandedState;
@@ -19,6 +19,7 @@ import { clamp01 } from '../styles/clamp';
19
19
  import { isImageUrl as isUrl } from '../image-resolver';
20
20
  import { webDataSet as webData } from '../styles/web-data';
21
21
  import type { MediaHeaderPerson, MediaImageSource } from './types';
22
+ import { useCommonMessages } from '../locale/common-messages';
22
23
 
23
24
  /** The family's paint for an artwork colour, plus its web sheet. */
24
25
  export function useMediaHeaderPaint(artworkColor?: string | null): MediaHeaderPaint {
@@ -395,8 +396,8 @@ export function ClampedText({
395
396
  color,
396
397
  linkColor,
397
398
  ring,
398
- showMoreLabel = 'Show more',
399
- showLessLabel = 'Show less',
399
+ showMoreLabel: showMoreLabelProp,
400
+ showLessLabel: showLessLabelProp,
400
401
  testID,
401
402
  }: {
402
403
  children: string;
@@ -408,6 +409,9 @@ export function ClampedText({
408
409
  showLessLabel?: string;
409
410
  testID?: string;
410
411
  }) {
412
+ const common = useCommonMessages();
413
+ const showMoreLabel = showMoreLabelProp ?? common.showMore;
414
+ const showLessLabel = showLessLabelProp ?? common.showLess;
411
415
  const [expanded, setExpanded] = React.useState(false);
412
416
  const { state: hovered, onIn, onOut } = useInteractionState();
413
417
  // Only offer the toggle when the text can plausibly overflow: ~ 60 characters a line.
@@ -31,6 +31,7 @@ import {
31
31
  type ShelfScroll,
32
32
  } from './shared';
33
33
  import type { ShelfProps } from './types';
34
+ import { useCommonMessages } from '../locale/common-messages';
34
35
 
35
36
  /**
36
37
  * A section of a home or search page: a header over a run of items.
@@ -69,12 +70,15 @@ function ShelfComponent({
69
70
  gap = SHELF_GAP,
70
71
  contentInset = 0,
71
72
  headingLevel = 2,
72
- previousLabel = 'Previous',
73
- nextLabel = 'Next',
73
+ previousLabel: previousLabelProp,
74
+ nextLabel: nextLabelProp,
74
75
  children,
75
76
  style,
76
77
  testID,
77
78
  }: ShelfProps) {
79
+ const common = useCommonMessages();
80
+ const previousLabel = previousLabelProp ?? common.previous;
81
+ const nextLabel = nextLabelProp ?? common.next;
78
82
  const theme = useTheme();
79
83
  const reducedMotion = useReducedMotion();
80
84
  useEffect(() => {
@@ -4,6 +4,7 @@ import { ScrollView, View, type LayoutChangeEvent } from 'react-native';
4
4
  import * as Skeleton from '../skeleton';
5
5
  import { SHELF_GAP, shelfGridColumns } from './shared';
6
6
  import type { ShelfSkeletonProps } from './types';
7
+ import { useCommonMessages } from '../locale/common-messages';
7
8
 
8
9
  /**
9
10
  * The placeholder for a `Shelf` that is still loading: a title bar and
@@ -21,10 +22,12 @@ function ShelfSkeletonComponent({
21
22
  round = false,
22
23
  eyebrow = false,
23
24
  gap = SHELF_GAP,
24
- accessibilityLabel = 'Loading',
25
+ accessibilityLabel: accessibilityLabelProp,
25
26
  style,
26
27
  testID,
27
28
  }: ShelfSkeletonProps) {
29
+ const common = useCommonMessages();
30
+ const accessibilityLabel = accessibilityLabelProp ?? common.loading;
28
31
  const [gridWidth, setGridWidth] = useState(0);
29
32
  const onGridLayout = useCallback((event: LayoutChangeEvent) => {
30
33
  const width = event.nativeEvent.layout.width;
@@ -27,12 +27,13 @@ import { cx } from '../floating/shared';
27
27
  import { useAnchorRect } from '../floating/use-anchor-rect';
28
28
  import { useMenubarMenu } from './context';
29
29
  import type { MenubarContentProps } from './types';
30
+ import { useCommonMessages } from '../locale/common-messages';
30
31
 
31
32
  export { Menubar, MenubarMenu, MenubarTrigger } from './MenubarBase';
32
33
 
33
34
  export function MenubarContent({
34
35
  children,
35
- label = 'Menu',
36
+ label: labelProp,
36
37
  side,
37
38
  align = 'start',
38
39
  // `alignOffset={-4} sideOffset={8}` — upstream's own defaults, which pull the
@@ -47,6 +48,8 @@ export function MenubarContent({
47
48
  style,
48
49
  testID,
49
50
  }: MenubarContentProps) {
51
+ const common = useCommonMessages();
52
+ const label = labelProp ?? common.menu;
50
53
  const menu = useMenubarMenu();
51
54
  const anchor = useAnchorRect(menu.anchorRef, menu.open);
52
55
  const close = useCallback(() => menu.setOpen(false), [menu]);
@@ -30,6 +30,7 @@ import {
30
30
  resolveMessageMediaPaint,
31
31
  } from './shared';
32
32
  import type { FileKind, FileMessageProps } from './types';
33
+ import { useCommonMessages } from '../locale/common-messages';
33
34
 
34
35
  /** One glyph per kind. The colour is `resolveFileKindPaint`'s job, not this map's. */
35
36
  const KIND_ICONS: Record<FileKind, typeof RiFileTextLine> = {
@@ -84,13 +85,15 @@ function FileMessageComponent({
84
85
  width,
85
86
  accessibilityLabel,
86
87
  downloadLabel = 'Download',
87
- cancelLabel = 'Cancel',
88
+ cancelLabel: cancelLabelProp,
88
89
  tone = 'incoming',
89
90
  onColor,
90
91
  bubbleColor,
91
92
  style,
92
93
  testID,
93
94
  }: FileMessageProps) {
95
+ const common = useCommonMessages();
96
+ const cancelLabel = cancelLabelProp ?? common.cancel;
94
97
  const theme = useTheme();
95
98
  useMessageMediaCss();
96
99
  const paint = useMemo(
@@ -29,6 +29,7 @@ import {
29
29
  } from './shared';
30
30
  import { useMediaSource } from './use-media-source';
31
31
  import type { MessageMediaSource } from './types';
32
+ import { useCommonMessages } from '../locale/common-messages';
32
33
 
33
34
  /**
34
35
  * The pieces every block in `message-media` is built from.
@@ -557,10 +558,12 @@ function retryStyle(hovered: boolean, paint: MessageMediaPaint): WebCssStyle {
557
558
  export const MediaFailure = memo(function MediaFailure({
558
559
  paint,
559
560
  label = 'Not sent',
560
- retryLabel = 'Retry',
561
+ retryLabel: retryLabelProp,
561
562
  onRetry,
562
563
  testID,
563
564
  }: MediaFailureProps) {
565
+ const common = useCommonMessages();
566
+ const retryLabel = retryLabelProp ?? common.retry;
564
567
  useMessageMediaCss();
565
568
  const [hovered, setHovered] = useState(false);
566
569
  return (
@@ -14,6 +14,7 @@ import { useTheme } from '../theme/use-theme';
14
14
  import { TYPE_SCALE } from '../typography/scale';
15
15
  import { IS_WEB, MUSIC_LIBRARY_CSS, MUSIC_LIBRARY_STYLE_ID, resolveMusicLibraryPaint } from './shared';
16
16
  import type { SearchFieldProps } from './types';
17
+ import { useCommonMessages } from '../locale/common-messages';
17
18
 
18
19
  /**
19
20
  * The top-bar search pill.
@@ -59,13 +60,15 @@ function SearchFieldComponent({
59
60
  onBrowsePress,
60
61
  browseActive = false,
61
62
  placeholder = 'What do you want to play?',
62
- accessibilityLabel = 'Search',
63
+ accessibilityLabel: accessibilityLabelProp,
63
64
  clearLabel = 'Clear search',
64
65
  browseLabel = 'Browse',
65
66
  autoFocus,
66
67
  style,
67
68
  testID,
68
69
  }: SearchFieldProps) {
70
+ const common = useCommonMessages();
71
+ const accessibilityLabel = accessibilityLabelProp ?? common.search;
69
72
  const theme = useTheme();
70
73
  useEffect(() => {
71
74
  adoptStyleSheet(MUSIC_LIBRARY_STYLE_ID, MUSIC_LIBRARY_CSS);
@@ -61,6 +61,7 @@ import { useHardwareBack } from './use-hardware-back';
61
61
  import { useModalOverlayRegistration } from './use-modal-overlay-active';
62
62
  import { useOverlayLayer } from './use-overlay-layer';
63
63
  import type { OverlayRootProps, BackdropProps } from './types';
64
+ import { useCommonMessages } from '../locale/common-messages';
64
65
 
65
66
  const AnimatedBlurView = Animated.createAnimatedComponent(BlurView);
66
67
 
@@ -390,9 +391,11 @@ export const Backdrop = memo(function Backdrop({
390
391
  style,
391
392
  layerStyle,
392
393
  children,
393
- accessibilityLabel = 'Dismiss',
394
+ accessibilityLabel: accessibilityLabelProp,
394
395
  testID,
395
396
  }: BackdropProps) {
397
+ const common = useCommonMessages();
398
+ const accessibilityLabel = accessibilityLabelProp ?? common.dismiss;
396
399
  const inert = disabled || !onPress;
397
400
  // `undefined` unless this backdrop is inside a declared separate native
398
401
  // window. On Android that is the difference between a real blur and a crash.
@@ -33,6 +33,7 @@ import { useTheme } from '../theme/use-theme';
33
33
  import { Text } from '../typography';
34
34
  import { EdgeScrim, SCRIM_TAIL_RATIO } from './EdgeScrim';
35
35
  import type { PageHeaderProps } from './types';
36
+ import { useCommonMessages } from '../locale/common-messages';
36
37
 
37
38
  /**
38
39
  * `PageHeader`: a screen's top chrome.
@@ -120,7 +121,7 @@ function PageHeaderComponent({
120
121
  presentation = 'floating',
121
122
  placement = 'inline',
122
123
  onBack,
123
- backLabel = 'Back',
124
+ backLabel: backLabelProp,
124
125
  leading,
125
126
  actions,
126
127
  border = 'auto',
@@ -134,6 +135,8 @@ function PageHeaderComponent({
134
135
  style,
135
136
  testID,
136
137
  }: PageHeaderProps) {
138
+ const common = useCommonMessages();
139
+ const backLabel = backLabelProp ?? common.back;
137
140
  const isWeb = Platform.OS === 'web';
138
141
  const floating = presentation === 'floating';
139
142
  const overlay = placement === 'overlay';
@@ -13,6 +13,7 @@ import { RiArrowLeftLine as ArrowLeft } from '../icons/remix/RiArrowLeftLine';
13
13
  import { RiArrowRightLine as ArrowRight } from '../icons/remix/RiArrowRightLine';
14
14
  import type { Theme } from '../theme/types';
15
15
  import type { PaginationProps } from './types';
16
+ import { useCommonMessages } from '../locale/common-messages';
16
17
 
17
18
  /**
18
19
  * The pagination, coloured from Bloom's theme through the ramps
@@ -177,13 +178,16 @@ const PaginationComponent: React.FC<PaginationProps> = ({
177
178
  totalPages,
178
179
  onChange,
179
180
  siblingCount = 1,
180
- previousLabel = 'Previous',
181
- nextLabel = 'Next',
181
+ previousLabel: previousLabelProp,
182
+ nextLabel: nextLabelProp,
182
183
  getPageLabel,
183
184
  accessibilityLabel = 'Pagination',
184
185
  style,
185
186
  testID,
186
187
  }) => {
188
+ const common = useCommonMessages();
189
+ const previousLabel = previousLabelProp ?? common.previous;
190
+ const nextLabel = nextLabelProp ?? common.next;
187
191
  const theme = useTheme();
188
192
  useInteractiveWebCss(STYLE_ID, PAGINATION_CSS);
189
193
  const palette = useMemo(() => resolvePaginationPalette(theme), [theme]);
@@ -34,6 +34,7 @@ import { PLACE_CARD_GEOMETRY, PLACE_OPEN_TONE } from './constants';
34
34
  import { PlaceActions } from './PlaceActions';
35
35
  import { composePlaceName, openLabelFor, resolvePlaceCardPaint, type PlaceCardPaint } from './shared';
36
36
  import type { PlaceCardProps } from './types';
37
+ import { useCommonMessages } from '../locale/common-messages';
37
38
 
38
39
  /**
39
40
  * A place on the map — the result you scroll past, and the header of the sheet
@@ -219,11 +220,12 @@ function PlaceCardSkeleton({
219
220
  style,
220
221
  testID,
221
222
  }: Pick<PlaceCardProps, 'style' | 'testID'> & { density: 'row' | 'detail' }) {
223
+ const common = useCommonMessages();
222
224
  if (density === 'row') {
223
225
  return (
224
226
  <View
225
227
  aria-busy
226
- accessibilityLabel="Loading"
228
+ accessibilityLabel={common.loading}
227
229
  style={[{ flexDirection: 'row', alignItems: 'flex-start' }, style]}
228
230
  testID={testID}
229
231
  >
@@ -243,7 +245,7 @@ function PlaceCardSkeleton({
243
245
  );
244
246
  }
245
247
  return (
246
- <View aria-busy accessibilityLabel="Loading" style={style} testID={testID}>
248
+ <View aria-busy accessibilityLabel={common.loading} style={style} testID={testID}>
247
249
  <SkeletonBox width="100%" height={G.cover} borderRadius={G.radius} />
248
250
  <View style={{ gap: 8, paddingTop: G.padding }}>
249
251
  <SkeletonBox width="55%" height={20} borderRadius={4} />
@@ -22,6 +22,7 @@ import { useTheme } from '../theme/use-theme';
22
22
  import { Text } from '../typography';
23
23
  import { PLACE_REVIEW_CATEGORIES_WIDE_MIN_WIDTH } from './constants';
24
24
  import type { PlaceReviewCardProps } from './types';
25
+ import { useCommonMessages } from '../locale/common-messages';
25
26
 
26
27
  /**
27
28
  * One past tenant's review of a building.
@@ -60,8 +61,8 @@ function PlaceReviewCardComponent({
60
61
  notRecommendLabel = "Wouldn't recommend",
61
62
  text,
62
63
  numberOfLines = 4,
63
- showMoreLabel = 'Show more',
64
- showLessLabel = 'Show less',
64
+ showMoreLabel: showMoreLabelProp,
65
+ showLessLabel: showLessLabelProp,
65
66
  expanded: expandedProp,
66
67
  onExpandedChange,
67
68
  helpfulCount,
@@ -74,6 +75,9 @@ function PlaceReviewCardComponent({
74
75
  style,
75
76
  testID,
76
77
  }: PlaceReviewCardProps) {
78
+ const common = useCommonMessages();
79
+ const showMoreLabel = showMoreLabelProp ?? common.showMore;
80
+ const showLessLabel = showLessLabelProp ?? common.showLess;
77
81
  useHousingWebCss();
78
82
  const palette = useHousingPalette();
79
83
  const id = (part: string) => (testID ? `${testID}-${part}` : undefined);
@@ -8,6 +8,7 @@ import { RiQuillPenLine } from '../icons/remix/RiQuillPenLine';
8
8
  import { HousingCard, IconTile, useHousingPalette } from '../tenancy/parts';
9
9
  import { Text } from '../typography';
10
10
  import type { WriteReviewPromptProps } from './types';
11
+ import { useCommonMessages } from '../locale/common-messages';
11
12
 
12
13
  /**
13
14
  * An invitation for a past tenant to review the building.
@@ -28,11 +29,13 @@ function WriteReviewPromptComponent({
28
29
  actionLabel = 'Write a review',
29
30
  onStart,
30
31
  onDismiss,
31
- dismissLabel = 'Dismiss',
32
+ dismissLabel: dismissLabelProp,
32
33
  media,
33
34
  style,
34
35
  testID,
35
36
  }: WriteReviewPromptProps) {
37
+ const common = useCommonMessages();
38
+ const dismissLabel = dismissLabelProp ?? common.dismiss;
36
39
  const palette = useHousingPalette();
37
40
  const id = (part: string) => (testID ? `${testID}-${part}` : undefined);
38
41
  const body = description ?? `Help future tenants of ${buildingTitle}. Reviews are anonymous.`;