@planningcenter/chat-react-native 3.42.2-qa-staging.2 → 3.42.2-qa-821.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/attachments/attachment_card.d.ts +3 -3
- package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -1
- package/build/components/conversation/attachments/attachment_card.js +3 -7
- package/build/components/conversation/attachments/attachment_card.js.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts +1 -2
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.js +12 -7
- package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +6 -23
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts +1 -2
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
- package/build/components/conversation/attachments/expanded_link.js +2 -8
- package/build/components/conversation/attachments/expanded_link.js.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +2 -12
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +2 -7
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +16 -53
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/video_attachment.js +3 -13
- package/build/components/conversation/attachments/video_attachment.js.map +1 -1
- package/build/components/conversation/conversation_start_banner.d.ts +1 -2
- package/build/components/conversation/conversation_start_banner.d.ts.map +1 -1
- package/build/components/conversation/conversation_start_banner.js +2 -14
- package/build/components/conversation/conversation_start_banner.js.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.d.ts +1 -1
- package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js +2 -9
- package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.d.ts +1 -1
- package/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +2 -10
- package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
- package/build/components/conversation/message.d.ts +1 -2
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +2 -53
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +1 -2
- package/build/components/conversation/message_attachments.d.ts.map +1 -1
- package/build/components/conversation/message_attachments.js +17 -21
- package/build/components/conversation/message_attachments.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts +1 -2
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_file.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_file.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts +1 -2
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts +1 -2
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
- package/build/components/conversation/message_form.d.ts +5 -6
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +20 -82
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_markdown.d.ts +1 -2
- package/build/components/conversation/message_markdown.d.ts.map +1 -1
- package/build/components/conversation/message_markdown.js +8 -16
- package/build/components/conversation/message_markdown.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts +1 -2
- package/build/components/conversation/message_reaction.d.ts.map +1 -1
- package/build/components/conversation/message_reaction.js +3 -5
- package/build/components/conversation/message_reaction.js.map +1 -1
- package/build/components/conversation/message_read_receipts.d.ts +1 -2
- package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
- package/build/components/conversation/message_read_receipts.js +3 -13
- package/build/components/conversation/message_read_receipts.js.map +1 -1
- package/build/components/conversation/messages_disabled_banners.d.ts +3 -3
- package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +5 -8
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/components/conversation/reply_connectors.d.ts +2 -2
- package/build/components/conversation/reply_connectors.d.ts.map +1 -1
- package/build/components/conversation/reply_connectors.js +18 -50
- package/build/components/conversation/reply_connectors.js.map +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts +1 -2
- package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
- package/build/components/conversation/reply_shadow_message.js +16 -46
- package/build/components/conversation/reply_shadow_message.js.map +1 -1
- package/build/components/conversation/system_message.d.ts +1 -2
- package/build/components/conversation/system_message.d.ts.map +1 -1
- package/build/components/conversation/system_message.js +3 -12
- package/build/components/conversation/system_message.js.map +1 -1
- package/build/components/conversation/typing_indicator.d.ts +1 -2
- package/build/components/conversation/typing_indicator.d.ts.map +1 -1
- package/build/components/conversation/typing_indicator.js +3 -13
- package/build/components/conversation/typing_indicator.js.map +1 -1
- package/build/components/conversations/conversation_actions.d.ts +2 -2
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +4 -10
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts +2 -3
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +12 -76
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.d.ts +1 -1
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +16 -17
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/conversations_blank_state.d.ts +1 -2
- package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
- package/build/components/conversations/conversations_blank_state.js +2 -12
- package/build/components/conversations/conversations_blank_state.js.map +1 -1
- package/build/components/conversations/mute_indicator.d.ts +1 -2
- package/build/components/conversations/mute_indicator.d.ts.map +1 -1
- package/build/components/conversations/mute_indicator.js +2 -2
- package/build/components/conversations/mute_indicator.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts +1 -2
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +3 -10
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/conversations/unread_count_badge.d.ts +2 -4
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
- package/build/components/conversations/unread_count_badge.js +7 -12
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.d.ts +1 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +3 -13
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/adult_requirement_notice.d.ts +1 -2
- package/build/components/display/adult_requirement_notice.d.ts.map +1 -1
- package/build/components/display/adult_requirement_notice.js +2 -4
- package/build/components/display/adult_requirement_notice.js.map +1 -1
- package/build/components/display/avatar.d.ts +1 -2
- package/build/components/display/avatar.d.ts.map +1 -1
- package/build/components/display/avatar.js +2 -7
- package/build/components/display/avatar.js.map +1 -1
- package/build/components/display/avatar_group.d.ts +1 -2
- package/build/components/display/avatar_group.d.ts.map +1 -1
- package/build/components/display/avatar_group.js +2 -9
- package/build/components/display/avatar_group.js.map +1 -1
- package/build/components/display/badge.d.ts +1 -2
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +6 -37
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/banner.d.ts +3 -3
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +4 -11
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.d.ts +2 -2
- package/build/components/display/banner_collapsible.d.ts.map +1 -1
- package/build/components/display/banner_collapsible.js +2 -10
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/button.d.ts +1 -2
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js +3 -14
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/child_notice.d.ts +1 -2
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +3 -15
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/conversation_avatar.d.ts +1 -2
- package/build/components/display/conversation_avatar.d.ts.map +1 -1
- package/build/components/display/conversation_avatar.js +5 -9
- package/build/components/display/conversation_avatar.js.map +1 -1
- package/build/components/display/emoji_avatar.d.ts +1 -2
- package/build/components/display/emoji_avatar.d.ts.map +1 -1
- package/build/components/display/emoji_avatar.js +2 -12
- package/build/components/display/emoji_avatar.js.map +1 -1
- package/build/components/display/file_attachment_preview.d.ts +1 -1
- package/build/components/display/file_attachment_preview.d.ts.map +1 -1
- package/build/components/display/file_attachment_preview.js +3 -17
- package/build/components/display/file_attachment_preview.js.map +1 -1
- package/build/components/display/heading.d.ts +1 -2
- package/build/components/display/heading.d.ts.map +1 -1
- package/build/components/display/heading.js +2 -4
- package/build/components/display/heading.js.map +1 -1
- package/build/components/display/icon.d.ts +1 -2
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +4 -4
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_avatar.d.ts +1 -2
- package/build/components/display/icon_avatar.d.ts.map +1 -1
- package/build/components/display/icon_avatar.js +2 -12
- package/build/components/display/icon_avatar.js.map +1 -1
- package/build/components/display/icon_button.d.ts +1 -2
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.js +3 -5
- package/build/components/display/icon_button.js.map +1 -1
- package/build/components/display/image.d.ts +1 -2
- package/build/components/display/image.d.ts.map +1 -1
- package/build/components/display/image.js +3 -7
- package/build/components/display/image.js.map +1 -1
- package/build/components/display/image_attachment_preview.d.ts +1 -1
- package/build/components/display/image_attachment_preview.d.ts.map +1 -1
- package/build/components/display/image_attachment_preview.js +2 -7
- package/build/components/display/image_attachment_preview.js.map +1 -1
- package/build/components/display/keyboard_view.d.ts +1 -2
- package/build/components/display/keyboard_view.d.ts.map +1 -1
- package/build/components/display/keyboard_view.js +4 -9
- package/build/components/display/keyboard_view.js.map +1 -1
- package/build/components/display/person.d.ts +1 -2
- package/build/components/display/person.d.ts.map +1 -1
- package/build/components/display/person.js +2 -12
- package/build/components/display/person.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +3 -3
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +5 -10
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/display/pressable_row.d.ts +1 -1
- package/build/components/display/pressable_row.d.ts.map +1 -1
- package/build/components/display/pressable_row.js +2 -7
- package/build/components/display/pressable_row.js.map +1 -1
- package/build/components/display/spinner.d.ts +1 -2
- package/build/components/display/spinner.d.ts.map +1 -1
- package/build/components/display/spinner.js +3 -9
- package/build/components/display/spinner.js.map +1 -1
- package/build/components/display/switch.d.ts +1 -2
- package/build/components/display/switch.d.ts.map +1 -1
- package/build/components/display/switch.js +2 -2
- package/build/components/display/switch.js.map +1 -1
- package/build/components/display/tabs.d.ts +1 -1
- package/build/components/display/tabs.d.ts.map +1 -1
- package/build/components/display/tabs.js +21 -31
- package/build/components/display/tabs.js.map +1 -1
- package/build/components/display/text.d.ts +1 -2
- package/build/components/display/text.d.ts.map +1 -1
- package/build/components/display/text.js +2 -4
- package/build/components/display/text.js.map +1 -1
- package/build/components/display/text_button.d.ts +1 -2
- package/build/components/display/text_button.d.ts.map +1 -1
- package/build/components/display/text_button.js +3 -8
- package/build/components/display/text_button.js.map +1 -1
- package/build/components/display/text_inline_button.d.ts +1 -2
- package/build/components/display/text_inline_button.d.ts.map +1 -1
- package/build/components/display/text_inline_button.js +4 -5
- package/build/components/display/text_inline_button.js.map +1 -1
- package/build/components/display/text_input.d.ts +1 -1
- package/build/components/display/text_input.d.ts.map +1 -1
- package/build/components/display/text_input.js +2 -1
- package/build/components/display/text_input.js.map +1 -1
- package/build/components/display/toggle_button.d.ts +1 -2
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +3 -9
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/display/video_attachment_preview.d.ts +1 -1
- package/build/components/display/video_attachment_preview.d.ts.map +1 -1
- package/build/components/display/video_attachment_preview.js +3 -20
- package/build/components/display/video_attachment_preview.js.map +1 -1
- package/build/components/group_conversation_list.d.ts +1 -1
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +4 -14
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/components/page/component_error_boundary.d.ts +2 -2
- package/build/components/page/component_error_boundary.d.ts.map +1 -1
- package/build/components/page/component_error_boundary.js +2 -4
- package/build/components/page/component_error_boundary.js.map +1 -1
- package/build/components/page/loading.d.ts +1 -2
- package/build/components/page/loading.d.ts.map +1 -1
- package/build/components/page/loading.js +2 -4
- package/build/components/page/loading.js.map +1 -1
- package/build/components/page/page_error_boundary.d.ts +2 -2
- package/build/components/page/page_error_boundary.d.ts.map +1 -1
- package/build/components/page/page_error_boundary.js +11 -32
- package/build/components/page/page_error_boundary.js.map +1 -1
- package/build/components/primitive/avatar_primitive.js +14 -41
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.js +10 -18
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/components/primitive/blank_state_primitive.js +8 -12
- package/build/components/primitive/blank_state_primitive.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +1 -1
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +9 -22
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/components/safe_area_modal.d.ts +1 -1
- package/build/components/safe_area_modal.d.ts.map +1 -1
- package/build/components/safe_area_modal.js +2 -3
- package/build/components/safe_area_modal.js.map +1 -1
- package/build/contexts/api_provider.d.ts +1 -2
- package/build/contexts/api_provider.d.ts.map +1 -1
- package/build/contexts/api_provider.js +3 -5
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +1 -1
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +2 -1
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversation_context.d.ts +2 -2
- package/build/contexts/conversation_context.d.ts.map +1 -1
- package/build/contexts/conversation_context.js +3 -2
- package/build/contexts/conversation_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +2 -2
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +3 -2
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/contexts/session_context.d.ts +1 -1
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +3 -2
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/use_animated_message_background_color.d.ts +2 -2
- package/build/hooks/use_conversation.d.ts +1 -1
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +0 -2
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +19 -4
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_conversation_membership.d.ts +1 -1
- package/build/hooks/use_conversation_membership.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts +1 -0
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.js +2 -2
- package/build/hooks/use_conversation_messages.js.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts +36 -36
- package/build/hooks/use_conversations_actions.d.ts.map +1 -1
- package/build/hooks/use_conversations_actions.js +1 -3
- package/build/hooks/use_conversations_actions.js.map +1 -1
- package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
- package/build/hooks/use_mark_latest_message_read.js +4 -3
- package/build/hooks/use_mark_latest_message_read.js.map +1 -1
- package/build/hooks/use_person_settings.d.ts +1 -1
- package/build/index.d.ts +2 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js.map +1 -1
- package/build/navigation/chat_access_gate.d.ts +2 -2
- package/build/navigation/chat_access_gate.d.ts.map +1 -1
- package/build/navigation/chat_access_gate.js +6 -5
- package/build/navigation/chat_access_gate.js.map +1 -1
- package/build/navigation/index.d.ts +35 -36
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +19 -21
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/screenLayout.d.ts +2 -2
- package/build/navigation/screenLayout.d.ts.map +1 -1
- package/build/navigation/screenLayout.js +3 -9
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/polyfills/events/EventTarget.d.ts +1 -1
- package/build/polyfills/events/EventTarget.d.ts.map +1 -1
- package/build/polyfills/events/EventTarget.js.map +1 -1
- package/build/screens/age_check/age_check_required_screen.d.ts +1 -2
- package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_required_screen.js +3 -46
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts +1 -2
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.js +2 -25
- package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts +1 -2
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js +6 -25
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts +1 -2
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js +3 -5
- package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts +1 -2
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.js +9 -36
- package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
- package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_preview.js +5 -9
- package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
- package/build/screens/avatar_picker/color_picker.d.ts +1 -2
- package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
- package/build/screens/avatar_picker/color_picker.js +4 -5
- package/build/screens/avatar_picker/color_picker.js.map +1 -1
- package/build/screens/avatar_picker/emoji_tab.d.ts +1 -2
- package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
- package/build/screens/avatar_picker/emoji_tab.js +12 -13
- package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
- package/build/screens/avatar_picker/icon_grid.d.ts +1 -2
- package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
- package/build/screens/avatar_picker/icon_grid.js +4 -5
- package/build/screens/avatar_picker/icon_grid.js.map +1 -1
- package/build/screens/avatar_picker/upload_tab.d.ts +1 -2
- package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
- package/build/screens/avatar_picker/upload_tab.js +3 -4
- package/build/screens/avatar_picker/upload_tab.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts +1 -2
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +11 -117
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.d.ts +1 -2
- package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.js +4 -20
- package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts +1 -2
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +43 -106
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +3 -9
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.js +2 -12
- package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +20 -44
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts +1 -2
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +10 -11
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +6 -6
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +7 -34
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +2 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts +1 -2
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/group_filters.js +2 -2
- package/build/screens/conversation_filters/group_filters.js.map +1 -1
- package/build/screens/conversation_filters/team_filters.d.ts +1 -2
- package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/team_filters.js +2 -2
- package/build/screens/conversation_filters/team_filters.js.map +1 -1
- package/build/screens/conversation_filters_screen.d.ts +1 -2
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.js +4 -16
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts +2 -3
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
- package/build/screens/conversation_new/components/avatar_selection_row.js +6 -16
- package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.d.ts +3 -4
- package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +22 -46
- package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts +2 -3
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.js +4 -6
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +1 -2
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.js +4 -20
- package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts +1 -2
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +4 -30
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts +1 -2
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +27 -61
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js +2 -3
- package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +1 -2
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js +4 -4
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.d.ts +1 -2
- package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.js +4 -6
- package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +2 -3
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +25 -66
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +2 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +1 -2
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +2 -15
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -2
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js +2 -14
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js +2 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +2 -5
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -11
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +11 -83
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +7 -14
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +15 -18
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_type_screen.d.ts +1 -2
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_type_screen.js +3 -10
- package/build/screens/conversation_select_type_screen.js.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.d.ts +1 -2
- package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.js +3 -4
- package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts +1 -2
- package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.js +3 -5
- package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.d.ts +1 -2
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +19 -42
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +1 -2
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +2 -6
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.d.ts +1 -2
- package/build/screens/design_system_screen.d.ts.map +1 -1
- package/build/screens/design_system_screen.js +35 -558
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/get_help_screen.d.ts +1 -1
- package/build/screens/get_help_screen.d.ts.map +1 -1
- package/build/screens/get_help_screen.js +4 -25
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/group_notification_level_select_screen.d.ts +1 -2
- package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/group_notification_level_select_screen.js +2 -4
- package/build/screens/group_notification_level_select_screen.js.map +1 -1
- package/build/screens/group_notification_settings_screen.d.ts +1 -2
- package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
- package/build/screens/group_notification_settings_screen.js +3 -25
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/message_actions_screen.d.ts +1 -2
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.js +12 -28
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/message_preview.d.ts +1 -2
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
- package/build/screens/message_report/components/message_preview.js +2 -22
- package/build/screens/message_report/components/message_preview.js.map +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts +1 -2
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
- package/build/screens/message_report/components/report_reason_list.js +4 -13
- package/build/screens/message_report/components/report_reason_list.js.map +1 -1
- package/build/screens/message_report_screen.d.ts +1 -2
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +9 -61
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/not_found.d.ts +1 -2
- package/build/screens/not_found.d.ts.map +1 -1
- package/build/screens/not_found.js +2 -5
- package/build/screens/not_found.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.d.ts +1 -2
- package/build/screens/notification_settings_screen.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.js +28 -66
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app_selection_screen.d.ts +1 -2
- package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
- package/build/screens/preferred_app_selection_screen.js +3 -21
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/reactions_screen.d.ts +1 -2
- package/build/screens/reactions_screen.d.ts.map +1 -1
- package/build/screens/reactions_screen.js +7 -19
- package/build/screens/reactions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts +1 -2
- package/build/screens/send_giphy_screen.d.ts.map +1 -1
- package/build/screens/send_giphy_screen.js +5 -31
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/screens/settings_screen.d.ts +1 -2
- package/build/screens/settings_screen.d.ts.map +1 -1
- package/build/screens/settings_screen.js +4 -26
- package/build/screens/settings_screen.js.map +1 -1
- package/build/screens/system_message_people_screen.d.ts +1 -2
- package/build/screens/system_message_people_screen.d.ts.map +1 -1
- package/build/screens/system_message_people_screen.js +4 -10
- package/build/screens/system_message_people_screen.js.map +1 -1
- package/build/screens/team_conversation_screen.d.ts +1 -1
- package/build/screens/team_conversation_screen.d.ts.map +1 -1
- package/build/screens/team_conversation_screen.js +4 -12
- package/build/screens/team_conversation_screen.js.map +1 -1
- package/build/types/resources/conversation.d.ts +1 -10
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +0 -2
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/sha_256.js.map +1 -1
- package/build/utils/system_messages.d.ts +1 -1
- package/build/utils/system_messages.d.ts.map +1 -1
- package/build/utils/system_messages.js.map +1 -1
- package/build/utils/theme.d.ts +2 -2
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js.map +1 -1
- package/package.json +12 -12
- package/src/__tests__/hooks/use_attachment_uploader.test.tsx +1 -0
- package/src/__tests__/hooks/use_font_scale.test.ts +7 -3
- package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
- package/src/__tests__/utils/system_messages.ts +1 -1
- package/src/__tests__/utils/uri.ts +8 -50
- package/src/__utils__/handlers.ts +5 -6
- package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +10 -3
- package/src/components/conversations/conversation_preview.tsx +23 -58
- package/src/components/conversations/unread_count_badge.tsx +4 -13
- package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
- package/src/components/page/__tests__/error_boundary.test.tsx +6 -2
- package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
- package/src/hooks/use_conversation.ts +0 -2
- package/src/hooks/use_conversation_jolt_events.ts +19 -3
- package/src/hooks/use_conversation_messages.ts +6 -5
- package/src/hooks/use_conversations_actions.ts +1 -3
- package/src/hooks/use_mark_latest_message_read.ts +4 -3
- package/src/index.tsx +2 -1
- package/src/polyfills/events/EventTarget.ts +1 -1
- package/src/screens/conversation_screen.tsx +4 -2
- package/src/screens/conversations/components/list_header_component.tsx +6 -6
- package/src/types/resources/conversation.ts +1 -11
- package/src/utils/request/conversation.ts +0 -2
- package/src/utils/sha_256.ts +24 -24
- package/src/utils/system_messages.ts +1 -1
- package/src/utils/theme.ts +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
3
|
import { platformFontWeightMedium, pluralize } from '../../utils';
|
|
4
4
|
import BannerPrimitive from '../primitive/banner_primitive';
|
|
@@ -8,23 +8,11 @@ import { Text } from './text';
|
|
|
8
8
|
export function ChildNotice({ childMembers, showMembers = false, style }) {
|
|
9
9
|
const styles = useStyles();
|
|
10
10
|
const heading = `${pluralize(childMembers.length, 'member')} under age 13`;
|
|
11
|
-
return (
|
|
12
|
-
<BannerPrimitive.Text>
|
|
13
|
-
Under age members cannot chat. They won't see conversations or notifications.
|
|
14
|
-
</BannerPrimitive.Text>
|
|
15
|
-
{showMembers && (<View style={styles.childrenWrapper}>
|
|
16
|
-
{childMembers?.map(child => <Child key={child.id} child={child}/>)}
|
|
17
|
-
</View>)}
|
|
18
|
-
</BannerCollapsible>);
|
|
11
|
+
return (_jsxs(BannerCollapsible, { appearance: "warning", iconName: "general.shieldExclamation", heading: heading, style: style, children: [_jsx(BannerPrimitive.Text, { children: "Under age members cannot chat. They won't see conversations or notifications." }), showMembers && (_jsx(View, { style: styles.childrenWrapper, children: childMembers?.map(child => _jsx(Child, { child: child }, child.id)) }))] }));
|
|
19
12
|
}
|
|
20
13
|
function Child({ child }) {
|
|
21
14
|
const styles = useStyles();
|
|
22
|
-
return (
|
|
23
|
-
<Avatar sourceUri={child.avatar} size="sm"/>
|
|
24
|
-
<Text variant="tertiary" style={styles.name}>
|
|
25
|
-
{child.name}
|
|
26
|
-
</Text>
|
|
27
|
-
</View>);
|
|
15
|
+
return (_jsxs(View, { style: styles.child, children: [_jsx(Avatar, { sourceUri: child.avatar, size: "sm" }), _jsx(Text, { variant: "tertiary", style: styles.name, children: child.name })] }));
|
|
28
16
|
}
|
|
29
17
|
// =================================
|
|
30
18
|
// ====== Styles ===================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child_notice.js","sourceRoot":"","sources":["../../../src/components/display/child_notice.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"child_notice.js","sourceRoot":"","sources":["../../../src/components/display/child_notice.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAA;AAE/D,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,eAAe,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAY7B,MAAM,U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QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,wBAAwB;SACrC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { View, StyleSheet, type ViewStyle } from 'react-native'\nimport { MemberResource } from '../../types'\nimport { platformFontWeightMedium, pluralize } from '../../utils'\nimport BannerPrimitive from '../primitive/banner_primitive'\nimport { Avatar } from './avatar'\nimport { BannerCollapsible } from './banner_collapsible'\nimport { Text } from './text'\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface ChildNoticeProps {\n childMembers: MemberResource[]\n showMembers?: boolean\n style?: ViewStyle\n}\n\nexport function ChildNotice({ childMembers, showMembers = false, style }: ChildNoticeProps) {\n const styles = useStyles()\n const heading = `${pluralize(childMembers.length, 'member')} under age 13`\n\n return (\n <BannerCollapsible\n appearance=\"warning\"\n iconName=\"general.shieldExclamation\"\n heading={heading}\n style={style}\n >\n <BannerPrimitive.Text>\n Under age members cannot chat. They won't see conversations or notifications.\n </BannerPrimitive.Text>\n {showMembers && (\n <View style={styles.childrenWrapper}>\n {childMembers?.map(child => <Child key={child.id} child={child} />)}\n </View>\n )}\n </BannerCollapsible>\n )\n}\n\nfunction Child({ child }: { child: MemberResource }) {\n const styles = useStyles()\n return (\n <View style={styles.child}>\n <Avatar sourceUri={child.avatar} size=\"sm\" />\n <Text variant=\"tertiary\" style={styles.name}>\n {child.name}\n </Text>\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = () => {\n return StyleSheet.create({\n childrenWrapper: {\n marginTop: 8,\n gap: 8,\n },\n child: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n name: {\n fontWeight: platformFontWeightMedium,\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { ViewStyle } from 'react-native';
|
|
3
2
|
import type { ConversationResource } from '../../types';
|
|
4
3
|
import { type AvatarRootProps } from '../primitive/avatar_primitive';
|
|
@@ -12,6 +11,6 @@ interface ConversationAvatarProps {
|
|
|
12
11
|
style?: ViewStyle;
|
|
13
12
|
maxFontSizeMultiplier?: AvatarRootProps['maxFontSizeMultiplier'];
|
|
14
13
|
}
|
|
15
|
-
export declare function ConversationAvatar({ conversation, size, showFallback, fallbackIconName, style, maxFontSizeMultiplier, }: ConversationAvatarProps):
|
|
14
|
+
export declare function ConversationAvatar({ conversation, size, showFallback, fallbackIconName, style, maxFontSizeMultiplier, }: ConversationAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
export {};
|
|
17
16
|
//# sourceMappingURL=conversation_avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_avatar.d.ts","sourceRoot":"","sources":["../../../src/components/display/conversation_avatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation_avatar.d.ts","sourceRoot":"","sources":["../../../src/components/display/conversation_avatar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACvD,OAAwB,EAAE,KAAK,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAGrF,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAA;AAGxC,KAAK,sBAAsB,GAAG,IAAI,CAChC,oBAAoB,EAClB,kBAAkB,GAClB,iBAAiB,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,mBAAmB,CACtB,CAAA;AAgCD,UAAU,uBAAuB;IAC/B,YAAY,EAAE,sBAAsB,CAAA;IACpC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC,EAAE,UAAU,CAAA;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,qBAAqB,CAAC,EAAE,eAAe,CAAC,uBAAuB,CAAC,CAAA;CACjE;AAED,wBAAgB,kBAAkB,CAAC,EACjC,YAAY,EACZ,IAAW,EACX,YAAoB,EACpB,gBAAmC,EACnC,KAAK,EACL,qBAAqB,GACtB,EAAE,uBAAuB,2CA2BzB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import AvatarPrimitive from '../primitive/avatar_primitive';
|
|
3
3
|
import { AvatarGroup } from './avatar_group';
|
|
4
4
|
import { EmojiAvatar } from './emoji_avatar';
|
|
@@ -28,17 +28,13 @@ export function ConversationAvatar({ conversation, size = 'lg', showFallback = f
|
|
|
28
28
|
const sizeProps = { size, maxFontSizeMultiplier, style };
|
|
29
29
|
switch (avatar.kind) {
|
|
30
30
|
case 'image':
|
|
31
|
-
return (
|
|
32
|
-
<AvatarPrimitive.Mask>
|
|
33
|
-
<AvatarPrimitive.Image sourceUri={avatar.url}/>
|
|
34
|
-
</AvatarPrimitive.Mask>
|
|
35
|
-
</AvatarPrimitive.Root>);
|
|
31
|
+
return (_jsx(AvatarPrimitive.Root, { ...sizeProps, children: _jsx(AvatarPrimitive.Mask, { children: _jsx(AvatarPrimitive.Image, { sourceUri: avatar.url }) }) }));
|
|
36
32
|
case 'icon':
|
|
37
|
-
return
|
|
33
|
+
return _jsx(IconAvatar, { iconKey: avatar.iconKey, color: avatar.color, ...sizeProps });
|
|
38
34
|
case 'emoji':
|
|
39
|
-
return
|
|
35
|
+
return _jsx(EmojiAvatar, { emoji: avatar.emoji, color: avatar.color, ...sizeProps });
|
|
40
36
|
case 'group':
|
|
41
|
-
return (
|
|
37
|
+
return (_jsx(AvatarGroup, { sourceUris: avatar.sources || [], showFallback: showFallback || !avatar.sources || avatar.sources.length === 0, fallbackIconName: fallbackIconName, ...sizeProps }));
|
|
42
38
|
}
|
|
43
39
|
}
|
|
44
40
|
//# sourceMappingURL=conversation_avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_avatar.js","sourceRoot":"","sources":["../../../src/components/display/conversation_avatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation_avatar.js","sourceRoot":"","sources":["../../../src/components/display/conversation_avatar.tsx"],"names":[],"mappings":";AAGA,OAAO,eAAyC,MAAM,+BAA+B,CAAA;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAiB1C,SAAS,aAAa,CAAC,YAAoC;IACzD,IAAI,YAAY,CAAC,gBAAgB,KAAK,OAAO,IAAI,YAAY,CAAC,oBAAoB,EAAE,CAAC;QACnF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,CAAC,oBAAoB,EAAE,CAAA;IAClE,CAAC;IAED,IAAI,YAAY,CAAC,gBAAgB,KAAK,MAAM,IAAI,YAAY,CAAC,eAAe,EAAE,CAAC;QAC7E,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,YAAY,CAAC,eAAe;YACrC,KAAK,EAAE,YAAY,CAAC,iBAAiB,IAAI,IAAI;SAC9C,CAAA;IACH,CAAC;IAED,IAAI,YAAY,CAAC,gBAAgB,KAAK,OAAO,IAAI,YAAY,CAAC,eAAe,EAAE,CAAC;QAC9E,OAAO;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,YAAY,CAAC,eAAe;YACnC,KAAK,EAAE,YAAY,CAAC,iBAAiB,IAAI,IAAI;SAC9C,CAAA;IACH,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,iBAAiB,EAAE,CAAA;AACnE,CAAC;AAWD,MAAM,UAAU,kBAAkB,CAAC,EACjC,YAAY,EACZ,IAAI,GAAG,IAAI,EACX,YAAY,GAAG,KAAK,EACpB,gBAAgB,GAAG,gBAAgB,EACnC,KAAK,EACL,qBAAqB,GACG;IACxB,MAAM,MAAM,GAAG,aAAa,CAAC,YAAY,CAAC,CAAA;IAC1C,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,CAAA;IAExD,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,OAAO;YACV,OAAO,CACL,KAAC,eAAe,CAAC,IAAI,OAAK,SAAS,YACjC,KAAC,eAAe,CAAC,IAAI,cACnB,KAAC,eAAe,CAAC,KAAK,IAAC,SAAS,EAAE,MAAM,CAAC,GAAG,GAAI,GAC3B,GACF,CACxB,CAAA;QACH,KAAK,MAAM;YACT,OAAO,KAAC,UAAU,IAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,KAAM,SAAS,GAAI,CAAA;QACpF,KAAK,OAAO;YACV,OAAO,KAAC,WAAW,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,KAAM,SAAS,GAAI,CAAA;QACjF,KAAK,OAAO;YACV,OAAO,CACL,KAAC,WAAW,IACV,UAAU,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE,EAChC,YAAY,EAAE,YAAY,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAC5E,gBAAgB,EAAE,gBAAgB,KAC9B,SAAS,GACb,CACH,CAAA;IACL,CAAC;AACH,CAAC","sourcesContent":["import React from 'react'\nimport type { ViewStyle } from 'react-native'\nimport type { ConversationResource } from '../../types'\nimport AvatarPrimitive, { type AvatarRootProps } from '../primitive/avatar_primitive'\nimport { AvatarGroup } from './avatar_group'\nimport { EmojiAvatar } from './emoji_avatar'\nimport { type IconString } from './icon'\nimport { IconAvatar } from './icon_avatar'\n\ntype ConversationAvatarData = Pick<\n ConversationResource,\n | 'customAvatarType'\n | 'customAvatarKey'\n | 'customAvatarColor'\n | 'customAvatarImageUrl'\n | 'previewAvatarUrls'\n>\n\ntype ResolvedAvatar =\n | { kind: 'image'; url: string }\n | { kind: 'icon'; iconKey: string; color: string | null }\n | { kind: 'emoji'; emoji: string; color: string | null }\n | { kind: 'group'; sources: string[] | undefined }\n\nfunction resolveAvatar(conversation: ConversationAvatarData): ResolvedAvatar {\n if (conversation.customAvatarType === 'image' && conversation.customAvatarImageUrl) {\n return { kind: 'image', url: conversation.customAvatarImageUrl }\n }\n\n if (conversation.customAvatarType === 'icon' && conversation.customAvatarKey) {\n return {\n kind: 'icon',\n iconKey: conversation.customAvatarKey,\n color: conversation.customAvatarColor ?? null,\n }\n }\n\n if (conversation.customAvatarType === 'emoji' && conversation.customAvatarKey) {\n return {\n kind: 'emoji',\n emoji: conversation.customAvatarKey,\n color: conversation.customAvatarColor ?? null,\n }\n }\n\n return { kind: 'group', sources: conversation.previewAvatarUrls }\n}\n\ninterface ConversationAvatarProps {\n conversation: ConversationAvatarData\n size?: AvatarRootProps['size']\n showFallback?: boolean\n fallbackIconName?: IconString\n style?: ViewStyle\n maxFontSizeMultiplier?: AvatarRootProps['maxFontSizeMultiplier']\n}\n\nexport function ConversationAvatar({\n conversation,\n size = 'lg',\n showFallback = false,\n fallbackIconName = 'general.person',\n style,\n maxFontSizeMultiplier,\n}: ConversationAvatarProps) {\n const avatar = resolveAvatar(conversation)\n const sizeProps = { size, maxFontSizeMultiplier, style }\n\n switch (avatar.kind) {\n case 'image':\n return (\n <AvatarPrimitive.Root {...sizeProps}>\n <AvatarPrimitive.Mask>\n <AvatarPrimitive.Image sourceUri={avatar.url} />\n </AvatarPrimitive.Mask>\n </AvatarPrimitive.Root>\n )\n case 'icon':\n return <IconAvatar iconKey={avatar.iconKey} color={avatar.color} {...sizeProps} />\n case 'emoji':\n return <EmojiAvatar emoji={avatar.emoji} color={avatar.color} {...sizeProps} />\n case 'group':\n return (\n <AvatarGroup\n sourceUris={avatar.sources || []}\n showFallback={showFallback || !avatar.sources || avatar.sources.length === 0}\n fallbackIconName={fallbackIconName}\n {...sizeProps}\n />\n )\n }\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type AvatarRootProps } from '../primitive/avatar_primitive';
|
|
3
2
|
interface EmojiAvatarProps {
|
|
4
3
|
emoji: string;
|
|
@@ -7,6 +6,6 @@ interface EmojiAvatarProps {
|
|
|
7
6
|
maxFontSizeMultiplier?: AvatarRootProps['maxFontSizeMultiplier'];
|
|
8
7
|
style?: AvatarRootProps['style'];
|
|
9
8
|
}
|
|
10
|
-
export declare function EmojiAvatar({ emoji, color, size, maxFontSizeMultiplier, style, }: EmojiAvatarProps):
|
|
9
|
+
export declare function EmojiAvatar({ emoji, color, size, maxFontSizeMultiplier, style, }: EmojiAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
12
11
|
//# sourceMappingURL=emoji_avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji_avatar.d.ts","sourceRoot":"","sources":["../../../src/components/display/emoji_avatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emoji_avatar.d.ts","sourceRoot":"","sources":["../../../src/components/display/emoji_avatar.tsx"],"names":[],"mappings":"AAGA,OAAwB,EACtB,KAAK,eAAe,EAErB,MAAM,+BAA+B,CAAA;AAYtC,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,qBAAqB,CAAC,EAAE,eAAe,CAAC,uBAAuB,CAAC,CAAA;IAChE,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;CACjC;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,IAAW,EACX,qBAAqB,EACrB,KAAK,GACN,EAAE,gBAAgB,2CAgBlB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
import LinearGradient from 'react-native-linear-gradient';
|
|
4
4
|
import AvatarPrimitive from '../primitive/avatar_primitive';
|
|
@@ -13,17 +13,7 @@ const EMOJI_SIZE = {
|
|
|
13
13
|
};
|
|
14
14
|
export function EmojiAvatar({ emoji, color, size = 'lg', maxFontSizeMultiplier, style, }) {
|
|
15
15
|
const gradientProps = getAvatarGradientProps(color);
|
|
16
|
-
return (
|
|
17
|
-
<AvatarPrimitive.Mask>
|
|
18
|
-
<LinearGradient {...gradientProps} style={styles.gradientFill}>
|
|
19
|
-
<View style={styles.contentContainer}>
|
|
20
|
-
<Text allowFontScaling={false} style={{ fontSize: EMOJI_SIZE[size] }}>
|
|
21
|
-
{emoji}
|
|
22
|
-
</Text>
|
|
23
|
-
</View>
|
|
24
|
-
</LinearGradient>
|
|
25
|
-
</AvatarPrimitive.Mask>
|
|
26
|
-
</AvatarPrimitive.Root>);
|
|
16
|
+
return (_jsx(AvatarPrimitive.Root, { size: size, maxFontSizeMultiplier: maxFontSizeMultiplier, style: style, children: _jsx(AvatarPrimitive.Mask, { children: _jsx(LinearGradient, { ...gradientProps, style: styles.gradientFill, children: _jsx(View, { style: styles.contentContainer, children: _jsx(Text, { allowFontScaling: false, style: { fontSize: EMOJI_SIZE[size] }, children: emoji }) }) }) }) }));
|
|
27
17
|
}
|
|
28
18
|
const styles = StyleSheet.create({
|
|
29
19
|
gradientFill: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji_avatar.js","sourceRoot":"","sources":["../../../src/components/display/emoji_avatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emoji_avatar.js","sourceRo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c,EAAE,QAAQ;KACzB;CACF,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, Text, View } from 'react-native'\nimport LinearGradient from 'react-native-linear-gradient'\nimport AvatarPrimitive, {\n type AvatarRootProps,\n type AvatarSize,\n} from '../primitive/avatar_primitive'\nimport { getAvatarGradientProps } from './utils/avatar_gradient_colors'\n\nconst EMOJI_SIZE: Record<AvatarSize, number> = {\n xs: 8,\n sm: 10,\n md: 14,\n lg: 20,\n xl: 28,\n '2xl': 40,\n}\n\ninterface EmojiAvatarProps {\n emoji: string\n color?: string | null\n size?: AvatarRootProps['size']\n maxFontSizeMultiplier?: AvatarRootProps['maxFontSizeMultiplier']\n style?: AvatarRootProps['style']\n}\n\nexport function EmojiAvatar({\n emoji,\n color,\n size = 'lg',\n maxFontSizeMultiplier,\n style,\n}: EmojiAvatarProps) {\n const gradientProps = getAvatarGradientProps(color)\n\n return (\n <AvatarPrimitive.Root size={size} maxFontSizeMultiplier={maxFontSizeMultiplier} style={style}>\n <AvatarPrimitive.Mask>\n <LinearGradient {...gradientProps} style={styles.gradientFill}>\n <View style={styles.contentContainer}>\n <Text allowFontScaling={false} style={{ fontSize: EMOJI_SIZE[size] }}>\n {emoji}\n </Text>\n </View>\n </LinearGradient>\n </AvatarPrimitive.Mask>\n </AvatarPrimitive.Root>\n )\n}\n\nconst styles = StyleSheet.create({\n gradientFill: {\n width: '100%',\n height: '100%',\n },\n contentContainer: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n})\n"]}
|
|
@@ -6,6 +6,6 @@ interface FileAttachmentPreviewProps {
|
|
|
6
6
|
error?: boolean;
|
|
7
7
|
hideRemoveButton?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const FileAttachmentPreview: ({ name, contentType, onRemovePress, loading, error, hideRemoveButton, }: FileAttachmentPreviewProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const FileAttachmentPreview: ({ name, contentType, onRemovePress, loading, error, hideRemoveButton, }: FileAttachmentPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=file_attachment_preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file_attachment_preview.d.ts","sourceRoot":"","sources":["../../../src/components/display/file_attachment_preview.tsx"],"names":[],"mappings":"AAUA,UAAU,0BAA0B;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,eAAO,MAAM,qBAAqB,GAAI,yEAOnC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"file_attachment_preview.d.ts","sourceRoot":"","sources":["../../../src/components/display/file_attachment_preview.tsx"],"names":[],"mappings":"AAUA,UAAU,0BAA0B;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,eAAO,MAAM,qBAAqB,GAAI,yEAOnC,0BAA0B,4CA2C5B,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { View, StyleSheet } from 'react-native';
|
|
2
3
|
import { useTheme } from '../../hooks';
|
|
3
4
|
import { platformFontWeightMedium } from '../../utils';
|
|
@@ -10,24 +11,9 @@ import { Text } from './text';
|
|
|
10
11
|
export const FileAttachmentPreview = ({ name, contentType, onRemovePress, loading = false, error = false, hideRemoveButton = false, }) => {
|
|
11
12
|
const styles = useStyles({ error });
|
|
12
13
|
if (loading) {
|
|
13
|
-
return (
|
|
14
|
-
<Spinner size={20} style={styles.spinner}/>
|
|
15
|
-
</View>);
|
|
14
|
+
return (_jsx(View, { style: styles.container, children: _jsx(Spinner, { size: 20, style: styles.spinner }) }));
|
|
16
15
|
}
|
|
17
|
-
return (
|
|
18
|
-
<View style={styles.contentContainer}>
|
|
19
|
-
<Icon name={getAttachmentIconName(contentType)} size={18} style={styles.fileIcon}/>
|
|
20
|
-
<View style={styles.textContainer}>
|
|
21
|
-
<Text variant="tertiary" numberOfLines={1} style={styles.nameText} accessibilityLabel={`File attachment: ${name}`}>
|
|
22
|
-
{name}
|
|
23
|
-
</Text>
|
|
24
|
-
</View>
|
|
25
|
-
</View>
|
|
26
|
-
{!hideRemoveButton && (<IconButton name="general.x" onPress={onRemovePress} size="xxs" appearance="neutral" style={styles.closeButton} accessibilityLabel="Remove file attachment"/>)}
|
|
27
|
-
{error && (<View style={styles.errorBadge}>
|
|
28
|
-
<Icon name="general.exclamationTriangle" size={12} style={styles.errorIcon}/>
|
|
29
|
-
</View>)}
|
|
30
|
-
</View>);
|
|
16
|
+
return (_jsxs(View, { style: styles.container, children: [_jsxs(View, { style: styles.contentContainer, children: [_jsx(Icon, { name: getAttachmentIconName(contentType), size: 18, style: styles.fileIcon }), _jsx(View, { style: styles.textContainer, children: _jsx(Text, { variant: "tertiary", numberOfLines: 1, style: styles.nameText, accessibilityLabel: `File attachment: ${name}`, children: name }) })] }), !hideRemoveButton && (_jsx(IconButton, { name: "general.x", onPress: onRemovePress, size: "xxs", appearance: "neutral", style: styles.closeButton, accessibilityLabel: "Remove file attachment" })), error && (_jsx(View, { style: styles.errorBadge, children: _jsx(Icon, { name: "general.exclamationTriangle", size: 12, style: styles.errorIcon }) }))] }));
|
|
31
17
|
};
|
|
32
18
|
const useStyles = ({ error }) => {
|
|
33
19
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file_attachment_preview.js","sourceRoot":"","sources":["../../../src/components/display/file_attachment_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAW7B,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,IAAI,EACJ,WAAW,EACX,aAAa,EACb,OAAO,GAAG,KAAK,EACf,KAAK,GAAG,KAAK,EACb,gBAAgB,GAAG,KAAK,GACG,EAAE,EAAE;IAC/B,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAEnC,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"file_attachment_preview.js","sourceRoot":"","sources":["../../../src/components/display/file_attachment_preview.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,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ACD,QAAQ,EAAE;YACR,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB;YAC/E,UAAU,EAAE,wBAAwB;YACpC,UAAU,EAAE,CAAC;SACd;QACD,WAAW,EAAE;YACX,eAAe,EAAE,MAAM,CAAC,uBAAuB;YAC/C,YAAY,EAAE,EAAE;YAChB,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,YAAY;SACxB;QACD,UAAU,EAAE;YACV,eAAe,EAAE,MAAM,CAAC,iBAAiB;YACzC,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,sBAAsB,EAAE,YAAY;YACpC,OAAO,EAAE,CAAC;SACX;QACD,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,oBAAoB;YAClC,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;YAC9B,QAAQ,EAAE,EAAE;SACb;QACD,OAAO,EAAE;YACP,gBAAgB,EAAE,MAAM;SACzB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { View, StyleSheet } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { platformFontWeightMedium } from '../../utils'\nimport { getAttachmentIconName } from '../../utils/attachment_kind'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { Icon } from './icon'\nimport { IconButton } from './icon_button'\nimport { Spinner } from './spinner'\nimport { Text } from './text'\n\ninterface FileAttachmentPreviewProps {\n name: string\n contentType?: string\n onRemovePress: () => void\n loading?: boolean\n error?: boolean\n hideRemoveButton?: boolean\n}\n\nexport const FileAttachmentPreview = ({\n name,\n contentType,\n onRemovePress,\n loading = false,\n error = false,\n hideRemoveButton = false,\n}: FileAttachmentPreviewProps) => {\n const styles = useStyles({ error })\n\n if (loading) {\n return (\n <View style={styles.container}>\n <Spinner size={20} style={styles.spinner} />\n </View>\n )\n }\n\n return (\n <View style={styles.container}>\n <View style={styles.contentContainer}>\n <Icon name={getAttachmentIconName(contentType)} size={18} style={styles.fileIcon} />\n <View style={styles.textContainer}>\n <Text\n variant=\"tertiary\"\n numberOfLines={1}\n style={styles.nameText}\n accessibilityLabel={`File attachment: ${name}`}\n >\n {name}\n </Text>\n </View>\n </View>\n {!hideRemoveButton && (\n <IconButton\n name=\"general.x\"\n onPress={onRemovePress}\n size=\"xxs\"\n appearance=\"neutral\"\n style={styles.closeButton}\n accessibilityLabel=\"Remove file attachment\"\n />\n )}\n {error && (\n <View style={styles.errorBadge}>\n <Icon name=\"general.exclamationTriangle\" size={12} style={styles.errorIcon} />\n </View>\n )}\n </View>\n )\n}\n\nconst useStyles = ({ error }: Partial<FileAttachmentPreviewProps>) => {\n const { colors } = useTheme()\n const borderRadius = 8\n\n return StyleSheet.create({\n container: {\n height: 60,\n minWidth: 150,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 8,\n backgroundColor: colors.fillColorNeutral070,\n borderColor: error ? colors.statusErrorBorder : colors.borderColorDefaultBase,\n borderWidth: error ? 2 : 1,\n borderRadius,\n padding: 4,\n },\n contentContainer: {\n flexDirection: 'row',\n gap: 8,\n alignItems: 'center',\n flexShrink: 1,\n paddingHorizontal: 8,\n paddingVertical: 4,\n },\n textContainer: {\n flexShrink: 1,\n flexDirection: 'column',\n },\n fileIcon: {\n color: error ? colors.iconColorDefaultDisabled : colors.iconColorDefaultPrimary,\n },\n nameText: {\n color: error ? colors.textColorDefaultDisabled : colors.textColorDefaultPrimary,\n fontWeight: platformFontWeightMedium,\n flexShrink: 1,\n },\n closeButton: {\n backgroundColor: colors.fillColorNeutral050Base,\n borderRadius: 16,\n height: 20,\n width: 20,\n alignSelf: 'flex-start',\n },\n errorBadge: {\n backgroundColor: colors.statusErrorBorder,\n position: 'absolute',\n bottom: 0,\n right: 0,\n zIndex: 2,\n borderStartStartRadius: borderRadius,\n padding: 4,\n },\n errorIcon: {\n color: tokens.colorNeutral100White,\n transform: [{ translateX: 1 }],\n fontSize: 10,\n },\n spinner: {\n marginHorizontal: 'auto',\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TextProps as ReactNativeTextProps } from 'react-native';
|
|
3
2
|
export interface HeadingProps extends ReactNativeTextProps {
|
|
4
3
|
/**
|
|
@@ -7,5 +6,5 @@ export interface HeadingProps extends ReactNativeTextProps {
|
|
|
7
6
|
*/
|
|
8
7
|
variant?: 'h1' | 'h2' | 'h3' | 'h4';
|
|
9
8
|
}
|
|
10
|
-
export declare function Heading({ style, variant, children, ...props }: HeadingProps):
|
|
9
|
+
export declare function Heading({ style, variant, children, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
//# sourceMappingURL=heading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../src/components/display/heading.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../src/components/display/heading.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,SAAS,IAAI,oBAAoB,EAClC,MAAM,cAAc,CAAA;AASrB,MAAM,WAAW,YAAa,SAAQ,oBAAoB;IACxD;;;OAGG;IACH,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CACpC;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,OAAc,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CAkBlF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Platform, StyleSheet, Text as ReactNativeText, } from 'react-native';
|
|
3
3
|
import { useTheme } from '../../hooks';
|
|
4
4
|
import { platformFontWeightBold } from '../../utils/styles';
|
|
@@ -11,9 +11,7 @@ export function Heading({ style, variant = 'h1', children, ...props }) {
|
|
|
11
11
|
h3: styles.heading3,
|
|
12
12
|
h4: styles.heading4,
|
|
13
13
|
};
|
|
14
|
-
return (
|
|
15
|
-
{children}
|
|
16
|
-
</ReactNativeText>);
|
|
14
|
+
return (_jsx(ReactNativeText, { style: [styles.global, variantStyleMap[variant], style], accessibilityRole: "header", ...props, children: children }));
|
|
17
15
|
}
|
|
18
16
|
// =================================
|
|
19
17
|
// ====== Styles ===================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../../../src/components/display/heading.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../../../src/components/display/heading.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EACR,UAAU,EACV,IAAI,IAAI,eAAe,GAExB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAcrD,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAgB;IACjF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,eAAe,GAAG;QACtB,EAAE,EAAE,MAAM,CAAC,QAAQ;QACnB,EAAE,EAAE,MAAM,CAAC,QAAQ;QACnB,EAAE,EAAE,MAAM,CAAC,QAAQ;QACnB,EAAE,EAAE,MAAM,CAAC,QAAQ;KACpB,CAAA;IAED,OAAO,CACL,KAAC,eAAe,IACd,KAAK,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,EACvD,iBAAiB,EAAC,QAAQ,KACtB,KAAK,YAER,QAAQ,GACO,CACnB,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,MAAM,EAAE;YACN,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC;gBAC1B,GAAG,EAAE,QAAQ;gBACb,OAAO,EAAE,QAAQ;aAClB,CAAC;SACH;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,wBAAwB;YACtC,QAAQ,EAAE,MAAM,CAAC,WAAW;SAC7B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,wBAAwB;YACtC,UAAU,EAAE,sBAAsB;YAClC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,wBAAwB;YACtC,UAAU,EAAE,sBAAsB;YAClC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,yBAAyB;YACvC,UAAU,EAAE,sBAAsB;YAClC,QAAQ,EAAE,MAAM,CAAC,UAAU;YAC3B,aAAa,EAAE,WAAW;SAC3B;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport {\n Platform,\n StyleSheet,\n Text as ReactNativeText,\n TextProps as ReactNativeTextProps,\n} from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { platformFontWeightBold } from '../../utils/styles'\nimport { tokens } from '../../vendor/tapestry/tokens'\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport interface HeadingProps extends ReactNativeTextProps {\n /**\n * Changes the styles and size of the text.\n * Semantically all React Native headings have the same 'hierarchical' level.\n */\n variant?: 'h1' | 'h2' | 'h3' | 'h4'\n}\n\nexport function Heading({ style, variant = 'h1', children, ...props }: HeadingProps) {\n const styles = useStyles()\n const variantStyleMap = {\n h1: styles.heading1,\n h2: styles.heading2,\n h3: styles.heading3,\n h4: styles.heading4,\n }\n\n return (\n <ReactNativeText\n style={[styles.global, variantStyleMap[variant], style]}\n accessibilityRole=\"header\"\n {...props}\n >\n {children}\n </ReactNativeText>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n global: {\n fontFamily: Platform.select({\n ios: 'System',\n android: 'normal',\n }),\n },\n heading1: {\n color: colors.textColorDefaultHeadline,\n fontSize: tokens.fontSize2xl,\n },\n heading2: {\n color: colors.textColorDefaultHeadline,\n fontWeight: platformFontWeightBold,\n fontSize: tokens.fontSizeXl,\n },\n heading3: {\n color: colors.textColorDefaultHeadline,\n fontWeight: platformFontWeightBold,\n fontSize: tokens.fontSizeLg,\n },\n heading4: {\n color: colors.textColorDefaultSecondary,\n fontWeight: platformFontWeightBold,\n fontSize: tokens.fontSizeSm,\n textTransform: 'uppercase',\n },\n })\n}\n"]}
|
|
@@ -11,7 +11,6 @@ import * as people from '@planningcenter/icons/paths/people';
|
|
|
11
11
|
import * as publishing from '@planningcenter/icons/paths/publishing';
|
|
12
12
|
import * as registrations from '@planningcenter/icons/paths/registrations';
|
|
13
13
|
import * as services from '@planningcenter/icons/paths/services';
|
|
14
|
-
import React from 'react';
|
|
15
14
|
import type { ColorValue, StyleProp, ViewStyle } from 'react-native';
|
|
16
15
|
import type { XmlProps } from 'react-native-svg';
|
|
17
16
|
declare const ICONS: {
|
|
@@ -60,6 +59,6 @@ export interface IconProps extends Omit<XmlProps, 'xml' | 'fontSize'> {
|
|
|
60
59
|
*/
|
|
61
60
|
style?: StyleProp<IconStyle>;
|
|
62
61
|
}
|
|
63
|
-
export declare function Icon({ color, name, size, style, accessibilityElementsHidden, accessibilityLabel, maxFontSizeMultiplier, ...props }: IconProps):
|
|
62
|
+
export declare function Icon({ color, name, size, style, accessibilityElementsHidden, accessibilityLabel, maxFontSizeMultiplier, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
64
63
|
export {};
|
|
65
64
|
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/components/display/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAA;AACtD,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAA;AAC1D,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,IAAI,MAAM,kCAAkC,CAAA;AACxD,OAAO,KAAK,YAAY,MAAM,2CAA2C,CAAA;AACzE,OAAO,KAAK,OAAO,MAAM,qCAAqC,CAAA;AAC9D,OAAO,KAAK,MAAM,MAAM,oCAAoC,CAAA;AAC5D,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,MAAM,MAAM,oCAAoC,CAAA;AAC5D,OAAO,KAAK,UAAU,MAAM,wCAAwC,CAAA;AACpE,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAA;AAC1E,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/components/display/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAA;AACtD,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAA;AAC1D,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,IAAI,MAAM,kCAAkC,CAAA;AACxD,OAAO,KAAK,YAAY,MAAM,2CAA2C,CAAA;AACzE,OAAO,KAAK,OAAO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,QAAQ,CAAC,EAAE,GAC9B,YAAY,QAAQ,CAAC,UAAU,CAAC,EAAE,GAClC,cAAc,QAAQ,CAAC,YAAY,CAAC,EAAE,GACtC,iBAAiB,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAA;AAMhD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,UAAU,CAAC;IACnE;;;OAGG;IACH,IAAI,EAAE,UAAU,CAAA;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B;AAED,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,GAAG,KAAK,EACT,EAAE,SAAS,2CA0BX"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import * as accounts from '@planningcenter/icons/paths/accounts';
|
|
2
3
|
import * as api from '@planningcenter/icons/paths/api';
|
|
3
4
|
import * as brand from '@planningcenter/icons/paths/brand';
|
|
@@ -11,7 +12,6 @@ import * as people from '@planningcenter/icons/paths/people';
|
|
|
11
12
|
import * as publishing from '@planningcenter/icons/paths/publishing';
|
|
12
13
|
import * as registrations from '@planningcenter/icons/paths/registrations';
|
|
13
14
|
import * as services from '@planningcenter/icons/paths/services';
|
|
14
|
-
import React from 'react';
|
|
15
15
|
import { StyleSheet, View } from 'react-native';
|
|
16
16
|
import { SvgXml } from 'react-native-svg';
|
|
17
17
|
import { useFontScale, useTheme } from '../../hooks';
|
|
@@ -41,13 +41,13 @@ export function Icon({ color, name, size, style, accessibilityElementsHidden, ac
|
|
|
41
41
|
const styles = useStyles({ color, iconSize });
|
|
42
42
|
if (!path) {
|
|
43
43
|
console.warn(`No icon available named ${name}. Remember to use the format "set.iconName"`);
|
|
44
|
-
return
|
|
44
|
+
return _jsx(View, { style: styles.noIcon });
|
|
45
45
|
}
|
|
46
|
-
return (
|
|
46
|
+
return (_jsx(SvgXml, { accessibilityElementsHidden: accessibilityElementsHidden, accessibilityLabel: accessibilityLabel, xml: `
|
|
47
47
|
<svg viewBox="0 0 16 16">
|
|
48
48
|
<path d="${path}" fill="currentColor" />
|
|
49
49
|
</svg>
|
|
50
|
-
|
|
50
|
+
`, height: iconSize, width: iconSize, style: { ...styles.icon, ...flattenStyles }, ...props }));
|
|
51
51
|
}
|
|
52
52
|
const useGetIconSize = (size, style, maxFontSizeMultiplier) => {
|
|
53
53
|
const fontSize = style?.fontSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/components/display/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAA;AACtD,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAA;AAC1D,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,IAAI,MAAM,kCAAkC,CAAA;AACxD,OAAO,KAAK,YAAY,MAAM,2CAA2C,CAAA;AACzE,OAAO,KAAK,OAAO,MAAM,qCAAqC,CAAA;AAC9D,OAAO,KAAK,MAAM,MAAM,oCAAoC,CAAA;AAC5D,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,MAAM,MAAM,oCAAoC,CAAA;AAC5D,OAAO,KAAK,UAAU,MAAM,wCAAwC,CAAA;AACpE,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAA;AAC1E,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;
|
|
1
|
+
{"version":3,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OAAsB,CAA4B,EAAE,CAAC,QAAQ,CAAC,CAAA;AAC9E,CAAC,CAAA;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAA4C,EAAE,EAAE;IAClF,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,MAAM,EAAE;YACN,eAAe,EAAE,MAAM,CAAC,wBAAwB;YAChD,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,QAAQ;YAChB,YAAY,EAAE,QAAQ,GAAG,CAAC;SAC3B;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,KAAK,IAAI,MAAM,CAAC,uBAAuB;SAC/C;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import * as accounts from '@planningcenter/icons/paths/accounts'\nimport * as api from '@planningcenter/icons/paths/api'\nimport * as brand from '@planningcenter/icons/paths/brand'\nimport * as calendar from '@planningcenter/icons/paths/calendar'\nimport * as chat from '@planningcenter/icons/paths/chat'\nimport * as churchCenter from '@planningcenter/icons/paths/church-center'\nimport * as general from '@planningcenter/icons/paths/general'\nimport * as groups from '@planningcenter/icons/paths/groups'\nimport * as logomark from '@planningcenter/icons/paths/logomark'\nimport * as people from '@planningcenter/icons/paths/people'\nimport * as publishing from '@planningcenter/icons/paths/publishing'\nimport * as registrations from '@planningcenter/icons/paths/registrations'\nimport * as services from '@planningcenter/icons/paths/services'\nimport React from 'react'\nimport type { ColorValue, StyleProp, ViewStyle } from 'react-native'\nimport { StyleSheet, View } from 'react-native'\nimport type { XmlProps } from 'react-native-svg'\nimport { SvgXml } from 'react-native-svg'\nimport { useFontScale, useTheme } from '../../hooks'\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst FALLBACK_SIZE = 12\n\nconst ICONS = {\n accounts,\n api,\n brand,\n calendar,\n chat,\n churchCenter,\n general,\n groups,\n logomark,\n people,\n services,\n publishing,\n registrations,\n} as const\n\nexport type IconStyle = ViewStyle & {\n fontSize?: number\n color?: string\n}\n\nexport type IconSetName = keyof typeof ICONS\n\ntype IconName<T extends IconSetName> = keyof (typeof ICONS)[T] & string\n\nexport type IconString =\n | `accounts.${IconName<'accounts'>}`\n | `api.${IconName<'api'>}`\n | `brand.${IconName<'brand'>}`\n | `calendar.${IconName<'calendar'>}`\n | `chat.${IconName<'chat'>}`\n | `churchCenter.${IconName<'churchCenter'>}`\n | `general.${IconName<'general'>}`\n | `groups.${IconName<'groups'>}`\n | `logomark.${IconName<'logomark'>}`\n | `people.${IconName<'people'>}`\n | `services.${IconName<'services'>}`\n | `publishing.${IconName<'publishing'>}`\n | `registrations.${IconName<'registrations'>}`\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport interface IconProps extends Omit<XmlProps, 'xml' | 'fontSize'> {\n /**\n * Made up of the set.iconName.\n * Example: \"general.textMessage\"\n */\n name: IconString\n /**\n * This sets a static size for the icon.\n * Providing a fontSize style will allow the icon to scale with the device's text a11y size.\n */\n size?: number\n /**\n * Specifies the maximum size a font can reach when allowFontScaling is enabled.\n */\n maxFontSizeMultiplier?: number\n /**\n * Changes the color of the icon. Most cases should use a theme color to support light/dark mode.\n */\n color?: ColorValue\n /**\n * Icon can handle ViewStyle, color, and fontSize.\n */\n style?: StyleProp<IconStyle>\n}\n\nexport function Icon({\n color,\n name,\n size,\n style,\n accessibilityElementsHidden,\n accessibilityLabel,\n maxFontSizeMultiplier,\n ...props\n}: IconProps) {\n const flattenStyles = StyleSheet.flatten(style)\n const iconSize = useGetIconSize(size, flattenStyles, maxFontSizeMultiplier)\n const path = getIconPath(name)\n const styles = useStyles({ color, iconSize })\n\n if (!path) {\n console.warn(`No icon available named ${name}. Remember to use the format \"set.iconName\"`)\n return <View style={styles.noIcon} />\n }\n\n return (\n <SvgXml\n accessibilityElementsHidden={accessibilityElementsHidden}\n accessibilityLabel={accessibilityLabel}\n xml={`\n <svg viewBox=\"0 0 16 16\">\n <path d=\"${path}\" fill=\"currentColor\" />\n </svg>\n `}\n height={iconSize}\n width={iconSize}\n style={{ ...styles.icon, ...flattenStyles }}\n {...props}\n />\n )\n}\n\nconst useGetIconSize = (size?: number, style?: IconStyle, maxFontSizeMultiplier?: number) => {\n const fontSize = style?.fontSize\n const fontScale = useFontScale({ maxFontSizeMultiplier })\n\n if (fontSize) return fontSize * fontScale\n\n return size || FALLBACK_SIZE\n}\n\nconst getIconPath = (name: IconString): string => {\n const [setName, iconName] = name.split('.')\n\n return (ICONS[setName as IconSetName] as Record<string, string>)?.[iconName]\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({ color, iconSize }: { color?: ColorValue; iconSize: number }) => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n noIcon: {\n backgroundColor: colors.iconColorDefaultDisabled,\n width: iconSize,\n height: iconSize,\n borderRadius: iconSize / 2,\n },\n icon: {\n color: color || colors.iconColorDefaultPrimary,\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type AvatarRootProps } from '../primitive/avatar_primitive';
|
|
3
2
|
interface IconAvatarProps {
|
|
4
3
|
iconKey: string;
|
|
@@ -7,6 +6,6 @@ interface IconAvatarProps {
|
|
|
7
6
|
maxFontSizeMultiplier?: AvatarRootProps['maxFontSizeMultiplier'];
|
|
8
7
|
style?: AvatarRootProps['style'];
|
|
9
8
|
}
|
|
10
|
-
export declare function IconAvatar({ iconKey, color, size, maxFontSizeMultiplier, style, }: IconAvatarProps):
|
|
9
|
+
export declare function IconAvatar({ iconKey, color, size, maxFontSizeMultiplier, style, }: IconAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
12
11
|
//# sourceMappingURL=icon_avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon_avatar.d.ts","sourceRoot":"","sources":["../../../src/components/display/icon_avatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icon_avatar.d.ts","sourceRoot":"","sources":["../../../src/components/display/icon_avatar.tsx"],"names":[],"mappings":"AASA,OAAwB,EACtB,KAAK,eAAe,EAErB,MAAM,+BAA+B,CAAA;AAYtC,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,qBAAqB,CAAC,EAAE,eAAe,CAAC,uBAAuB,CAAC,CAAA;IAChE,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;CACjC;AAMD,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,KAAK,EACL,IAAW,EACX,qBAAqB,EACrB,KAAK,GACN,EAAE,eAAe,2CA6BjB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { findIconDefinition, } from '@fortawesome/fontawesome-svg-core';
|
|
2
3
|
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
|
|
3
|
-
import React from 'react';
|
|
4
4
|
import { StyleSheet, Text, View } from 'react-native';
|
|
5
5
|
import LinearGradient from 'react-native-linear-gradient';
|
|
6
6
|
import AvatarPrimitive from '../primitive/avatar_primitive';
|
|
@@ -22,17 +22,7 @@ export function IconAvatar({ iconKey, color, size = 'lg', maxFontSizeMultiplier,
|
|
|
22
22
|
if (__DEV__ && !iconDef) {
|
|
23
23
|
console.warn(`IconAvatar: unrecognized icon key "${iconKey}"`);
|
|
24
24
|
}
|
|
25
|
-
return (
|
|
26
|
-
<AvatarPrimitive.Mask>
|
|
27
|
-
<LinearGradient {...gradientProps} style={styles.gradientFill}>
|
|
28
|
-
<View style={styles.contentContainer}>
|
|
29
|
-
{iconDef ? (<FontAwesomeIcon icon={iconDef} size={ICON_SIZE[size]} color="white"/>) : (<Text style={[styles.fallbackText, { fontSize: ICON_SIZE[size] }]} accessibilityLabel="Unknown icon" allowFontScaling={false}>
|
|
30
|
-
?
|
|
31
|
-
</Text>)}
|
|
32
|
-
</View>
|
|
33
|
-
</LinearGradient>
|
|
34
|
-
</AvatarPrimitive.Mask>
|
|
35
|
-
</AvatarPrimitive.Root>);
|
|
25
|
+
return (_jsx(AvatarPrimitive.Root, { size: size, maxFontSizeMultiplier: maxFontSizeMultiplier, style: style, children: _jsx(AvatarPrimitive.Mask, { children: _jsx(LinearGradient, { ...gradientProps, style: styles.gradientFill, children: _jsx(View, { style: styles.contentContainer, children: iconDef ? (_jsx(FontAwesomeIcon, { icon: iconDef, size: ICON_SIZE[size], color: "white" })) : (_jsx(Text, { style: [styles.fallbackText, { fontSize: ICON_SIZE[size] }], accessibilityLabel: "Unknown icon", allowFontScaling: false, children: "?" })) }) }) }) }));
|
|
36
26
|
}
|
|
37
27
|
const styles = StyleSheet.create({
|
|
38
28
|
gradientFill: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon_avatar.js","sourceRoot":"","sources":["../../../src/components/display/icon_avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,GAGnB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;
|
|
1
|
+
{"version":3,"file":"icon_avatar.js","sourceRoot":"","sources":["../../../src/components/display/icon_avatar.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,kBAAkB,GAGnB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AAEvE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,cAAc,MAAM,8BAA8B,CAAA;AACzD,OAAO,eAGN,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAA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B,EAAC,cAAc,EACjC,gBAAgB,EAAE,KAAK,kBAGlB,CACR,GACI,GACQ,GACI,GACF,CACxB,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;KACf;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,CAAC;QACP,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,GAAG;KACb;CACF,CAAC,CAAA","sourcesContent":["import {\n findIconDefinition,\n type IconDefinition,\n type IconName,\n} from '@fortawesome/fontawesome-svg-core'\nimport { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'\nimport React from 'react'\nimport { StyleSheet, Text, View } from 'react-native'\nimport LinearGradient from 'react-native-linear-gradient'\nimport AvatarPrimitive, {\n type AvatarRootProps,\n type AvatarSize,\n} from '../primitive/avatar_primitive'\nimport { getAvatarGradientProps } from './utils/avatar_gradient_colors'\n\nconst ICON_SIZE: Record<AvatarSize, number> = {\n xs: 10,\n sm: 12,\n md: 16,\n lg: 20,\n xl: 28,\n '2xl': 40,\n}\n\ninterface IconAvatarProps {\n iconKey: string\n color?: string | null\n size?: AvatarRootProps['size']\n maxFontSizeMultiplier?: AvatarRootProps['maxFontSizeMultiplier']\n style?: AvatarRootProps['style']\n}\n\nfunction findIcon(iconKey: string): IconDefinition | undefined {\n return findIconDefinition({ prefix: 'fas', iconName: iconKey as IconName })\n}\n\nexport function IconAvatar({\n iconKey,\n color,\n size = 'lg',\n maxFontSizeMultiplier,\n style,\n}: IconAvatarProps) {\n const gradientProps = getAvatarGradientProps(color)\n const iconDef = findIcon(iconKey)\n\n if (__DEV__ && !iconDef) {\n console.warn(`IconAvatar: unrecognized icon key \"${iconKey}\"`)\n }\n\n return (\n <AvatarPrimitive.Root size={size} maxFontSizeMultiplier={maxFontSizeMultiplier} style={style}>\n <AvatarPrimitive.Mask>\n <LinearGradient {...gradientProps} style={styles.gradientFill}>\n <View style={styles.contentContainer}>\n {iconDef ? (\n <FontAwesomeIcon icon={iconDef} size={ICON_SIZE[size]} color=\"white\" />\n ) : (\n <Text\n style={[styles.fallbackText, { fontSize: ICON_SIZE[size] }]}\n accessibilityLabel=\"Unknown icon\"\n allowFontScaling={false}\n >\n ?\n </Text>\n )}\n </View>\n </LinearGradient>\n </AvatarPrimitive.Mask>\n </AvatarPrimitive.Root>\n )\n}\n\nconst styles = StyleSheet.create({\n gradientFill: {\n width: '100%',\n height: '100%',\n },\n contentContainer: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n fallbackText: {\n color: 'white',\n fontWeight: 'bold',\n opacity: 0.7,\n },\n})\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type StyleProp } from 'react-native';
|
|
3
2
|
import type { PressableProps, ViewStyle } from 'react-native';
|
|
4
3
|
import type { IconProps, IconString } from './icon';
|
|
@@ -52,6 +51,6 @@ interface IconButtonProps extends PressableProps {
|
|
|
52
51
|
*/
|
|
53
52
|
style?: StyleProp<ViewStyle>;
|
|
54
53
|
}
|
|
55
|
-
export declare function IconButton({ accessibilityLabel, appearance, disabled, iconStyle, loading, maxFontSizeMultiplier, name, size, style, ...props }: IconButtonProps):
|
|
54
|
+
export declare function IconButton({ accessibilityLabel, appearance, disabled, iconStyle, loading, maxFontSizeMultiplier, name, size, style, ...props }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
56
55
|
export {};
|
|
57
56
|
//# sourceMappingURL=icon_button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/icon_button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icon_button.d.ts","sourceRoot":"","sources":["../../../src/components/display/icon_button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7D,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAGnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAMtE,QAAA,MAAM,KAAK;;;;;;;;;;CAUD,CAAA;AAEV,KAAK,SAAS,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,OAAO,KAAK,CAAC,CAAA;AAmBnD,UAAU,eAAgB,SAAQ,cAAc;IAC9C;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,yBAAyB,CAAA;IACtC;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAA;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B;AAED,wBAAgB,UAAU,CAAC,EACzB,kBAAkB,EAClB,UAAsB,EACtB,QAAgB,EAChB,SAAS,EACT,OAAO,EACP,qBAAqB,EACrB,IAAI,EACJ,IAAW,EACX,KAAK,EACL,GAAG,KAAK,EACT,EAAE,eAAe,2CAoEjB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Pressable, StyleSheet } from 'react-native';
|
|
3
3
|
import { useTheme, useFontScale, useCreateAndroidRippleColor } from '../../hooks';
|
|
4
4
|
import { platformPressedOpacityStyle } from '../../utils';
|
|
@@ -54,14 +54,12 @@ export function IconButton({ accessibilityLabel, appearance = 'neutral', disable
|
|
|
54
54
|
radius: 32,
|
|
55
55
|
},
|
|
56
56
|
};
|
|
57
|
-
return (
|
|
57
|
+
return (_jsx(Pressable, { style: ({ pressed }) => [styles.pressable, style, pressed && platformPressedOpacityStyle], accessibilityRole: "button", disabled: disabled || loading, accessibilityState: { busy: loading }, accessibilityLabel: accessibilityLabel, hitSlop: 10, android_ripple: {
|
|
58
58
|
color: androidRippleColor,
|
|
59
59
|
borderless: true,
|
|
60
60
|
foreground: true,
|
|
61
61
|
radius: androidRadiusSizeMap[size].radius,
|
|
62
|
-
}
|
|
63
|
-
{loading ? (<Spinner size={styles.spinner.fontSize} maxFontSizeMultiplier={maxFontSizeMultiplier || 0}/>) : (<Icon name={name} style={[styles.icon, iconStyle, disabled && styles.iconDisabled]} maxFontSizeMultiplier={maxFontSizeMultiplier}/>)}
|
|
64
|
-
</Pressable>);
|
|
62
|
+
}, ...props, children: loading ? (_jsx(Spinner, { size: styles.spinner.fontSize, maxFontSizeMultiplier: maxFontSizeMultiplier || 0 })) : (_jsx(Icon, { name: name, style: [styles.icon, iconStyle, disabled && styles.iconDisabled], maxFontSizeMultiplier: maxFontSizeMultiplier })) }));
|
|
65
63
|
}
|
|
66
64
|
// =================================
|
|
67
65
|
// ====== Styles ===================
|