@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
package/src/calendar/shared.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Platform, useWindowDimensions } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
import { addDays, buildMonthGrid, isSameMonth, startOfDay } from '../date-picker/calendar-grid';
|
|
5
5
|
import type { CalendarViewEvent } from './types';
|
|
6
|
+
import { formatGregorian } from '../locale/format-date';
|
|
6
7
|
|
|
7
8
|
export const IS_WEB = Platform.OS === 'web';
|
|
8
9
|
|
|
@@ -95,18 +96,10 @@ export function currentGmtLabel(now: Date = new Date()): string {
|
|
|
95
96
|
return `GMT${offset >= 0 ? '+' : ''}${offset}`;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
|
-
function format(date: Date, locale: string | undefined, options: Intl.DateTimeFormatOptions): string | null {
|
|
99
|
-
try {
|
|
100
|
-
return new Intl.DateTimeFormat(locale, options).format(date);
|
|
101
|
-
} catch {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
99
|
/** `Tue, Aug 11` — the details panel's date line. */
|
|
107
100
|
export function formatEventDate(date: Date, locale?: string): string {
|
|
108
101
|
return (
|
|
109
|
-
|
|
102
|
+
formatGregorian(date, locale, {
|
|
110
103
|
weekday: 'short',
|
|
111
104
|
month: 'short',
|
|
112
105
|
day: 'numeric',
|
|
@@ -116,7 +109,7 @@ export function formatEventDate(date: Date, locale?: string): string {
|
|
|
116
109
|
|
|
117
110
|
/** `Aug` — the month switcher's label below `sm`. */
|
|
118
111
|
export function formatShortMonth(date: Date, locale?: string): string {
|
|
119
|
-
return
|
|
112
|
+
return formatGregorian(date, locale, { month: 'short' }) ?? String(date.getMonth() + 1);
|
|
120
113
|
}
|
|
121
114
|
|
|
122
115
|
/** `Sun` … `Sat` — the month grid's weekday pills. */
|
|
@@ -126,8 +119,8 @@ export function weekdayShortLabels(locale?: string): { short: string; long: stri
|
|
|
126
119
|
return fallback.map((name, index) => {
|
|
127
120
|
const date = addDays(sunday, index);
|
|
128
121
|
return {
|
|
129
|
-
short:
|
|
130
|
-
long:
|
|
122
|
+
short: formatGregorian(date, locale, { weekday: 'short' }) ?? name,
|
|
123
|
+
long: formatGregorian(date, locale, { weekday: 'long' }) ?? name,
|
|
131
124
|
};
|
|
132
125
|
});
|
|
133
126
|
}
|
|
@@ -11,6 +11,7 @@ import { TABULAR } from './primitives/ChartHeader';
|
|
|
11
11
|
import { FadeOnChange } from './primitives/FadeOnChange';
|
|
12
12
|
import { useChartCardPalette } from './primitives/use-chart-palette';
|
|
13
13
|
import { useCountUp } from './use-count-up';
|
|
14
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Chrome shared by the medical dashboard cards (`StepsCard`,
|
|
@@ -347,12 +348,15 @@ export function WeekRangePill({
|
|
|
347
348
|
label,
|
|
348
349
|
onPrev,
|
|
349
350
|
onNext,
|
|
350
|
-
prevLabel
|
|
351
|
-
nextLabel
|
|
351
|
+
prevLabel: prevLabelProp,
|
|
352
|
+
nextLabel: nextLabelProp,
|
|
352
353
|
width = 151,
|
|
353
354
|
style,
|
|
354
355
|
testID,
|
|
355
356
|
}: WeekRangePillProps) {
|
|
357
|
+
const common = useCommonMessages();
|
|
358
|
+
const prevLabel = prevLabelProp ?? common.previous;
|
|
359
|
+
const nextLabel = nextLabelProp ?? common.next;
|
|
356
360
|
const palette = useChartCardPalette();
|
|
357
361
|
const interactive = !!(onPrev || onNext);
|
|
358
362
|
const noop = () => {};
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
resolveChatComposerPalette,
|
|
24
24
|
} from './shared';
|
|
25
25
|
import type { ComposerBannerProps } from './types';
|
|
26
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
26
27
|
|
|
27
28
|
/** A URL passes through; a bare id goes to the app's `ImageResolver`. */
|
|
28
29
|
function isUrl(value: string): boolean {
|
|
@@ -37,12 +38,14 @@ export function ComposerBanner({
|
|
|
37
38
|
icon,
|
|
38
39
|
accentColor,
|
|
39
40
|
onClose,
|
|
40
|
-
closeLabel
|
|
41
|
+
closeLabel: closeLabelProp,
|
|
41
42
|
trailing,
|
|
42
43
|
style,
|
|
43
44
|
testID,
|
|
44
45
|
accessibilityLabel,
|
|
45
46
|
}: ComposerBannerProps) {
|
|
47
|
+
const common = useCommonMessages();
|
|
48
|
+
const closeLabel = closeLabelProp ?? common.cancel;
|
|
46
49
|
const theme = useTheme();
|
|
47
50
|
const palette = resolveChatComposerPalette(theme);
|
|
48
51
|
const resolveImage = useImageResolver();
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
resolveChatListPaint,
|
|
19
19
|
} from './shared';
|
|
20
20
|
import type { ChatSearchFieldProps } from './types';
|
|
21
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* The search pill above the conversations.
|
|
@@ -66,7 +67,7 @@ function ChatSearchFieldComponent({
|
|
|
66
67
|
onSubmit,
|
|
67
68
|
onFocus,
|
|
68
69
|
onBlur,
|
|
69
|
-
placeholder
|
|
70
|
+
placeholder: placeholderProp,
|
|
70
71
|
accessibilityLabel = 'Search chats',
|
|
71
72
|
clearLabel = 'Clear search',
|
|
72
73
|
trailing,
|
|
@@ -74,6 +75,8 @@ function ChatSearchFieldComponent({
|
|
|
74
75
|
style,
|
|
75
76
|
testID,
|
|
76
77
|
}: ChatSearchFieldProps) {
|
|
78
|
+
const common = useCommonMessages();
|
|
79
|
+
const placeholder = placeholderProp ?? common.search;
|
|
77
80
|
const theme = useTheme();
|
|
78
81
|
useEffect(() => {
|
|
79
82
|
adoptStyleSheet(CHAT_LIST_STYLE_ID, CHAT_LIST_CSS);
|
|
@@ -36,6 +36,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
36
36
|
|
|
37
37
|
import { TRANSITION_MS } from './shared';
|
|
38
38
|
import type { ComposerPopoverProps } from './types';
|
|
39
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
39
40
|
|
|
40
41
|
const GUTTER = 8;
|
|
41
42
|
const EASE_OUT = Easing.bezier(0, 0, 0.2, 1);
|
|
@@ -58,6 +59,7 @@ export function ComposerPopover({
|
|
|
58
59
|
testID,
|
|
59
60
|
children,
|
|
60
61
|
}: ComposerPopoverProps) {
|
|
62
|
+
const common = useCommonMessages();
|
|
61
63
|
const window = useWindowDimensions();
|
|
62
64
|
const insets = useSafeAreaInsets();
|
|
63
65
|
const reducedMotion = useReducedMotion();
|
|
@@ -136,7 +138,7 @@ export function ComposerPopover({
|
|
|
136
138
|
style={StyleSheet.absoluteFill}
|
|
137
139
|
onPress={close}
|
|
138
140
|
accessibilityRole="button"
|
|
139
|
-
accessibilityLabel=
|
|
141
|
+
accessibilityLabel={common.dismiss}
|
|
140
142
|
/>
|
|
141
143
|
<Animated.View
|
|
142
144
|
testID={testID}
|
|
@@ -12,6 +12,7 @@ import { RiMore2Fill } from '../icons/remix/RiMore2Fill';
|
|
|
12
12
|
import { useTheme } from '../theme/use-theme';
|
|
13
13
|
import { DataTableRowAction } from './DataTable';
|
|
14
14
|
import type { DataTableRowActionsProps } from './types';
|
|
15
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
15
16
|
|
|
16
17
|
/** `size-[18px] text-foreground-icon-secondary` — a menu entry's glyph. */
|
|
17
18
|
const MENU_ICON_SIZE = 18;
|
|
@@ -33,13 +34,15 @@ export function DataTableRowActions({
|
|
|
33
34
|
name,
|
|
34
35
|
actions = [],
|
|
35
36
|
menu = [],
|
|
36
|
-
menuLabel
|
|
37
|
+
menuLabel: menuLabelProp,
|
|
37
38
|
style,
|
|
38
39
|
testID,
|
|
39
40
|
}: DataTableRowActionsProps) {
|
|
41
|
+
const common = useCommonMessages();
|
|
42
|
+
const menuLabel = menuLabelProp ?? common.moreActions;
|
|
40
43
|
const theme = useTheme();
|
|
41
44
|
const [open, setOpen] = useState(false);
|
|
42
|
-
const menuName =
|
|
45
|
+
const menuName = common.labelFor(menuLabel, name);
|
|
43
46
|
|
|
44
47
|
return (
|
|
45
48
|
<View
|
|
@@ -6,6 +6,7 @@ import { BREAKPOINTS } from '../styles/breakpoints';
|
|
|
6
6
|
import { TextField, TextFieldIcon, TextFieldInput } from '../text-field';
|
|
7
7
|
import { TYPE_SCALE } from '../typography';
|
|
8
8
|
import type { DataTableSearchProps } from './types';
|
|
9
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
9
10
|
|
|
10
11
|
/** `w-[153px]` / `min-w-[153px]`. */
|
|
11
12
|
const SEARCH_WIDTH = 153;
|
|
@@ -20,9 +21,11 @@ export function DataTableSearch({
|
|
|
20
21
|
label,
|
|
21
22
|
value,
|
|
22
23
|
onValueChange,
|
|
23
|
-
placeholder
|
|
24
|
+
placeholder: placeholderProp,
|
|
24
25
|
testID,
|
|
25
26
|
}: DataTableSearchProps) {
|
|
27
|
+
const common = useCommonMessages();
|
|
28
|
+
const placeholder = placeholderProp ?? common.search;
|
|
26
29
|
const { width } = useWindowDimensions();
|
|
27
30
|
const narrow = width < BREAKPOINTS.sm;
|
|
28
31
|
return (
|
|
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
2
2
|
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useControllableState } from '../hooks/use-controllable-state';
|
|
5
|
+
import { useMessages } from '../locale/messages';
|
|
5
6
|
import { adoptStyleSheet } from '../styles/adopt-style-sheet';
|
|
6
7
|
import { useTheme } from '../theme/use-theme';
|
|
7
8
|
import {
|
|
@@ -21,6 +22,7 @@ import {
|
|
|
21
22
|
type DayCellState,
|
|
22
23
|
} from './calendar-grid';
|
|
23
24
|
import { CALENDAR_CSS, CalendarMonth, dayKey } from './CalendarMonth';
|
|
25
|
+
import { DATE_PICKER_MESSAGES } from './messages';
|
|
24
26
|
import { resolveCalendarPalette } from './palette';
|
|
25
27
|
import type {
|
|
26
28
|
CalendarConstraintProps,
|
|
@@ -73,13 +75,16 @@ function CalendarFrame({
|
|
|
73
75
|
maxDate,
|
|
74
76
|
isDateUnavailable,
|
|
75
77
|
weekStartsOn = 0,
|
|
76
|
-
locale,
|
|
78
|
+
locale: localeProp,
|
|
77
79
|
accessibilityLabel,
|
|
78
80
|
labels,
|
|
79
81
|
style,
|
|
80
82
|
testID,
|
|
81
83
|
}: CalendarFrameProps) {
|
|
82
84
|
const theme = useTheme();
|
|
85
|
+
const { locale, messages } = useMessages(DATE_PICKER_MESSAGES, localeProp);
|
|
86
|
+
const previousLabel = labels?.previousMonth ?? messages.previousMonth;
|
|
87
|
+
const nextLabel = labels?.nextMonth ?? messages.nextMonth;
|
|
83
88
|
const palette = useMemo(() => resolveCalendarPalette(theme), [theme]);
|
|
84
89
|
const [firstMonth, setFirstMonth] = useState(() => startOfMonth(initialDate));
|
|
85
90
|
const [focusedDate, setFocusedDate] = useState(() => startOfDay(initialDate));
|
|
@@ -202,7 +207,8 @@ function CalendarFrame({
|
|
|
202
207
|
onKeyDown={onKeyDown}
|
|
203
208
|
registerNode={registerNode}
|
|
204
209
|
accessibilityLabel={accessibilityLabel}
|
|
205
|
-
|
|
210
|
+
previousLabel={previousLabel}
|
|
211
|
+
nextLabel={nextLabel}
|
|
206
212
|
testID={testID ? `${testID}-month-${index}` : undefined}
|
|
207
213
|
/>
|
|
208
214
|
))}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
type DayCellState,
|
|
15
15
|
} from './calendar-grid';
|
|
16
16
|
import type { CalendarPalette } from './palette';
|
|
17
|
-
import type {
|
|
17
|
+
import type { WeekStart } from './types';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* One month panel: header, weekday row and day grid.
|
|
@@ -281,7 +281,9 @@ export interface CalendarMonthProps {
|
|
|
281
281
|
onKeyDown: (key: string, preventDefault: () => void) => void;
|
|
282
282
|
registerNode: (key: string, node: View | null) => void;
|
|
283
283
|
accessibilityLabel?: string;
|
|
284
|
-
|
|
284
|
+
/** The chevrons' names, already localised by the calendar. */
|
|
285
|
+
previousLabel: string;
|
|
286
|
+
nextLabel: string;
|
|
285
287
|
testID?: string;
|
|
286
288
|
}
|
|
287
289
|
|
|
@@ -309,7 +311,8 @@ export function CalendarMonth({
|
|
|
309
311
|
onKeyDown,
|
|
310
312
|
registerNode,
|
|
311
313
|
accessibilityLabel,
|
|
312
|
-
|
|
314
|
+
previousLabel,
|
|
315
|
+
nextLabel,
|
|
313
316
|
testID,
|
|
314
317
|
}: CalendarMonthProps) {
|
|
315
318
|
const title = formatMonthTitle(month, locale);
|
|
@@ -341,7 +344,7 @@ export function CalendarMonth({
|
|
|
341
344
|
{onPrevious ? (
|
|
342
345
|
<NavButton
|
|
343
346
|
direction="left"
|
|
344
|
-
label={
|
|
347
|
+
label={previousLabel}
|
|
345
348
|
onPress={onPrevious}
|
|
346
349
|
disabled={previousDisabled}
|
|
347
350
|
palette={palette}
|
|
@@ -358,7 +361,7 @@ export function CalendarMonth({
|
|
|
358
361
|
{onNext ? (
|
|
359
362
|
<NavButton
|
|
360
363
|
direction="right"
|
|
361
|
-
label={
|
|
364
|
+
label={nextLabel}
|
|
362
365
|
onPress={onNext}
|
|
363
366
|
disabled={nextDisabled}
|
|
364
367
|
palette={palette}
|
|
@@ -2,9 +2,11 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useControllableState } from '../hooks/use-controllable-state';
|
|
5
|
+
import { useMessages } from '../locale/messages';
|
|
5
6
|
import { Calendar } from './Calendar';
|
|
6
7
|
import { formatTriggerDate } from './calendar-grid';
|
|
7
8
|
import { DateChipInput } from './DateChipInput';
|
|
9
|
+
import { DATE_PICKER_MESSAGES } from './messages';
|
|
8
10
|
import { PickerActions, PickerShell, usePickerPalette } from './PickerShell';
|
|
9
11
|
import { SummaryPresence } from './SummaryPresence';
|
|
10
12
|
import type { DatePickerProps } from './types';
|
|
@@ -27,8 +29,8 @@ export function DatePicker({
|
|
|
27
29
|
value,
|
|
28
30
|
defaultValue = null,
|
|
29
31
|
onChange,
|
|
30
|
-
placeholder
|
|
31
|
-
accessibilityLabel
|
|
32
|
+
placeholder: placeholderProp,
|
|
33
|
+
accessibilityLabel: accessibilityLabelProp,
|
|
32
34
|
labels,
|
|
33
35
|
disabled,
|
|
34
36
|
open: openProp,
|
|
@@ -38,11 +40,14 @@ export function DatePicker({
|
|
|
38
40
|
maxDate,
|
|
39
41
|
isDateUnavailable,
|
|
40
42
|
weekStartsOn,
|
|
41
|
-
locale,
|
|
43
|
+
locale: localeProp,
|
|
42
44
|
style,
|
|
43
45
|
testID,
|
|
44
46
|
}: DatePickerProps) {
|
|
45
47
|
const palette = usePickerPalette();
|
|
48
|
+
const { locale, messages } = useMessages(DATE_PICKER_MESSAGES, localeProp);
|
|
49
|
+
const placeholder = placeholderProp ?? messages.datePlaceholder;
|
|
50
|
+
const accessibilityLabel = accessibilityLabelProp ?? messages.dateLabel;
|
|
46
51
|
const [committed, setCommitted] = useControllableState<Date | null>({
|
|
47
52
|
value,
|
|
48
53
|
defaultValue,
|
|
@@ -128,7 +133,8 @@ export function DatePicker({
|
|
|
128
133
|
setOpenState(false);
|
|
129
134
|
}}
|
|
130
135
|
applyDisabled={!pending}
|
|
131
|
-
|
|
136
|
+
cancelLabel={labels?.cancel ?? messages.cancel}
|
|
137
|
+
applyLabel={labels?.apply ?? messages.apply}
|
|
132
138
|
testID={testID}
|
|
133
139
|
/>
|
|
134
140
|
</View>
|
|
@@ -2,6 +2,7 @@ import React, { useMemo, useState } from 'react';
|
|
|
2
2
|
import { Platform, Pressable, View, useWindowDimensions, type TextStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useControllableState } from '../hooks/use-controllable-state';
|
|
5
|
+
import { useMessages } from '../locale/messages';
|
|
5
6
|
import type { WebCssStyle } from '../styles/web-view-style';
|
|
6
7
|
import { Text, TYPE_SCALE } from '../typography';
|
|
7
8
|
import {
|
|
@@ -13,6 +14,7 @@ import {
|
|
|
13
14
|
import { RangeCalendar } from './Calendar';
|
|
14
15
|
import { MONTH_PANEL_WIDTH } from './CalendarMonth';
|
|
15
16
|
import { DateChipInput } from './DateChipInput';
|
|
17
|
+
import { DATE_PICKER_MESSAGES } from './messages';
|
|
16
18
|
import type { CalendarPalette } from './palette';
|
|
17
19
|
import { PickerActions, PickerShell, usePickerPalette } from './PickerShell';
|
|
18
20
|
import { SummaryPresence } from './SummaryPresence';
|
|
@@ -36,11 +38,6 @@ import type { DateRange, DateRangePickerProps } from './types';
|
|
|
36
38
|
/** 16 + 118 + 12 + two panels + 8 between them + 8 — the popup width. */
|
|
37
39
|
const DUAL_MONTH_WIDTH = 16 + 118 + 12 + MONTH_PANEL_WIDTH * 2 + 8 + 8;
|
|
38
40
|
|
|
39
|
-
/** The pill's English default; `labels.daysSelected` takes the app's own plural rules. */
|
|
40
|
-
function daysSelected(days: number): string {
|
|
41
|
-
return `${days} day${days === 1 ? '' : 's'} selected`;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
41
|
/** `text-body-medium`, in Inter. */
|
|
45
42
|
const BODY: TextStyle = TYPE_SCALE['body-medium'];
|
|
46
43
|
|
|
@@ -90,8 +87,8 @@ export function DateRangePicker({
|
|
|
90
87
|
value,
|
|
91
88
|
defaultValue = null,
|
|
92
89
|
onChange,
|
|
93
|
-
placeholder
|
|
94
|
-
accessibilityLabel
|
|
90
|
+
placeholder: placeholderProp,
|
|
91
|
+
accessibilityLabel: accessibilityLabelProp,
|
|
95
92
|
quickSelect = true,
|
|
96
93
|
labels,
|
|
97
94
|
disabled,
|
|
@@ -102,11 +99,14 @@ export function DateRangePicker({
|
|
|
102
99
|
maxDate,
|
|
103
100
|
isDateUnavailable,
|
|
104
101
|
weekStartsOn,
|
|
105
|
-
locale,
|
|
102
|
+
locale: localeProp,
|
|
106
103
|
style,
|
|
107
104
|
testID,
|
|
108
105
|
}: DateRangePickerProps) {
|
|
109
106
|
const palette = usePickerPalette();
|
|
107
|
+
const { locale, messages } = useMessages(DATE_PICKER_MESSAGES, localeProp);
|
|
108
|
+
const placeholder = placeholderProp ?? messages.rangePlaceholder;
|
|
109
|
+
const accessibilityLabel = accessibilityLabelProp ?? messages.rangeLabel;
|
|
110
110
|
const { width: windowWidth } = useWindowDimensions();
|
|
111
111
|
const [committed, setCommitted] = useControllableState<DateRange | null>({
|
|
112
112
|
value,
|
|
@@ -161,7 +161,7 @@ export function DateRangePicker({
|
|
|
161
161
|
{presets.map((preset) => (
|
|
162
162
|
<PresetRow
|
|
163
163
|
key={preset.key}
|
|
164
|
-
label={labels?.presets?.[preset.key] ?? preset.
|
|
164
|
+
label={labels?.presets?.[preset.key] ?? messages.presets[preset.key]}
|
|
165
165
|
active={isSameRange(pending, preset.range)}
|
|
166
166
|
onPress={() => choose(preset.range)}
|
|
167
167
|
palette={palette}
|
|
@@ -213,7 +213,7 @@ export function DateRangePicker({
|
|
|
213
213
|
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 5 }}>
|
|
214
214
|
<DateChipInput
|
|
215
215
|
date={pending.start}
|
|
216
|
-
label={labels?.startDate ??
|
|
216
|
+
label={labels?.startDate ?? messages.startDate}
|
|
217
217
|
palette={palette}
|
|
218
218
|
onCommit={(start) =>
|
|
219
219
|
setPending({ start, end: start > pending.end ? start : pending.end })
|
|
@@ -222,7 +222,7 @@ export function DateRangePicker({
|
|
|
222
222
|
<Text style={{ ...BODY, color: palette.secondaryText }}>-</Text>
|
|
223
223
|
<DateChipInput
|
|
224
224
|
date={pending.end}
|
|
225
|
-
label={labels?.endDate ??
|
|
225
|
+
label={labels?.endDate ?? messages.endDate}
|
|
226
226
|
palette={palette}
|
|
227
227
|
onCommit={(end) =>
|
|
228
228
|
setPending({ start: end < pending.start ? end : pending.start, end })
|
|
@@ -241,7 +241,7 @@ export function DateRangePicker({
|
|
|
241
241
|
}}
|
|
242
242
|
>
|
|
243
243
|
<Text style={{ ...BODY, color: palette.secondaryText }}>
|
|
244
|
-
{(labels?.daysSelected ?? daysSelected)(days)}
|
|
244
|
+
{(labels?.daysSelected ?? messages.daysSelected)(days)}
|
|
245
245
|
</Text>
|
|
246
246
|
</View>
|
|
247
247
|
) : null}
|
|
@@ -259,7 +259,8 @@ export function DateRangePicker({
|
|
|
259
259
|
setOpenState(false);
|
|
260
260
|
}}
|
|
261
261
|
applyDisabled={!pending}
|
|
262
|
-
|
|
262
|
+
cancelLabel={labels?.cancel ?? messages.cancel}
|
|
263
|
+
applyLabel={labels?.apply ?? messages.apply}
|
|
263
264
|
testID={testID}
|
|
264
265
|
/>
|
|
265
266
|
</View>
|
|
@@ -16,11 +16,14 @@ import { useControllableState } from '../hooks/use-controllable-state';
|
|
|
16
16
|
import { RiFlagLine } from '../icons/remix/RiFlagLine';
|
|
17
17
|
import { RiGlobalLine } from '../icons/remix/RiGlobalLine';
|
|
18
18
|
import { RiVideoLine } from '../icons/remix/RiVideoLine';
|
|
19
|
+
import { formatGregorian } from '../locale/format-date';
|
|
20
|
+
import { useMessages } from '../locale/messages';
|
|
19
21
|
import type { WebCssStyle } from '../styles/web-view-style';
|
|
20
22
|
import { useTheme } from '../theme/use-theme';
|
|
21
23
|
import { Text, TYPE_SCALE } from '../typography';
|
|
22
24
|
import { Calendar } from './Calendar';
|
|
23
25
|
import { formatTriggerDate, today } from './calendar-grid';
|
|
26
|
+
import { DATE_PICKER_MESSAGES } from './messages';
|
|
24
27
|
import type { CalendarPalette } from './palette';
|
|
25
28
|
import { PickerShell, usePickerPalette } from './PickerShell';
|
|
26
29
|
import type {
|
|
@@ -95,11 +98,11 @@ function formatTime(time: string, format: MeetingSchedulerHourFormat): string {
|
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
function weekdayShort(date: Date, locale?: string): string {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
return (
|
|
102
|
+
formatGregorian(date, locale, { weekday: 'short' })?.slice(0, 2) ??
|
|
103
|
+
['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'][date.getDay()] ??
|
|
104
|
+
''
|
|
105
|
+
);
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
// ---------------------------------------------------------------------------
|
|
@@ -352,8 +355,8 @@ export function MeetingScheduler({
|
|
|
352
355
|
defaultValue,
|
|
353
356
|
onChange,
|
|
354
357
|
defaultHourFormat = '24h',
|
|
355
|
-
triggerLabel
|
|
356
|
-
accessibilityLabel
|
|
358
|
+
triggerLabel: triggerLabelProp,
|
|
359
|
+
accessibilityLabel: accessibilityLabelProp,
|
|
357
360
|
labels,
|
|
358
361
|
disabled,
|
|
359
362
|
open: openProp,
|
|
@@ -363,11 +366,14 @@ export function MeetingScheduler({
|
|
|
363
366
|
maxDate,
|
|
364
367
|
isDateUnavailable,
|
|
365
368
|
weekStartsOn,
|
|
366
|
-
locale,
|
|
369
|
+
locale: localeProp,
|
|
367
370
|
style,
|
|
368
371
|
testID,
|
|
369
372
|
}: MeetingSchedulerProps) {
|
|
370
373
|
const theme = useTheme();
|
|
374
|
+
const { locale, messages } = useMessages(DATE_PICKER_MESSAGES, localeProp);
|
|
375
|
+
const triggerLabel = triggerLabelProp ?? messages.meetingTrigger;
|
|
376
|
+
const accessibilityLabel = accessibilityLabelProp ?? messages.meetingLabel;
|
|
371
377
|
const palette = usePickerPalette();
|
|
372
378
|
const { width: windowWidth } = useWindowDimensions();
|
|
373
379
|
const slots = useMemo(() => timeSlots ?? defaultTimeSlots(), [timeSlots]);
|
|
@@ -397,8 +403,8 @@ export function MeetingScheduler({
|
|
|
397
403
|
|
|
398
404
|
const wide = windowWidth >= WIDE_WIDTH + 32;
|
|
399
405
|
const shadow2xs = theme.isDark ? SHADOW_2XS.dark : SHADOW_2XS.light;
|
|
400
|
-
const sendLabel = labels?.send ??
|
|
401
|
-
const durationText = (labels?.duration ??
|
|
406
|
+
const sendLabel = labels?.send ?? messages.send;
|
|
407
|
+
const durationText = (labels?.duration ?? messages.duration)(meeting.durationMinutes);
|
|
402
408
|
const chevron = useMemo(() => ({ open, color: palette.secondaryText }), [open, palette.secondaryText]);
|
|
403
409
|
|
|
404
410
|
const hostColumn = (
|
|
@@ -505,7 +511,7 @@ export function MeetingScheduler({
|
|
|
505
511
|
{formatTriggerDate(pending.date, locale)}
|
|
506
512
|
</Text>
|
|
507
513
|
<Text style={[BODY_MEDIUM, { color: palette.secondaryText }]}>
|
|
508
|
-
{pending.time ?? labels?.selectTime ??
|
|
514
|
+
{pending.time ?? labels?.selectTime ?? messages.selectTime}
|
|
509
515
|
</Text>
|
|
510
516
|
</>
|
|
511
517
|
) : null}
|
|
@@ -7,7 +7,6 @@ import { RiCalendarLine as CalendarIcon } from '../icons/remix/RiCalendarLine';
|
|
|
7
7
|
import { Popover, PopoverContent, PopoverTrigger } from '../popover';
|
|
8
8
|
import { useTheme } from '../theme/use-theme';
|
|
9
9
|
import { resolveCalendarPalette, type CalendarPalette } from './palette';
|
|
10
|
-
import type { DatePickerLabels } from './types';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* The chrome both pickers share (`date-picker/shared.tsx`).
|
|
@@ -100,22 +99,24 @@ export function PickerActions({
|
|
|
100
99
|
onCancel,
|
|
101
100
|
onApply,
|
|
102
101
|
applyDisabled,
|
|
103
|
-
|
|
102
|
+
cancelLabel,
|
|
103
|
+
applyLabel,
|
|
104
104
|
testID,
|
|
105
105
|
}: {
|
|
106
106
|
onCancel: () => void;
|
|
107
107
|
onApply: () => void;
|
|
108
108
|
applyDisabled: boolean;
|
|
109
|
-
|
|
109
|
+
cancelLabel: string;
|
|
110
|
+
applyLabel: string;
|
|
110
111
|
testID?: string;
|
|
111
112
|
}) {
|
|
112
113
|
return (
|
|
113
114
|
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
|
|
114
115
|
<Button onPress={onCancel} testID={testID ? `${testID}-cancel` : undefined} appearance="subtle" tone="neutral">
|
|
115
|
-
{
|
|
116
|
+
{cancelLabel}
|
|
116
117
|
</Button>
|
|
117
118
|
<Button onPress={onApply} disabled={applyDisabled} testID={testID ? `${testID}-apply` : undefined}>
|
|
118
|
-
{
|
|
119
|
+
{applyLabel}
|
|
119
120
|
</Button>
|
|
120
121
|
</View>
|
|
121
122
|
);
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import type { DateRange, DateRangePreset, WeekStart } from './types';
|
|
14
|
+
import { formatGregorian } from '../locale/format-date';
|
|
14
15
|
|
|
15
16
|
const MS_PER_DAY = 86_400_000;
|
|
16
17
|
|
|
@@ -130,37 +131,29 @@ export function weekdayLabels(
|
|
|
130
131
|
const sunday = new Date(2023, 0, 1);
|
|
131
132
|
return Array.from({ length: 7 }, (_, column) => {
|
|
132
133
|
const date = addDays(sunday, (weekStartsOn + column) % 7);
|
|
133
|
-
const long =
|
|
134
|
-
const short =
|
|
134
|
+
const long = formatGregorian(date, locale, { weekday: 'long' }) ?? FALLBACK_WEEKDAYS[date.getDay()]!;
|
|
135
|
+
const short = formatGregorian(date, locale, { weekday: 'short' }) ?? long;
|
|
135
136
|
return { short: short.slice(0, 2), long };
|
|
136
137
|
});
|
|
137
138
|
}
|
|
138
139
|
|
|
139
|
-
function format(date: Date, locale: string | undefined, options: Intl.DateTimeFormatOptions): string | null {
|
|
140
|
-
try {
|
|
141
|
-
return new Intl.DateTimeFormat(locale, options).format(date);
|
|
142
|
-
} catch {
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
140
|
/** `September 2026` — the month panel's title. */
|
|
148
141
|
export function formatMonthTitle(month: Date, locale?: string): string {
|
|
149
142
|
return (
|
|
150
|
-
|
|
143
|
+
formatGregorian(month, locale, { month: 'long', year: 'numeric' }) ??
|
|
151
144
|
`${month.getMonth() + 1}/${month.getFullYear()}`
|
|
152
145
|
);
|
|
153
146
|
}
|
|
154
147
|
|
|
155
148
|
/** `Sep 16, 2026` — the trigger's label. */
|
|
156
149
|
export function formatTriggerDate(date: Date, locale?: string): string {
|
|
157
|
-
return
|
|
150
|
+
return formatGregorian(date, locale, { month: 'short', day: 'numeric', year: 'numeric' }) ?? formatChipDate(date);
|
|
158
151
|
}
|
|
159
152
|
|
|
160
153
|
/** `Wednesday, September 16, 2026` — a day button's accessible name. */
|
|
161
154
|
export function formatAccessibleDate(date: Date, locale?: string): string {
|
|
162
155
|
return (
|
|
163
|
-
|
|
156
|
+
formatGregorian(date, locale, { weekday: 'long', month: 'long', day: 'numeric', year: 'numeric' }) ??
|
|
164
157
|
formatChipDate(date)
|
|
165
158
|
);
|
|
166
159
|
}
|
|
@@ -334,22 +327,22 @@ export function clampDate(date: Date, { minDate, maxDate }: DateConstraints): Da
|
|
|
334
327
|
return startOfDay(date);
|
|
335
328
|
}
|
|
336
329
|
|
|
337
|
-
/** Quick-select presets, relative to `now`.
|
|
330
|
+
/** Quick-select presets, relative to `now`. Their names are `DatePickerMessages.presets`. */
|
|
338
331
|
export function quickSelectPresets(
|
|
339
332
|
now: Date = today(),
|
|
340
|
-
): { key: DateRangePreset;
|
|
333
|
+
): { key: DateRangePreset; range: DateRange }[] {
|
|
341
334
|
const lastMonth = addMonths(now, -1);
|
|
342
335
|
const lastYear = new Date(now.getFullYear() - 1, now.getMonth(), 1);
|
|
343
336
|
const yesterday = addDays(now, -1);
|
|
344
337
|
return [
|
|
345
|
-
{ key: 'today',
|
|
346
|
-
{ key: 'yesterday',
|
|
347
|
-
{ key: 'lastWeek',
|
|
348
|
-
{ key: 'thisMonth',
|
|
349
|
-
{ key: 'lastMonth',
|
|
350
|
-
{ key: 'thisYear',
|
|
351
|
-
{ key: 'lastYear',
|
|
352
|
-
{ key: 'allTime',
|
|
338
|
+
{ key: 'today', range: { start: now, end: now } },
|
|
339
|
+
{ key: 'yesterday', range: { start: yesterday, end: yesterday } },
|
|
340
|
+
{ key: 'lastWeek', range: { start: addDays(now, -7), end: yesterday } },
|
|
341
|
+
{ key: 'thisMonth', range: { start: startOfMonth(now), end: endOfMonth(now) } },
|
|
342
|
+
{ key: 'lastMonth', range: { start: startOfMonth(lastMonth), end: endOfMonth(lastMonth) } },
|
|
343
|
+
{ key: 'thisYear', range: { start: startOfYear(now), end: endOfYear(now) } },
|
|
344
|
+
{ key: 'lastYear', range: { start: startOfYear(lastYear), end: endOfYear(lastYear) } },
|
|
345
|
+
{ key: 'allTime', range: { start: addMonths(now, -120), end: now } },
|
|
353
346
|
];
|
|
354
347
|
}
|
|
355
348
|
|