@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.
- package/docs/adoption-matrix.mdx +5 -4
- package/docs/date-picker.mdx +15 -28
- package/docs/locale.mdx +50 -0
- package/docs/provider.mdx +11 -0
- package/lib/commonjs/activity-feed/ActivityFeed.js +7 -4
- package/lib/commonjs/activity-feed/ActivityFeed.js.map +1 -1
- package/lib/commonjs/alert-dialog/AlertDialog.js +4 -1
- package/lib/commonjs/alert-dialog/AlertDialog.js.map +1 -1
- package/lib/commonjs/announcement/Announcement.js +5 -4
- package/lib/commonjs/announcement/Announcement.js.map +1 -1
- package/lib/commonjs/app-shell/ProOfferCard.js +5 -4
- package/lib/commonjs/app-shell/ProOfferCard.js.map +1 -1
- package/lib/commonjs/calendar/shared.js +5 -11
- package/lib/commonjs/calendar/shared.js.map +1 -1
- package/lib/commonjs/chart-cards/medical-parts.js +6 -2
- package/lib/commonjs/chart-cards/medical-parts.js.map +1 -1
- package/lib/commonjs/chat-composer/ComposerBanner.js +5 -3
- package/lib/commonjs/chat-composer/ComposerBanner.js.map +1 -1
- package/lib/commonjs/chat-list/ChatSearchField.js +4 -1
- package/lib/commonjs/chat-list/ChatSearchField.js.map +1 -1
- package/lib/commonjs/composer-panel/ComposerPopover.js +3 -1
- package/lib/commonjs/composer-panel/ComposerPopover.js.map +1 -1
- package/lib/commonjs/data-table/DataTableRowActions.js +6 -4
- package/lib/commonjs/data-table/DataTableRowActions.js.map +1 -1
- package/lib/commonjs/data-table/DataTableSearch.js +5 -3
- package/lib/commonjs/data-table/DataTableSearch.js.map +1 -1
- package/lib/commonjs/date-picker/Calendar.js +11 -2
- package/lib/commonjs/date-picker/Calendar.js.map +1 -1
- package/lib/commonjs/date-picker/CalendarMonth.js +4 -3
- package/lib/commonjs/date-picker/CalendarMonth.js.map +1 -1
- package/lib/commonjs/date-picker/DatePicker.js +13 -4
- package/lib/commonjs/date-picker/DatePicker.js.map +1 -1
- package/lib/commonjs/date-picker/DateRangePicker.js +17 -13
- package/lib/commonjs/date-picker/DateRangePicker.js.map +1 -1
- package/lib/commonjs/date-picker/MeetingScheduler.js +18 -13
- package/lib/commonjs/date-picker/MeetingScheduler.js.map +1 -1
- package/lib/commonjs/date-picker/PickerShell.js +5 -5
- package/lib/commonjs/date-picker/PickerShell.js.map +1 -1
- package/lib/commonjs/date-picker/calendar-grid.js +7 -21
- package/lib/commonjs/date-picker/calendar-grid.js.map +1 -1
- package/lib/commonjs/date-picker/messages.js +526 -0
- package/lib/commonjs/date-picker/messages.js.map +1 -0
- package/lib/commonjs/dialog/DialogHeader.js +12 -7
- package/lib/commonjs/dialog/DialogHeader.js.map +1 -1
- package/lib/commonjs/dialog/SheetShell.js +4 -2
- package/lib/commonjs/dialog/SheetShell.js.map +1 -1
- package/lib/commonjs/dropdown-menu/DropdownMenu.js +4 -1
- package/lib/commonjs/dropdown-menu/DropdownMenu.js.map +1 -1
- package/lib/commonjs/dropdown-menu/DropdownMenu.web.js +4 -1
- package/lib/commonjs/dropdown-menu/DropdownMenu.web.js.map +1 -1
- package/lib/commonjs/floating/FloatingPanel.js +3 -1
- package/lib/commonjs/floating/FloatingPanel.js.map +1 -1
- package/lib/commonjs/home-search/HomeSearchBar.js +5 -4
- package/lib/commonjs/home-search/HomeSearchBar.js.map +1 -1
- package/lib/commonjs/home-search/SavedSearchCard.js +7 -5
- package/lib/commonjs/home-search/SavedSearchCard.js.map +1 -1
- package/lib/commonjs/index.js +1063 -1034
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +1063 -1034
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/listing-card/ListingCard.js +5 -5
- package/lib/commonjs/listing-card/ListingCard.js.map +1 -1
- package/lib/commonjs/listing-details/ReviewCard.js +7 -5
- package/lib/commonjs/listing-details/ReviewCard.js.map +1 -1
- package/lib/commonjs/listing-editor/ListingQualityMeter.js +5 -4
- package/lib/commonjs/listing-editor/ListingQualityMeter.js.map +1 -1
- package/lib/commonjs/locale/common-messages.js +517 -0
- package/lib/commonjs/locale/common-messages.js.map +1 -0
- package/lib/commonjs/locale/context.js +35 -0
- package/lib/commonjs/locale/context.js.map +1 -0
- package/lib/commonjs/locale/format-date.js +34 -0
- package/lib/commonjs/locale/format-date.js.map +1 -0
- package/lib/commonjs/locale/index.js +32 -0
- package/lib/commonjs/locale/index.js.map +1 -0
- package/lib/commonjs/locale/languages.js +35 -0
- package/lib/commonjs/locale/languages.js.map +1 -0
- package/lib/commonjs/locale/messages.js +34 -0
- package/lib/commonjs/locale/messages.js.map +1 -0
- package/lib/commonjs/locale/plural.js +53 -0
- package/lib/commonjs/locale/plural.js.map +1 -0
- package/lib/commonjs/map-marker/MapListingPreview.js +7 -5
- package/lib/commonjs/map-marker/MapListingPreview.js.map +1 -1
- package/lib/commonjs/media-card/FriendActivityCard.js +3 -1
- package/lib/commonjs/media-card/FriendActivityCard.js.map +1 -1
- package/lib/commonjs/media-card/GenreCard.js +3 -1
- package/lib/commonjs/media-card/GenreCard.js.map +1 -1
- package/lib/commonjs/media-card/MediaCard.js +3 -1
- package/lib/commonjs/media-card/MediaCard.js.map +1 -1
- package/lib/commonjs/media-card/QuickAccessTile.js +4 -3
- package/lib/commonjs/media-card/QuickAccessTile.js.map +1 -1
- package/lib/commonjs/media-card/RecapCard.js +4 -3
- package/lib/commonjs/media-card/RecapCard.js.map +1 -1
- package/lib/commonjs/media-card/parts.js +5 -2
- package/lib/commonjs/media-card/parts.js.map +1 -1
- package/lib/commonjs/media-header/MediaActionBar.js +5 -4
- package/lib/commonjs/media-header/MediaActionBar.js.map +1 -1
- package/lib/commonjs/media-header/PopularTracks.js +5 -4
- package/lib/commonjs/media-header/PopularTracks.js.map +1 -1
- package/lib/commonjs/media-header/parts.js +6 -2
- package/lib/commonjs/media-header/parts.js.map +1 -1
- package/lib/commonjs/media-shelf/Shelf.js +7 -4
- package/lib/commonjs/media-shelf/Shelf.js.map +1 -1
- package/lib/commonjs/media-shelf/ShelfSkeleton.js +5 -3
- package/lib/commonjs/media-shelf/ShelfSkeleton.js.map +1 -1
- package/lib/commonjs/menubar/Menubar.web.js +4 -1
- package/lib/commonjs/menubar/Menubar.web.js.map +1 -1
- package/lib/commonjs/message-media/FileMessage.js +5 -3
- package/lib/commonjs/message-media/FileMessage.js.map +1 -1
- package/lib/commonjs/message-media/parts.js +4 -1
- package/lib/commonjs/message-media/parts.js.map +1 -1
- package/lib/commonjs/music-library/SearchField.js +4 -1
- package/lib/commonjs/music-library/SearchField.js.map +1 -1
- package/lib/commonjs/overlay/Overlay.js +4 -1
- package/lib/commonjs/overlay/Overlay.js.map +1 -1
- package/lib/commonjs/page-header/PageHeader.js +5 -4
- package/lib/commonjs/page-header/PageHeader.js.map +1 -1
- package/lib/commonjs/pagination/Pagination.js +7 -5
- package/lib/commonjs/pagination/Pagination.js.map +1 -1
- package/lib/commonjs/place-card/PlaceCard.js +5 -5
- package/lib/commonjs/place-card/PlaceCard.js.map +1 -1
- package/lib/commonjs/place-reviews/PlaceReviewCard.js +7 -5
- package/lib/commonjs/place-reviews/PlaceReviewCard.js.map +1 -1
- package/lib/commonjs/place-reviews/WriteReviewPrompt.js +5 -3
- package/lib/commonjs/place-reviews/WriteReviewPrompt.js.map +1 -1
- package/lib/commonjs/provider/BloomProvider.js +18 -13
- package/lib/commonjs/provider/BloomProvider.js.map +1 -1
- package/lib/commonjs/recent-hires-card/RecentHiresCard.js +7 -5
- package/lib/commonjs/recent-hires-card/RecentHiresCard.js.map +1 -1
- package/lib/commonjs/settings-modal/SettingsModal.js +3 -1
- package/lib/commonjs/settings-modal/SettingsModal.js.map +1 -1
- package/lib/commonjs/sidebar/Sidebar.js +5 -4
- package/lib/commonjs/sidebar/Sidebar.js.map +1 -1
- package/lib/commonjs/stay-filters/AmenityFilter.js +6 -2
- package/lib/commonjs/stay-filters/AmenityFilter.js.map +1 -1
- package/lib/commonjs/stay-search/GuestPicker.js +5 -3
- package/lib/commonjs/stay-search/GuestPicker.js.map +1 -1
- package/lib/commonjs/stepper/Stepper.js +4 -1
- package/lib/commonjs/stepper/Stepper.js.map +1 -1
- package/lib/commonjs/toast/ToastContent.js +3 -1
- package/lib/commonjs/toast/ToastContent.js.map +1 -1
- package/lib/commonjs/vendor-card/VendorCard.js +3 -2
- package/lib/commonjs/vendor-card/VendorCard.js.map +1 -1
- package/lib/commonjs/wizard/WizardFooter.js +7 -5
- package/lib/commonjs/wizard/WizardFooter.js.map +1 -1
- package/lib/module/activity-feed/ActivityFeed.js +8 -3
- package/lib/module/activity-feed/ActivityFeed.js.map +1 -1
- package/lib/module/alert-dialog/AlertDialog.js +4 -1
- package/lib/module/alert-dialog/AlertDialog.js.map +1 -1
- package/lib/module/announcement/Announcement.js +6 -3
- package/lib/module/announcement/Announcement.js.map +1 -1
- package/lib/module/app-shell/ProOfferCard.js +6 -3
- package/lib/module/app-shell/ProOfferCard.js.map +1 -1
- package/lib/module/calendar/shared.js +5 -11
- package/lib/module/calendar/shared.js.map +1 -1
- package/lib/module/chart-cards/medical-parts.js +6 -2
- package/lib/module/chart-cards/medical-parts.js.map +1 -1
- package/lib/module/chat-composer/ComposerBanner.js +6 -2
- package/lib/module/chat-composer/ComposerBanner.js.map +1 -1
- package/lib/module/chat-list/ChatSearchField.js +6 -3
- package/lib/module/chat-list/ChatSearchField.js.map +1 -1
- package/lib/module/composer-panel/ComposerPopover.js +3 -1
- package/lib/module/composer-panel/ComposerPopover.js.map +1 -1
- package/lib/module/data-table/DataTableRowActions.js +7 -3
- package/lib/module/data-table/DataTableRowActions.js.map +1 -1
- package/lib/module/data-table/DataTableSearch.js +6 -2
- package/lib/module/data-table/DataTableSearch.js.map +1 -1
- package/lib/module/date-picker/Calendar.js +11 -2
- package/lib/module/date-picker/Calendar.js.map +1 -1
- package/lib/module/date-picker/CalendarMonth.js +4 -3
- package/lib/module/date-picker/CalendarMonth.js.map +1 -1
- package/lib/module/date-picker/DatePicker.js +13 -4
- package/lib/module/date-picker/DatePicker.js.map +1 -1
- package/lib/module/date-picker/DateRangePicker.js +17 -13
- package/lib/module/date-picker/DateRangePicker.js.map +1 -1
- package/lib/module/date-picker/MeetingScheduler.js +18 -13
- package/lib/module/date-picker/MeetingScheduler.js.map +1 -1
- package/lib/module/date-picker/PickerShell.js +6 -4
- package/lib/module/date-picker/PickerShell.js.map +1 -1
- package/lib/module/date-picker/calendar-grid.js +7 -21
- package/lib/module/date-picker/calendar-grid.js.map +1 -1
- package/lib/module/date-picker/messages.js +523 -0
- package/lib/module/date-picker/messages.js.map +1 -0
- package/lib/module/dialog/DialogHeader.js +12 -7
- package/lib/module/dialog/DialogHeader.js.map +1 -1
- package/lib/module/dialog/SheetShell.js +4 -2
- package/lib/module/dialog/SheetShell.js.map +1 -1
- package/lib/module/dropdown-menu/DropdownMenu.js +4 -1
- package/lib/module/dropdown-menu/DropdownMenu.js.map +1 -1
- package/lib/module/dropdown-menu/DropdownMenu.web.js +4 -1
- package/lib/module/dropdown-menu/DropdownMenu.web.js.map +1 -1
- package/lib/module/floating/FloatingPanel.js +3 -1
- package/lib/module/floating/FloatingPanel.js.map +1 -1
- package/lib/module/home-search/HomeSearchBar.js +6 -3
- package/lib/module/home-search/HomeSearchBar.js.map +1 -1
- package/lib/module/home-search/SavedSearchCard.js +8 -4
- package/lib/module/home-search/SavedSearchCard.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -0
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/listing-card/ListingCard.js +6 -4
- package/lib/module/listing-card/ListingCard.js.map +1 -1
- package/lib/module/listing-details/ReviewCard.js +8 -4
- package/lib/module/listing-details/ReviewCard.js.map +1 -1
- package/lib/module/listing-editor/ListingQualityMeter.js +6 -3
- package/lib/module/listing-editor/ListingQualityMeter.js.map +1 -1
- package/lib/module/locale/common-messages.js +513 -0
- package/lib/module/locale/common-messages.js.map +1 -0
- package/lib/module/locale/context.js +30 -0
- package/lib/module/locale/context.js.map +1 -0
- package/lib/module/locale/format-date.js +30 -0
- package/lib/module/locale/format-date.js.map +1 -0
- package/lib/module/locale/index.js +7 -0
- package/lib/module/locale/index.js.map +1 -0
- package/lib/module/locale/languages.js +29 -0
- package/lib/module/locale/languages.js.map +1 -0
- package/lib/module/locale/messages.js +30 -0
- package/lib/module/locale/messages.js.map +1 -0
- package/lib/module/locale/plural.js +48 -0
- package/lib/module/locale/plural.js.map +1 -0
- package/lib/module/map-marker/MapListingPreview.js +8 -4
- package/lib/module/map-marker/MapListingPreview.js.map +1 -1
- package/lib/module/media-card/FriendActivityCard.js +3 -1
- package/lib/module/media-card/FriendActivityCard.js.map +1 -1
- package/lib/module/media-card/GenreCard.js +3 -1
- package/lib/module/media-card/GenreCard.js.map +1 -1
- package/lib/module/media-card/MediaCard.js +5 -3
- package/lib/module/media-card/MediaCard.js.map +1 -1
- package/lib/module/media-card/QuickAccessTile.js +5 -2
- package/lib/module/media-card/QuickAccessTile.js.map +1 -1
- package/lib/module/media-card/RecapCard.js +5 -2
- package/lib/module/media-card/RecapCard.js.map +1 -1
- package/lib/module/media-card/parts.js +5 -2
- package/lib/module/media-card/parts.js.map +1 -1
- package/lib/module/media-header/MediaActionBar.js +6 -3
- package/lib/module/media-header/MediaActionBar.js.map +1 -1
- package/lib/module/media-header/PopularTracks.js +6 -3
- package/lib/module/media-header/PopularTracks.js.map +1 -1
- package/lib/module/media-header/parts.js +8 -3
- package/lib/module/media-header/parts.js.map +1 -1
- package/lib/module/media-shelf/Shelf.js +8 -3
- package/lib/module/media-shelf/Shelf.js.map +1 -1
- package/lib/module/media-shelf/ShelfSkeleton.js +6 -2
- package/lib/module/media-shelf/ShelfSkeleton.js.map +1 -1
- package/lib/module/menubar/Menubar.web.js +4 -1
- package/lib/module/menubar/Menubar.web.js.map +1 -1
- package/lib/module/message-media/FileMessage.js +6 -2
- package/lib/module/message-media/FileMessage.js.map +1 -1
- package/lib/module/message-media/parts.js +6 -2
- package/lib/module/message-media/parts.js.map +1 -1
- package/lib/module/music-library/SearchField.js +6 -3
- package/lib/module/music-library/SearchField.js.map +1 -1
- package/lib/module/overlay/Overlay.js +4 -1
- package/lib/module/overlay/Overlay.js.map +1 -1
- package/lib/module/page-header/PageHeader.js +6 -3
- package/lib/module/page-header/PageHeader.js.map +1 -1
- package/lib/module/pagination/Pagination.js +8 -4
- package/lib/module/pagination/Pagination.js.map +1 -1
- package/lib/module/place-card/PlaceCard.js +6 -4
- package/lib/module/place-card/PlaceCard.js.map +1 -1
- package/lib/module/place-reviews/PlaceReviewCard.js +8 -4
- package/lib/module/place-reviews/PlaceReviewCard.js.map +1 -1
- package/lib/module/place-reviews/WriteReviewPrompt.js +6 -2
- package/lib/module/place-reviews/WriteReviewPrompt.js.map +1 -1
- package/lib/module/provider/BloomProvider.js +16 -11
- package/lib/module/provider/BloomProvider.js.map +1 -1
- package/lib/module/recent-hires-card/RecentHiresCard.js +8 -4
- package/lib/module/recent-hires-card/RecentHiresCard.js.map +1 -1
- package/lib/module/settings-modal/SettingsModal.js +3 -1
- package/lib/module/settings-modal/SettingsModal.js.map +1 -1
- package/lib/module/sidebar/Sidebar.js +6 -3
- package/lib/module/sidebar/Sidebar.js.map +1 -1
- package/lib/module/stay-filters/AmenityFilter.js +8 -3
- package/lib/module/stay-filters/AmenityFilter.js.map +1 -1
- package/lib/module/stay-search/GuestPicker.js +6 -2
- package/lib/module/stay-search/GuestPicker.js.map +1 -1
- package/lib/module/stepper/Stepper.js +4 -1
- package/lib/module/stepper/Stepper.js.map +1 -1
- package/lib/module/toast/ToastContent.js +3 -1
- package/lib/module/toast/ToastContent.js.map +1 -1
- package/lib/module/vendor-card/VendorCard.js +5 -3
- package/lib/module/vendor-card/VendorCard.js.map +1 -1
- package/lib/module/wizard/WizardFooter.js +8 -4
- package/lib/module/wizard/WizardFooter.js.map +1 -1
- package/lib/typescript/commonjs/activity-feed/ActivityFeed.d.ts +1 -1
- package/lib/typescript/commonjs/activity-feed/ActivityFeed.d.ts.map +1 -1
- package/lib/typescript/commonjs/alert-dialog/AlertDialog.d.ts +1 -1
- package/lib/typescript/commonjs/alert-dialog/AlertDialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/alert-dialog/index.d.ts +1 -1
- package/lib/typescript/commonjs/alert-dialog/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/alert-dialog/index.web.d.ts +1 -1
- package/lib/typescript/commonjs/alert-dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/announcement/Announcement.d.ts +1 -1
- package/lib/typescript/commonjs/announcement/Announcement.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/ProOfferCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/calendar/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/chart-cards/medical-parts.d.ts +1 -1
- package/lib/typescript/commonjs/chart-cards/medical-parts.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/ComposerBanner.d.ts +1 -1
- package/lib/typescript/commonjs/chat-composer/ComposerBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-list/ChatSearchField.d.ts +1 -1
- package/lib/typescript/commonjs/chat-list/ChatSearchField.d.ts.map +1 -1
- package/lib/typescript/commonjs/composer-panel/ComposerPopover.d.ts.map +1 -1
- package/lib/typescript/commonjs/data-table/DataTableRowActions.d.ts +1 -1
- package/lib/typescript/commonjs/data-table/DataTableRowActions.d.ts.map +1 -1
- package/lib/typescript/commonjs/data-table/DataTableSearch.d.ts +1 -1
- package/lib/typescript/commonjs/data-table/DataTableSearch.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/Calendar.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/CalendarMonth.d.ts +5 -3
- package/lib/typescript/commonjs/date-picker/CalendarMonth.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/DatePicker.d.ts +1 -1
- package/lib/typescript/commonjs/date-picker/DatePicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/DateRangePicker.d.ts +1 -1
- package/lib/typescript/commonjs/date-picker/DateRangePicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/MeetingScheduler.d.ts +1 -1
- package/lib/typescript/commonjs/date-picker/MeetingScheduler.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/PickerShell.d.ts +3 -3
- package/lib/typescript/commonjs/date-picker/PickerShell.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/calendar-grid.d.ts +1 -2
- package/lib/typescript/commonjs/date-picker/calendar-grid.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/messages.d.ts +31 -0
- package/lib/typescript/commonjs/date-picker/messages.d.ts.map +1 -0
- package/lib/typescript/commonjs/date-picker/types.d.ts +28 -24
- package/lib/typescript/commonjs/date-picker/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/SheetShell.d.ts.map +1 -1
- package/lib/typescript/commonjs/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/typescript/commonjs/dropdown-menu/DropdownMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/dropdown-menu/DropdownMenu.web.d.ts +1 -1
- package/lib/typescript/commonjs/dropdown-menu/DropdownMenu.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/floating/FloatingPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/home-search/HomeSearchBar.d.ts +1 -1
- package/lib/typescript/commonjs/home-search/HomeSearchBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/home-search/SavedSearchCard.d.ts +1 -1
- package/lib/typescript/commonjs/home-search/SavedSearchCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -0
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-card/ListingCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-details/ReviewCard.d.ts +1 -1
- package/lib/typescript/commonjs/listing-details/ReviewCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-editor/ListingQualityMeter.d.ts +1 -1
- package/lib/typescript/commonjs/listing-editor/ListingQualityMeter.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/common-messages.d.ts +54 -0
- package/lib/typescript/commonjs/locale/common-messages.d.ts.map +1 -0
- package/lib/typescript/commonjs/locale/context.d.ts +18 -0
- package/lib/typescript/commonjs/locale/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/locale/format-date.d.ts +13 -0
- package/lib/typescript/commonjs/locale/format-date.d.ts.map +1 -0
- package/lib/typescript/commonjs/locale/index.d.ts +3 -0
- package/lib/typescript/commonjs/locale/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/locale/languages.d.ts +16 -0
- package/lib/typescript/commonjs/locale/languages.d.ts.map +1 -0
- package/lib/typescript/commonjs/locale/messages.d.ts +18 -0
- package/lib/typescript/commonjs/locale/messages.d.ts.map +1 -0
- package/lib/typescript/commonjs/locale/plural.d.ts +19 -0
- package/lib/typescript/commonjs/locale/plural.d.ts.map +1 -0
- package/lib/typescript/commonjs/map-marker/MapListingPreview.d.ts +1 -1
- package/lib/typescript/commonjs/map-marker/MapListingPreview.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-card/FriendActivityCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-card/GenreCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-card/MediaCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-card/QuickAccessTile.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-card/RecapCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-card/parts.d.ts +1 -1
- package/lib/typescript/commonjs/media-card/parts.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-header/MediaActionBar.d.ts +1 -1
- package/lib/typescript/commonjs/media-header/MediaActionBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-header/PopularTracks.d.ts +1 -1
- package/lib/typescript/commonjs/media-header/PopularTracks.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-header/parts.d.ts +1 -1
- package/lib/typescript/commonjs/media-header/parts.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-shelf/Shelf.d.ts +1 -1
- package/lib/typescript/commonjs/media-shelf/Shelf.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-shelf/ShelfSkeleton.d.ts +1 -1
- package/lib/typescript/commonjs/media-shelf/ShelfSkeleton.d.ts.map +1 -1
- package/lib/typescript/commonjs/menubar/Menubar.web.d.ts +1 -1
- package/lib/typescript/commonjs/menubar/Menubar.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/message-media/FileMessage.d.ts +1 -1
- package/lib/typescript/commonjs/message-media/FileMessage.d.ts.map +1 -1
- package/lib/typescript/commonjs/message-media/parts.d.ts.map +1 -1
- package/lib/typescript/commonjs/music-library/SearchField.d.ts +1 -1
- package/lib/typescript/commonjs/music-library/SearchField.d.ts.map +1 -1
- package/lib/typescript/commonjs/overlay/Overlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/pagination/Pagination.d.ts.map +1 -1
- package/lib/typescript/commonjs/place-card/PlaceCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/place-reviews/PlaceReviewCard.d.ts +1 -1
- package/lib/typescript/commonjs/place-reviews/PlaceReviewCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/place-reviews/WriteReviewPrompt.d.ts +1 -1
- package/lib/typescript/commonjs/place-reviews/WriteReviewPrompt.d.ts.map +1 -1
- package/lib/typescript/commonjs/provider/BloomProvider.d.ts +1 -1
- package/lib/typescript/commonjs/provider/BloomProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/provider/types.d.ts +6 -0
- package/lib/typescript/commonjs/provider/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/recent-hires-card/RecentHiresCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/settings-modal/SettingsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/commonjs/stay-filters/AmenityFilter.d.ts +1 -1
- package/lib/typescript/commonjs/stay-filters/AmenityFilter.d.ts.map +1 -1
- package/lib/typescript/commonjs/stay-search/GuestPicker.d.ts +1 -1
- package/lib/typescript/commonjs/stay-search/GuestPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/stepper/Stepper.d.ts +1 -1
- package/lib/typescript/commonjs/stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/commonjs/toast/ToastContent.d.ts.map +1 -1
- package/lib/typescript/commonjs/vendor-card/VendorCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/wizard/WizardFooter.d.ts +1 -1
- package/lib/typescript/commonjs/wizard/WizardFooter.d.ts.map +1 -1
- package/lib/typescript/module/activity-feed/ActivityFeed.d.ts +1 -1
- package/lib/typescript/module/activity-feed/ActivityFeed.d.ts.map +1 -1
- package/lib/typescript/module/alert-dialog/AlertDialog.d.ts +1 -1
- package/lib/typescript/module/alert-dialog/AlertDialog.d.ts.map +1 -1
- package/lib/typescript/module/alert-dialog/index.d.ts +1 -1
- package/lib/typescript/module/alert-dialog/index.d.ts.map +1 -1
- package/lib/typescript/module/alert-dialog/index.web.d.ts +1 -1
- package/lib/typescript/module/alert-dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/module/announcement/Announcement.d.ts +1 -1
- package/lib/typescript/module/announcement/Announcement.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/ProOfferCard.d.ts.map +1 -1
- package/lib/typescript/module/calendar/shared.d.ts.map +1 -1
- package/lib/typescript/module/chart-cards/medical-parts.d.ts +1 -1
- package/lib/typescript/module/chart-cards/medical-parts.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/ComposerBanner.d.ts +1 -1
- package/lib/typescript/module/chat-composer/ComposerBanner.d.ts.map +1 -1
- package/lib/typescript/module/chat-list/ChatSearchField.d.ts +1 -1
- package/lib/typescript/module/chat-list/ChatSearchField.d.ts.map +1 -1
- package/lib/typescript/module/composer-panel/ComposerPopover.d.ts.map +1 -1
- package/lib/typescript/module/data-table/DataTableRowActions.d.ts +1 -1
- package/lib/typescript/module/data-table/DataTableRowActions.d.ts.map +1 -1
- package/lib/typescript/module/data-table/DataTableSearch.d.ts +1 -1
- package/lib/typescript/module/data-table/DataTableSearch.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/Calendar.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/CalendarMonth.d.ts +5 -3
- package/lib/typescript/module/date-picker/CalendarMonth.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/DatePicker.d.ts +1 -1
- package/lib/typescript/module/date-picker/DatePicker.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/DateRangePicker.d.ts +1 -1
- package/lib/typescript/module/date-picker/DateRangePicker.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/MeetingScheduler.d.ts +1 -1
- package/lib/typescript/module/date-picker/MeetingScheduler.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/PickerShell.d.ts +3 -3
- package/lib/typescript/module/date-picker/PickerShell.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/calendar-grid.d.ts +1 -2
- package/lib/typescript/module/date-picker/calendar-grid.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/messages.d.ts +31 -0
- package/lib/typescript/module/date-picker/messages.d.ts.map +1 -0
- package/lib/typescript/module/date-picker/types.d.ts +28 -24
- package/lib/typescript/module/date-picker/types.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -1
- package/lib/typescript/module/dialog/SheetShell.d.ts.map +1 -1
- package/lib/typescript/module/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/typescript/module/dropdown-menu/DropdownMenu.d.ts.map +1 -1
- package/lib/typescript/module/dropdown-menu/DropdownMenu.web.d.ts +1 -1
- package/lib/typescript/module/dropdown-menu/DropdownMenu.web.d.ts.map +1 -1
- package/lib/typescript/module/floating/FloatingPanel.d.ts.map +1 -1
- package/lib/typescript/module/home-search/HomeSearchBar.d.ts +1 -1
- package/lib/typescript/module/home-search/HomeSearchBar.d.ts.map +1 -1
- package/lib/typescript/module/home-search/SavedSearchCard.d.ts +1 -1
- package/lib/typescript/module/home-search/SavedSearchCard.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -0
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/listing-card/ListingCard.d.ts.map +1 -1
- package/lib/typescript/module/listing-details/ReviewCard.d.ts +1 -1
- package/lib/typescript/module/listing-details/ReviewCard.d.ts.map +1 -1
- package/lib/typescript/module/listing-editor/ListingQualityMeter.d.ts +1 -1
- package/lib/typescript/module/listing-editor/ListingQualityMeter.d.ts.map +1 -1
- package/lib/typescript/module/locale/common-messages.d.ts +54 -0
- package/lib/typescript/module/locale/common-messages.d.ts.map +1 -0
- package/lib/typescript/module/locale/context.d.ts +18 -0
- package/lib/typescript/module/locale/context.d.ts.map +1 -0
- package/lib/typescript/module/locale/format-date.d.ts +13 -0
- package/lib/typescript/module/locale/format-date.d.ts.map +1 -0
- package/lib/typescript/module/locale/index.d.ts +3 -0
- package/lib/typescript/module/locale/index.d.ts.map +1 -0
- package/lib/typescript/module/locale/languages.d.ts +16 -0
- package/lib/typescript/module/locale/languages.d.ts.map +1 -0
- package/lib/typescript/module/locale/messages.d.ts +18 -0
- package/lib/typescript/module/locale/messages.d.ts.map +1 -0
- package/lib/typescript/module/locale/plural.d.ts +19 -0
- package/lib/typescript/module/locale/plural.d.ts.map +1 -0
- package/lib/typescript/module/map-marker/MapListingPreview.d.ts +1 -1
- package/lib/typescript/module/map-marker/MapListingPreview.d.ts.map +1 -1
- package/lib/typescript/module/media-card/FriendActivityCard.d.ts.map +1 -1
- package/lib/typescript/module/media-card/GenreCard.d.ts.map +1 -1
- package/lib/typescript/module/media-card/MediaCard.d.ts.map +1 -1
- package/lib/typescript/module/media-card/QuickAccessTile.d.ts.map +1 -1
- package/lib/typescript/module/media-card/RecapCard.d.ts.map +1 -1
- package/lib/typescript/module/media-card/parts.d.ts +1 -1
- package/lib/typescript/module/media-card/parts.d.ts.map +1 -1
- package/lib/typescript/module/media-header/MediaActionBar.d.ts +1 -1
- package/lib/typescript/module/media-header/MediaActionBar.d.ts.map +1 -1
- package/lib/typescript/module/media-header/PopularTracks.d.ts +1 -1
- package/lib/typescript/module/media-header/PopularTracks.d.ts.map +1 -1
- package/lib/typescript/module/media-header/parts.d.ts +1 -1
- package/lib/typescript/module/media-header/parts.d.ts.map +1 -1
- package/lib/typescript/module/media-shelf/Shelf.d.ts +1 -1
- package/lib/typescript/module/media-shelf/Shelf.d.ts.map +1 -1
- package/lib/typescript/module/media-shelf/ShelfSkeleton.d.ts +1 -1
- package/lib/typescript/module/media-shelf/ShelfSkeleton.d.ts.map +1 -1
- package/lib/typescript/module/menubar/Menubar.web.d.ts +1 -1
- package/lib/typescript/module/menubar/Menubar.web.d.ts.map +1 -1
- package/lib/typescript/module/message-media/FileMessage.d.ts +1 -1
- package/lib/typescript/module/message-media/FileMessage.d.ts.map +1 -1
- package/lib/typescript/module/message-media/parts.d.ts.map +1 -1
- package/lib/typescript/module/music-library/SearchField.d.ts +1 -1
- package/lib/typescript/module/music-library/SearchField.d.ts.map +1 -1
- package/lib/typescript/module/overlay/Overlay.d.ts.map +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/module/pagination/Pagination.d.ts.map +1 -1
- package/lib/typescript/module/place-card/PlaceCard.d.ts.map +1 -1
- package/lib/typescript/module/place-reviews/PlaceReviewCard.d.ts +1 -1
- package/lib/typescript/module/place-reviews/PlaceReviewCard.d.ts.map +1 -1
- package/lib/typescript/module/place-reviews/WriteReviewPrompt.d.ts +1 -1
- package/lib/typescript/module/place-reviews/WriteReviewPrompt.d.ts.map +1 -1
- package/lib/typescript/module/provider/BloomProvider.d.ts +1 -1
- package/lib/typescript/module/provider/BloomProvider.d.ts.map +1 -1
- package/lib/typescript/module/provider/types.d.ts +6 -0
- package/lib/typescript/module/provider/types.d.ts.map +1 -1
- package/lib/typescript/module/recent-hires-card/RecentHiresCard.d.ts.map +1 -1
- package/lib/typescript/module/settings-modal/SettingsModal.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/module/stay-filters/AmenityFilter.d.ts +1 -1
- package/lib/typescript/module/stay-filters/AmenityFilter.d.ts.map +1 -1
- package/lib/typescript/module/stay-search/GuestPicker.d.ts +1 -1
- package/lib/typescript/module/stay-search/GuestPicker.d.ts.map +1 -1
- package/lib/typescript/module/stepper/Stepper.d.ts +1 -1
- package/lib/typescript/module/stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/module/toast/ToastContent.d.ts.map +1 -1
- package/lib/typescript/module/vendor-card/VendorCard.d.ts.map +1 -1
- package/lib/typescript/module/wizard/WizardFooter.d.ts +1 -1
- package/lib/typescript/module/wizard/WizardFooter.d.ts.map +1 -1
- package/package.json +18 -1
- package/src/activity-feed/ActivityFeed.tsx +6 -2
- package/src/alert-dialog/AlertDialog.tsx +4 -1
- package/src/announcement/Announcement.tsx +4 -1
- package/src/app-shell/ProOfferCard.tsx +4 -1
- package/src/calendar/shared.ts +5 -12
- package/src/chart-cards/medical-parts.tsx +6 -2
- package/src/chat-composer/ComposerBanner.tsx +4 -1
- package/src/chat-list/ChatSearchField.tsx +4 -1
- package/src/composer-panel/ComposerPopover.tsx +3 -1
- package/src/data-table/DataTableRowActions.tsx +5 -2
- package/src/data-table/DataTableSearch.tsx +4 -1
- package/src/date-picker/Calendar.tsx +8 -2
- package/src/date-picker/CalendarMonth.tsx +8 -5
- package/src/date-picker/DatePicker.tsx +10 -4
- package/src/date-picker/DateRangePicker.tsx +14 -13
- package/src/date-picker/MeetingScheduler.tsx +17 -11
- package/src/date-picker/PickerShell.tsx +6 -5
- package/src/date-picker/calendar-grid.ts +16 -23
- package/src/date-picker/messages.ts +470 -0
- package/src/date-picker/types.ts +28 -24
- package/src/dialog/DialogHeader.tsx +12 -7
- package/src/dialog/SheetShell.tsx +4 -2
- package/src/dropdown-menu/DropdownMenu.tsx +4 -1
- package/src/dropdown-menu/DropdownMenu.web.tsx +4 -1
- package/src/floating/FloatingPanel.tsx +3 -1
- package/src/home-search/HomeSearchBar.tsx +4 -1
- package/src/home-search/SavedSearchCard.tsx +6 -2
- package/src/index.ts +2 -0
- package/src/index.web.ts +2 -0
- package/src/listing-card/ListingCard.tsx +4 -2
- package/src/listing-details/ReviewCard.tsx +6 -2
- package/src/listing-editor/ListingQualityMeter.tsx +4 -1
- package/src/locale/common-messages.ts +554 -0
- package/src/locale/context.ts +23 -0
- package/src/locale/format-date.ts +28 -0
- package/src/locale/index.ts +4 -0
- package/src/locale/languages.ts +45 -0
- package/src/locale/messages.ts +29 -0
- package/src/locale/plural.ts +53 -0
- package/src/map-marker/MapListingPreview.tsx +6 -2
- package/src/media-card/FriendActivityCard.tsx +3 -1
- package/src/media-card/GenreCard.tsx +3 -1
- package/src/media-card/MediaCard.tsx +3 -1
- package/src/media-card/QuickAccessTile.tsx +3 -1
- package/src/media-card/RecapCard.tsx +3 -1
- package/src/media-card/parts.tsx +5 -2
- package/src/media-header/MediaActionBar.tsx +4 -1
- package/src/media-header/PopularTracks.tsx +4 -1
- package/src/media-header/parts.tsx +6 -2
- package/src/media-shelf/Shelf.tsx +6 -2
- package/src/media-shelf/ShelfSkeleton.tsx +4 -1
- package/src/menubar/Menubar.web.tsx +4 -1
- package/src/message-media/FileMessage.tsx +4 -1
- package/src/message-media/parts.tsx +4 -1
- package/src/music-library/SearchField.tsx +4 -1
- package/src/overlay/Overlay.tsx +4 -1
- package/src/page-header/PageHeader.tsx +4 -1
- package/src/pagination/Pagination.tsx +6 -2
- package/src/place-card/PlaceCard.tsx +4 -2
- package/src/place-reviews/PlaceReviewCard.tsx +6 -2
- package/src/place-reviews/WriteReviewPrompt.tsx +4 -1
- package/src/provider/BloomProvider.tsx +39 -35
- package/src/provider/types.ts +6 -0
- package/src/recent-hires-card/RecentHiresCard.tsx +6 -2
- package/src/settings-modal/SettingsModal.tsx +3 -1
- package/src/sidebar/Sidebar.tsx +4 -1
- package/src/stay-filters/AmenityFilter.tsx +6 -2
- package/src/stay-search/GuestPicker.tsx +4 -1
- package/src/stepper/Stepper.tsx +4 -1
- package/src/toast/ToastContent.tsx +3 -1
- package/src/vendor-card/VendorCard.tsx +3 -1
- 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
|
|
128
|
-
favoriteLabel
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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
|
);
|
package/src/media-card/parts.tsx
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
399
|
-
showLessLabel
|
|
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
|
|
73
|
-
nextLabel
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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);
|
package/src/overlay/Overlay.tsx
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
181
|
-
nextLabel
|
|
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=
|
|
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=
|
|
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
|
|
64
|
-
showLessLabel
|
|
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
|
|
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.`;
|