@planningcenter/chat-react-native 3.42.2-qa-staging.1 → 3.42.2-qa-821.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon_button.js","sourceRoot":"","sources":["../../../src/components/display/icon_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAA;AAEpE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAG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,CAAC,EAAE,CAAC,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE,EAAE,GAAG,SAAS;SACvB;QACD,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE,EAAE,GAAG,SAAS;SACvB;QACD,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE,EAAE,GAAG,SAAS;SACvB;QACD,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE,EAAE,GAAG,SAAS;SACvB;KACF,CAAA;IAED,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM;SAClC;QACD,IAAI,EAAE;YACJ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ;YACrC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC;SAChC;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;QACD,OAAO,EAAE;YACP,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ;SACtC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { Pressable, StyleSheet, type StyleProp } from 'react-native'\nimport type { PressableProps, ViewStyle } from 'react-native'\nimport { useTheme, useFontScale, useCreateAndroidRippleColor } from '../../hooks'\nimport { platformPressedOpacityStyle } from '../../utils'\nimport { Icon } from './icon'\nimport type { IconProps, IconString } from './icon'\nimport { Spinner } from './spinner'\nimport { getColorKey, useIconButtonColorOptionMap } from './utils/button_colors'\nimport type { IconButtonAppearanceUnion } from './utils/button_colors'\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst SIZES = {\n xxxs: 'xxxs',\n xxs: 'xxs',\n xs: 'xs',\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n xl: 'xl',\n xxl: 'xxl',\n xxxl: 'xxxl',\n} as const\n\ntype SizeUnion = (typeof SIZES)[keyof typeof SIZES]\ntype SizeStyle = Record<\n SizeUnion,\n {\n fontSize: number\n height: number\n }\n>\ntype AndroidRadiusSize = Record<\n SizeUnion,\n {\n radius: number\n }\n>\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface IconButtonProps extends PressableProps {\n /**\n * Provides context to screen readers about what the button does.\n * This is required as Icons don't inherently provide non-visual context like text does.\n */\n accessibilityLabel: string\n /**\n * Updates the icon's colors. Defaults to 'neutral'.\n */\n appearance?: IconButtonAppearanceUnion\n /**\n * Styles the icon itself.\n * `fontSize` allows for a custom size that also responds to the device's text scale.\n * `color` changes the color of the icon.\n */\n iconStyle?: IconProps['style']\n /**\n * Disables the button and replaces its content with a spinner\n */\n loading?: boolean\n /**\n * Specifies the maximum size a font can reach when allowFontScaling is enabled.\n */\n maxFontSizeMultiplier?: number\n /**\n * Generates an icon from `@planningcenter/icons`\n */\n name: IconString\n /**\n * Changes the overall size of the button and its contents\n */\n size?: SizeUnion\n /**\n * Styles the `Pressable` wrapper\n */\n style?: StyleProp<ViewStyle>\n}\n\nexport function IconButton({\n accessibilityLabel,\n appearance = 'neutral',\n disabled = false,\n iconStyle,\n loading,\n maxFontSizeMultiplier,\n name,\n size = 'md',\n style,\n ...props\n}: IconButtonProps) {\n const styles = useStyles({ appearance, disabled, loading, maxFontSizeMultiplier, size })\n const colorOptionMap = useIconButtonColorOptionMap()\n const colorKey = getColorKey({ disabled, loading, appearance })\n\n const { color = colorOptionMap[colorKey] } = StyleSheet.flatten(iconStyle || {})\n const androidRippleColor = useCreateAndroidRippleColor({ color: color })\n\n const androidRadiusSizeMap: AndroidRadiusSize = {\n [SIZES.xxxs]: {\n radius: 8,\n },\n [SIZES.xxs]: {\n radius: 10,\n },\n [SIZES.xs]: {\n radius: 12,\n },\n [SIZES.sm]: {\n radius: 14,\n },\n [SIZES.md]: {\n radius: 16,\n },\n [SIZES.lg]: {\n radius: 18,\n },\n [SIZES.xl]: {\n radius: 20,\n },\n [SIZES.xxl]: {\n radius: 26,\n },\n [SIZES.xxxl]: {\n radius: 32,\n },\n }\n\n return (\n <Pressable\n style={({ pressed }) => [styles.pressable, style, pressed && platformPressedOpacityStyle]}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n accessibilityState={{ busy: loading }}\n accessibilityLabel={accessibilityLabel}\n hitSlop={10}\n android_ripple={{\n color: androidRippleColor,\n borderless: true,\n foreground: true,\n radius: androidRadiusSizeMap[size].radius,\n }}\n {...props}\n >\n {loading ? (\n <Spinner\n size={styles.spinner.fontSize}\n maxFontSizeMultiplier={maxFontSizeMultiplier || 0}\n />\n ) : (\n <Icon\n name={name}\n style={[styles.icon, iconStyle, disabled && styles.iconDisabled]}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n />\n )}\n </Pressable>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({\n appearance = 'neutral',\n disabled = false,\n loading = false,\n maxFontSizeMultiplier,\n size = 'md',\n}: Partial<IconButtonProps>) => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier })\n const colorOptionMap = useIconButtonColorOptionMap()\n const colorKey = getColorKey({ disabled, loading, appearance })\n\n const sizeStyleMap: SizeStyle = {\n [SIZES.xxxs]: {\n fontSize: 8,\n height: 8 * fontScale,\n },\n [SIZES.xxs]: {\n fontSize: 10,\n height: 10 * fontScale,\n },\n [SIZES.xs]: {\n fontSize: 12,\n height: 12 * fontScale,\n },\n [SIZES.sm]: {\n fontSize: 14,\n height: 14 * fontScale,\n },\n [SIZES.md]: {\n fontSize: 16,\n height: 16 * fontScale,\n },\n [SIZES.lg]: {\n fontSize: 20,\n height: 20 * fontScale,\n },\n [SIZES.xl]: {\n fontSize: 24,\n height: 24 * fontScale,\n },\n [SIZES.xxl]: {\n fontSize: 32,\n height: 32 * fontScale,\n },\n [SIZES.xxxl]: {\n fontSize: 40,\n height: 40 * fontScale,\n },\n }\n\n return StyleSheet.create({\n pressable: {\n alignItems: 'center',\n justifyContent: 'center',\n height: sizeStyleMap[size].height,\n },\n icon: {\n fontSize: sizeStyleMap[size].fontSize,\n color: colorOptionMap[colorKey],\n },\n iconDisabled: {\n color: colors.iconColorDefaultDisabled,\n },\n spinner: {\n fontSize: sizeStyleMap[size].fontSize,\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"icon_button.js","sourceRoot":"","sources":["../../../src/components/display/icon_button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAA;AAEpE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAGhF,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACJ,CAAA;AA2DV,MAAM,UAAU,UAAU,CAAC,EACzB,kBAAkB,EAClB,UAAU,GAAG,SAAS,EACtB,QAAQ,GAAG,KAAK,EAChB,SAAS,EACT,OAAO,EACP,qBAAqB,EACrB,IAAI,EACJ,IAAI,GAAG,IAAI,EACX,KAA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,CAAC,QAAQ;YACrC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC;SAChC;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;QACD,OAAO,EAAE;YACP,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ;SACtC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { Pressable, StyleSheet, type StyleProp } from 'react-native'\nimport type { PressableProps, ViewStyle } from 'react-native'\nimport { useTheme, useFontScale, useCreateAndroidRippleColor } from '../../hooks'\nimport { platformPressedOpacityStyle } from '../../utils'\nimport { Icon } from './icon'\nimport type { IconProps, IconString } from './icon'\nimport { Spinner } from './spinner'\nimport { getColorKey, useIconButtonColorOptionMap } from './utils/button_colors'\nimport type { IconButtonAppearanceUnion } from './utils/button_colors'\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst SIZES = {\n xxxs: 'xxxs',\n xxs: 'xxs',\n xs: 'xs',\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n xl: 'xl',\n xxl: 'xxl',\n xxxl: 'xxxl',\n} as const\n\ntype SizeUnion = (typeof SIZES)[keyof typeof SIZES]\ntype SizeStyle = Record<\n SizeUnion,\n {\n fontSize: number\n height: number\n }\n>\ntype AndroidRadiusSize = Record<\n SizeUnion,\n {\n radius: number\n }\n>\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface IconButtonProps extends PressableProps {\n /**\n * Provides context to screen readers about what the button does.\n * This is required as Icons don't inherently provide non-visual context like text does.\n */\n accessibilityLabel: string\n /**\n * Updates the icon's colors. Defaults to 'neutral'.\n */\n appearance?: IconButtonAppearanceUnion\n /**\n * Styles the icon itself.\n * `fontSize` allows for a custom size that also responds to the device's text scale.\n * `color` changes the color of the icon.\n */\n iconStyle?: IconProps['style']\n /**\n * Disables the button and replaces its content with a spinner\n */\n loading?: boolean\n /**\n * Specifies the maximum size a font can reach when allowFontScaling is enabled.\n */\n maxFontSizeMultiplier?: number\n /**\n * Generates an icon from `@planningcenter/icons`\n */\n name: IconString\n /**\n * Changes the overall size of the button and its contents\n */\n size?: SizeUnion\n /**\n * Styles the `Pressable` wrapper\n */\n style?: StyleProp<ViewStyle>\n}\n\nexport function IconButton({\n accessibilityLabel,\n appearance = 'neutral',\n disabled = false,\n iconStyle,\n loading,\n maxFontSizeMultiplier,\n name,\n size = 'md',\n style,\n ...props\n}: IconButtonProps) {\n const styles = useStyles({ appearance, disabled, loading, maxFontSizeMultiplier, size })\n const colorOptionMap = useIconButtonColorOptionMap()\n const colorKey = getColorKey({ disabled, loading, appearance })\n\n const { color = colorOptionMap[colorKey] } = StyleSheet.flatten(iconStyle || {})\n const androidRippleColor = useCreateAndroidRippleColor({ color: color })\n\n const androidRadiusSizeMap: AndroidRadiusSize = {\n [SIZES.xxxs]: {\n radius: 8,\n },\n [SIZES.xxs]: {\n radius: 10,\n },\n [SIZES.xs]: {\n radius: 12,\n },\n [SIZES.sm]: {\n radius: 14,\n },\n [SIZES.md]: {\n radius: 16,\n },\n [SIZES.lg]: {\n radius: 18,\n },\n [SIZES.xl]: {\n radius: 20,\n },\n [SIZES.xxl]: {\n radius: 26,\n },\n [SIZES.xxxl]: {\n radius: 32,\n },\n }\n\n return (\n <Pressable\n style={({ pressed }) => [styles.pressable, style, pressed && platformPressedOpacityStyle]}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n accessibilityState={{ busy: loading }}\n accessibilityLabel={accessibilityLabel}\n hitSlop={10}\n android_ripple={{\n color: androidRippleColor,\n borderless: true,\n foreground: true,\n radius: androidRadiusSizeMap[size].radius,\n }}\n {...props}\n >\n {loading ? (\n <Spinner\n size={styles.spinner.fontSize}\n maxFontSizeMultiplier={maxFontSizeMultiplier || 0}\n />\n ) : (\n <Icon\n name={name}\n style={[styles.icon, iconStyle, disabled && styles.iconDisabled]}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n />\n )}\n </Pressable>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({\n appearance = 'neutral',\n disabled = false,\n loading = false,\n maxFontSizeMultiplier,\n size = 'md',\n}: Partial<IconButtonProps>) => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier })\n const colorOptionMap = useIconButtonColorOptionMap()\n const colorKey = getColorKey({ disabled, loading, appearance })\n\n const sizeStyleMap: SizeStyle = {\n [SIZES.xxxs]: {\n fontSize: 8,\n height: 8 * fontScale,\n },\n [SIZES.xxs]: {\n fontSize: 10,\n height: 10 * fontScale,\n },\n [SIZES.xs]: {\n fontSize: 12,\n height: 12 * fontScale,\n },\n [SIZES.sm]: {\n fontSize: 14,\n height: 14 * fontScale,\n },\n [SIZES.md]: {\n fontSize: 16,\n height: 16 * fontScale,\n },\n [SIZES.lg]: {\n fontSize: 20,\n height: 20 * fontScale,\n },\n [SIZES.xl]: {\n fontSize: 24,\n height: 24 * fontScale,\n },\n [SIZES.xxl]: {\n fontSize: 32,\n height: 32 * fontScale,\n },\n [SIZES.xxxl]: {\n fontSize: 40,\n height: 40 * fontScale,\n },\n }\n\n return StyleSheet.create({\n pressable: {\n alignItems: 'center',\n justifyContent: 'center',\n height: sizeStyleMap[size].height,\n },\n icon: {\n fontSize: sizeStyleMap[size].fontSize,\n color: colorOptionMap[colorKey],\n },\n iconDisabled: {\n color: colors.iconColorDefaultDisabled,\n },\n spinner: {\n fontSize: sizeStyleMap[size].fontSize,\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ImageStyle, ImageProps as ReactNativeImageProps, ViewStyle } from 'react-native';
|
|
3
2
|
import { AnimatedStyle } from 'react-native-reanimated';
|
|
4
3
|
export interface ImageProps extends ReactNativeImageProps {
|
|
@@ -36,5 +35,5 @@ export interface ImageProps extends ReactNativeImageProps {
|
|
|
36
35
|
*/
|
|
37
36
|
animatedImageStyle?: AnimatedStyle<ImageStyle>;
|
|
38
37
|
}
|
|
39
|
-
export declare function Image({ source, onLoad, defaultLoading, loading, hideLoader, loaderSize, loadingBackgroundStyles, style, wrapperStyle, alt, animatedImageStyle, ...props }: ImageProps):
|
|
38
|
+
export declare function Image({ source, onLoad, defaultLoading, loading, hideLoader, loaderSize, loadingBackgroundStyles, style, wrapperStyle, alt, animatedImageStyle, ...props }: ImageProps): import("react/jsx-runtime").JSX.Element;
|
|
40
39
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/components/display/image.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/components/display/image.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,UAAU,EAEV,UAAU,IAAI,qBAAqB,EAGnC,SAAS,EACV,MAAM,cAAc,CAAA;AACrB,OAAiB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAQjE,MAAM,WAAW,UAAW,SAAQ,qBAAqB;IACvD;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,uBAAuB,CAAC,EAAE,SAAS,CAAA;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB;;OAEG;IACH,kBAAkB,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;CAC/C;AAED,wBAAgB,KAAK,CAAC,EACpB,MAAM,EACN,MAAa,EACb,cAAqB,EACrB,OAAe,EACf,UAAkB,EAClB,UAAe,EACf,uBAAuB,EACvB,KAAU,EACV,YAAiB,EACjB,GAAG,EACH,kBAAuB,EACvB,GAAG,KAAK,EACT,EAAE,UAAU,2CA2CZ"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { noop } from 'lodash';
|
|
2
|
-
import
|
|
3
|
+
import { useState } from 'react';
|
|
3
4
|
import { Image as ReactNativeImage, StyleSheet, View, } from 'react-native';
|
|
4
5
|
import Animated from 'react-native-reanimated';
|
|
5
6
|
import { useTheme } from '../../hooks';
|
|
@@ -18,12 +19,7 @@ export function Image({ source, onLoad = noop, defaultLoading = true, loading =
|
|
|
18
19
|
};
|
|
19
20
|
const isLoading = isImageLoading || loading;
|
|
20
21
|
const ImageComponent = animatedImageStyle ? Animated.Image : ReactNativeImage;
|
|
21
|
-
return (
|
|
22
|
-
<ImageComponent style={[styles.image, imageStyles, animatedImageStyle]} onLoad={handleOnLoad} onError={handleOnError} source={source} alt={isLoading ? '' : alt} {...props}/>
|
|
23
|
-
{!hideLoader && isLoading && (<View style={[styles.loadingBackground, loadingBackgroundStyles]}>
|
|
24
|
-
<Spinner size={loaderSize} style={styles.spinner}/>
|
|
25
|
-
</View>)}
|
|
26
|
-
</View>);
|
|
22
|
+
return (_jsxs(View, { style: wrapperStyle, accessible: Boolean(alt), accessibilityRole: "image", accessibilityState: { busy: isLoading }, collapsable: false, children: [_jsx(ImageComponent, { style: [styles.image, imageStyles, animatedImageStyle], onLoad: handleOnLoad, onError: handleOnError, source: source, alt: isLoading ? '' : alt, ...props }), !hideLoader && isLoading && (_jsx(View, { style: [styles.loadingBackground, loadingBackgroundStyles], children: _jsx(Spinner, { size: loaderSize, style: styles.spinner }) }))] }));
|
|
27
23
|
}
|
|
28
24
|
const useStyles = ({ width, height, borderRadius }) => {
|
|
29
25
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../src/components/display/image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAA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YAAY;YACZ,KAAK;YACL,MAAM;SACP;QACD,KAAK,EAAE;YACL,eAAe,EAAE,MAAM,CAAC,mBAAmB;YAC3C,KAAK;YACL,MAAM;SACP;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;YACd,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,QAAQ,EAAE,UAAU;SACrB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { noop } from 'lodash'\nimport React, { useState } from 'react'\nimport {\n AnimatableNumericValue,\n DimensionValue,\n ImageStyle,\n Image as ReactNativeImage,\n ImageProps as ReactNativeImageProps,\n StyleSheet,\n View,\n ViewStyle,\n} from 'react-native'\nimport Animated, { AnimatedStyle } from 'react-native-reanimated'\nimport { useTheme } from '../../hooks'\nimport { Spinner } from './spinner'\n\n// =================================\n// ====== Component ================\n// =================================\n\nexport interface ImageProps extends ReactNativeImageProps {\n /**\n * Describes the image to screen-readers and marks the image as `accessible`.\n * Passing an empty string will hide the image from screen-readers.\n */\n alt: string\n /**\n * Shows the image's loading spinner right away. Enabled by default.\n */\n defaultLoading?: boolean\n /**\n * Externally controls the loading state of the image.\n */\n loading?: boolean\n /**\n * Hide the loading spinner, regardless of the loading state.\n */\n hideLoader?: boolean\n /**\n * Size of the loading spinner.\n */\n loaderSize?: number\n /**\n * Style object for the preload background.\n */\n loadingBackgroundStyles?: ViewStyle\n /**\n * Style the outer View of the image.\n */\n wrapperStyle?: ViewStyle\n /**\n * Style the image if animated.\n */\n animatedImageStyle?: AnimatedStyle<ImageStyle>\n}\n\nexport function Image({\n source,\n onLoad = noop,\n defaultLoading = true,\n loading = false,\n hideLoader = false,\n loaderSize = 24,\n loadingBackgroundStyles,\n style = {},\n wrapperStyle = {},\n alt,\n animatedImageStyle = {},\n ...props\n}: ImageProps) {\n const [isImageLoading, setIsImageLoading] = useState(defaultLoading)\n\n const imageStyles = StyleSheet.flatten(style)\n const { width = '100%', height = '100%', borderRadius = 0 } = imageStyles || {}\n const styles = useStyles({ width, height, borderRadius })\n\n const handleOnLoad = (event: any) => {\n setIsImageLoading(false)\n onLoad?.(event)\n }\n\n const handleOnError = () => {\n setIsImageLoading(false)\n }\n\n const isLoading = isImageLoading || loading\n\n const ImageComponent = animatedImageStyle ? Animated.Image : ReactNativeImage\n\n return (\n <View\n style={wrapperStyle}\n accessible={Boolean(alt)}\n accessibilityRole=\"image\"\n accessibilityState={{ busy: isLoading }}\n collapsable={false}\n >\n <ImageComponent\n style={[styles.image, imageStyles, animatedImageStyle]}\n onLoad={handleOnLoad}\n onError={handleOnError}\n source={source}\n alt={isLoading ? '' : alt}\n {...props}\n />\n {!hideLoader && isLoading && (\n <View style={[styles.loadingBackground, loadingBackgroundStyles]}>\n <Spinner size={loaderSize} style={styles.spinner} />\n </View>\n )}\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\ninterface Styles {\n width: DimensionValue\n height: DimensionValue\n borderRadius: AnimatableNumericValue | string\n}\n\nconst useStyles = ({ width, height, borderRadius }: Styles) => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n loadingBackground: {\n position: 'absolute',\n top: 0,\n left: 0,\n backgroundColor: colors.fillColorNeutral070,\n borderRadius,\n width,\n height,\n },\n image: {\n backgroundColor: colors.fillColorNeutral070,\n width,\n height,\n },\n spinner: {\n width: '100%',\n height: '100%',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n },\n })\n}\n"]}
|
|
@@ -8,6 +8,6 @@ interface ImageAttachmentPreviewProps {
|
|
|
8
8
|
hideRemoveButton?: boolean;
|
|
9
9
|
error?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare const ImageAttachmentPreview: ({ uri, fileName, size, onRemovePress, loading, hideRemoveButton, error, }: ImageAttachmentPreviewProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const ImageAttachmentPreview: ({ uri, fileName, size, onRemovePress, loading, hideRemoveButton, error, }: ImageAttachmentPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
13
13
|
//# sourceMappingURL=image_attachment_preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image_attachment_preview.d.ts","sourceRoot":"","sources":["../../../src/components/display/image_attachment_preview.tsx"],"names":[],"mappings":"AAOA,KAAK,cAAc,GAAG,IAAI,GAAG,IAAI,CAAA;AAEjC,UAAU,2BAA2B;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,eAAO,MAAM,sBAAsB,GAAI,2EAQpC,2BAA2B,
|
|
1
|
+
{"version":3,"file":"image_attachment_preview.d.ts","sourceRoot":"","sources":["../../../src/components/display/image_attachment_preview.tsx"],"names":[],"mappings":"AAOA,KAAK,cAAc,GAAG,IAAI,GAAG,IAAI,CAAA;AAEjC,UAAU,2BAA2B;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,eAAO,MAAM,sBAAsB,GAAI,2EAQpC,2BAA2B,4CA8B7B,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 { tokens } from '../../vendor/tapestry/tokens';
|
|
@@ -6,13 +7,7 @@ import { IconButton } from './icon_button';
|
|
|
6
7
|
import { Image } from './image';
|
|
7
8
|
export const ImageAttachmentPreview = ({ uri, fileName, size = 'md', onRemovePress, loading = false, hideRemoveButton = false, error = false, }) => {
|
|
8
9
|
const styles = useStyles({ size, error });
|
|
9
|
-
return (
|
|
10
|
-
{!hideRemoveButton && (<IconButton name="general.x" onPress={onRemovePress} size="xxs" appearance="neutral" style={styles.closeButton} accessibilityLabel="Remove image attachment"/>)}
|
|
11
|
-
<Image source={{ uri }} style={styles.image} alt={`Attached ${fileName}`} resizeMode="cover" loading={loading} loaderSize={size === 'sm' ? 20 : 24}/>
|
|
12
|
-
{error && (<View style={styles.errorBadge}>
|
|
13
|
-
<Icon name="general.exclamationTriangle" size={12} style={styles.errorIcon}/>
|
|
14
|
-
</View>)}
|
|
15
|
-
</View>);
|
|
10
|
+
return (_jsxs(View, { style: styles.container, children: [!hideRemoveButton && (_jsx(IconButton, { name: "general.x", onPress: onRemovePress, size: "xxs", appearance: "neutral", style: styles.closeButton, accessibilityLabel: "Remove image attachment" })), _jsx(Image, { source: { uri }, style: styles.image, alt: `Attached ${fileName}`, resizeMode: "cover", loading: loading, loaderSize: size === 'sm' ? 20 : 24 }), error && (_jsx(View, { style: styles.errorBadge, children: _jsx(Icon, { name: "general.exclamationTriangle", size: 12, style: styles.errorIcon }) }))] }));
|
|
16
11
|
};
|
|
17
12
|
const useStyles = ({ size = 'md', error = false }) => {
|
|
18
13
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image_attachment_preview.js","sourceRoot":"","sources":["../../../src/components/display/image_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,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAc/B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,GAAG,EACH,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,aAAa,EACb,OAAO,GAAG,KAAK,EACf,gBAAgB,GAAG,KAAK,EACxB,KAAK,GAAG,KAAK,GACe,EAAE,EAAE;IAChC,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;IAEzC,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"image_attachment_preview.js","sourceRoot":"","sources":["../../../src/components/display/image_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,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAc/B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,GAAG,EACH,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,aAAa,EACb,OAAO,GAAG,KAAK,EACf,gBAAgB,GAAG,KAAK,EACxB,KAAK,GAAG,KAAK,GACe,EAAE,EAAE;IAChC,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;IAEzC,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,aAC1B,CAAC,gBAAgB,IAAI,CACpB,KAAC,UAAU,IACT,I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C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1B,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,sBAAsB;SAC9E;QACD,KAAK,EAAE;YACL,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACzB;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,CAAC;YACN,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,eAAe,EAAE,MAAM,CAAC,uBAAuB;YAC/C,YAAY,EAAE,EAAE;YAChB,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;SACV;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,gBAAgB,CAAC,IAAI,CAAC;SACjC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { View, StyleSheet } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { Icon } from './icon'\nimport { IconButton } from './icon_button'\nimport { Image } from './image'\n\ntype ImageSizeUnion = 'sm' | 'md'\n\ninterface ImageAttachmentPreviewProps {\n fileName: string\n uri: string\n size?: ImageSizeUnion\n onRemovePress: () => void\n loading?: boolean\n hideRemoveButton?: boolean\n error?: boolean\n}\n\nexport const ImageAttachmentPreview = ({\n uri,\n fileName,\n size = 'md',\n onRemovePress,\n loading = false,\n hideRemoveButton = false,\n error = false,\n}: ImageAttachmentPreviewProps) => {\n const styles = useStyles({ size, error })\n\n return (\n <View style={styles.container}>\n {!hideRemoveButton && (\n <IconButton\n name=\"general.x\"\n onPress={onRemovePress}\n size=\"xxs\"\n appearance=\"neutral\"\n style={styles.closeButton}\n accessibilityLabel=\"Remove image attachment\"\n />\n )}\n <Image\n source={{ uri }}\n style={styles.image}\n alt={`Attached ${fileName}`}\n resizeMode=\"cover\"\n loading={loading}\n loaderSize={size === 'sm' ? 20 : 24}\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 = ({ size = 'md', error = false }: Partial<ImageAttachmentPreviewProps>) => {\n const { colors } = useTheme()\n const borderRadius = 8\n\n const imageSizeMap = {\n sm: 60,\n md: 80,\n }\n const errorIconSizeMap = {\n sm: 10,\n md: 12,\n }\n\n return StyleSheet.create({\n container: {\n width: imageSizeMap[size],\n height: imageSizeMap[size],\n overflow: 'hidden',\n borderRadius: borderRadius,\n borderWidth: error ? 2 : 1,\n borderColor: error ? colors.statusErrorBorder : colors.borderColorDefaultBase,\n },\n image: {\n opacity: error ? 0.5 : 1,\n },\n closeButton: {\n position: 'absolute',\n top: 4,\n right: 4,\n zIndex: 2,\n backgroundColor: colors.fillColorNeutral050Base,\n borderRadius: 16,\n height: 20,\n width: 20,\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: errorIconSizeMap[size],\n },\n })\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ViewProps } from 'react-native';
|
|
3
2
|
export declare const useKeyboardViewReady: () => boolean;
|
|
4
|
-
export declare function KeyboardView({ children }: Pick<ViewProps, 'children'>):
|
|
3
|
+
export declare function KeyboardView({ children }: Pick<ViewProps, 'children'>): import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
export declare const useKeyboardOpen: () => boolean;
|
|
6
5
|
//# sourceMappingURL=keyboard_view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard_view.d.ts","sourceRoot":"","sources":["../../../src/components/display/keyboard_view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keyboard_view.d.ts","sourceRoot":"","sources":["../../../src/components/display/keyboard_view.tsx"],"names":[],"mappings":"AAGA,OAAO,EAOL,SAAS,EACV,MAAM,cAAc,CAAA;AAOrB,eAAO,MAAM,oBAAoB,eAA6C,CAAA;AAE9E,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,2CAkCrE;AAiBD,eAAO,MAAM,eAAe,eAgB3B,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useNavigation } from '@react-navigation/native';
|
|
2
|
-
import
|
|
3
|
+
import { createContext, useContext, useEffect, useState } from 'react';
|
|
3
4
|
import { Dimensions, Keyboard, KeyboardAvoidingView, Platform, StyleSheet, View, } from 'react-native';
|
|
4
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
6
|
import { useChatContext } from '../../contexts/chat_context';
|
|
@@ -18,16 +19,10 @@ export function KeyboardView({ children }) {
|
|
|
18
19
|
android: edgeToEdge ? 'padding' : undefined,
|
|
19
20
|
ios: 'padding',
|
|
20
21
|
});
|
|
21
|
-
return (
|
|
22
|
+
return (_jsx(View, { style: styles.pageGapView, onLayout: event => {
|
|
22
23
|
const { height: viewHeight } = event.nativeEvent.layout;
|
|
23
24
|
setPageSheetGap(screenHeight - viewHeight);
|
|
24
|
-
}}
|
|
25
|
-
<KeyboardViewReadyContext.Provider value={hasTransitionedIn}>
|
|
26
|
-
<KeyboardAvoidingView keyboardVerticalOffset={pageSheetGap - bottom} behavior={behavior} style={styles.keyboardView} enabled={Platform.select({ android: isKeyboardOpen, ios: true })}>
|
|
27
|
-
{children}
|
|
28
|
-
</KeyboardAvoidingView>
|
|
29
|
-
</KeyboardViewReadyContext.Provider>
|
|
30
|
-
</View>);
|
|
25
|
+
}, children: _jsx(KeyboardViewReadyContext.Provider, { value: hasTransitionedIn, children: _jsx(KeyboardAvoidingView, { keyboardVerticalOffset: pageSheetGap - bottom, behavior: behavior, style: styles.keyboardView, enabled: Platform.select({ android: isKeyboardOpen, ios: true }), children: children }) }) }));
|
|
31
26
|
}
|
|
32
27
|
const useHasTransitionedIn = () => {
|
|
33
28
|
const navigation = useNavigation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard_view.js","sourceRoot":"","sources":["../../../src/components/display/keyboard_view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAEvE,
|
|
1
|
+
{"version":3,"file":"keyboard_view.js","sourceRoot":"","sources":["../../../src/components/display/keyboard_view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAEvE,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC7E,OAAO,EACL,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,IAAI,GAEL,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D,2EAA2E;AAC3E,MAAM,wBAAwB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAA;AAEpD,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,U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AACJ,CAAC,CAAA","sourcesContent":["import { ParamListBase, useNavigation } from '@react-navigation/native'\nimport type { NativeStackNavigationProp } from '@react-navigation/native-stack'\nimport React, { createContext, useContext, useEffect, useState } from 'react'\nimport {\n Dimensions,\n Keyboard,\n KeyboardAvoidingView,\n Platform,\n StyleSheet,\n View,\n ViewProps,\n} from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useChatContext } from '../../contexts/chat_context'\n\n// Default true: outside a KeyboardView there's no measurement to wait for.\nconst KeyboardViewReadyContext = createContext(true)\n\nexport const useKeyboardViewReady = () => useContext(KeyboardViewReadyContext)\n\nexport function KeyboardView({ children }: Pick<ViewProps, 'children'>) {\n const styles = useStyles()\n const isKeyboardOpen = useKeyboardOpen()\n const screenHeight = Dimensions.get('screen').height\n const [pageSheetGap, setPageSheetGap] = useState<number>(0)\n const hasTransitionedIn = useHasTransitionedIn()\n const { bottom } = useSafeAreaInsets()\n const { edgeToEdge } = useChatContext()\n\n const behavior: 'padding' | 'height' | 'position' | undefined = Platform.select({\n android: edgeToEdge ? 'padding' : undefined,\n ios: 'padding',\n })\n\n return (\n <View\n style={styles.pageGapView}\n onLayout={event => {\n const { height: viewHeight } = event.nativeEvent.layout\n setPageSheetGap(screenHeight - viewHeight)\n }}\n >\n <KeyboardViewReadyContext.Provider value={hasTransitionedIn}>\n <KeyboardAvoidingView\n keyboardVerticalOffset={pageSheetGap - bottom}\n behavior={behavior}\n style={styles.keyboardView}\n enabled={Platform.select({ android: isKeyboardOpen, ios: true })}\n >\n {children}\n </KeyboardAvoidingView>\n </KeyboardViewReadyContext.Provider>\n </View>\n )\n}\n\nconst useHasTransitionedIn = () => {\n const navigation = useNavigation<NativeStackNavigationProp<ParamListBase>>()\n const [hasTransitionedIn, setHasTransitionedIn] = useState<boolean>(false)\n\n useEffect(() => {\n return navigation.addListener('transitionEnd', event => {\n if (event.data.closing) return\n\n setHasTransitionedIn(true)\n })\n }, [navigation])\n\n return hasTransitionedIn\n}\n\nexport const useKeyboardOpen = () => {\n const [open, setOpen] = useState(false)\n\n useEffect(() => {\n return Keyboard.addListener('keyboardDidShow', () => {\n setOpen(true)\n }).remove\n }, [])\n\n useEffect(() => {\n return Keyboard.addListener('keyboardDidHide', () => {\n setOpen(false)\n }).remove\n }, [])\n\n return open\n}\n\nconst useStyles = () => {\n return StyleSheet.create({\n pageGapView: {\n flex: 1,\n },\n keyboardView: {\n flex: 1,\n },\n })\n}\n"]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type ViewStyle } from 'react-native';
|
|
3
2
|
import { MemberResource } from '../../types';
|
|
4
3
|
interface PersonProps {
|
|
5
4
|
person: MemberResource;
|
|
6
5
|
style?: ViewStyle;
|
|
7
6
|
}
|
|
8
|
-
export declare function Person({ person, style }: PersonProps):
|
|
7
|
+
export declare function Person({ person, style }: PersonProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
10
9
|
//# sourceMappingURL=person.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.d.ts","sourceRoot":"","sources":["../../../src/components/display/person.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"person.d.ts","sourceRoot":"","sources":["../../../src/components/display/person.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAU5C,UAAU,WAAW;IACnB,MAAM,EAAE,cAAc,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,wBAAgB,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,WAAW,2CAgBpD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import { platformFontWeightMedium } from '../../utils/styles';
|
|
4
4
|
import { Avatar } from './avatar';
|
|
@@ -6,17 +6,7 @@ import { Badge } from './badge';
|
|
|
6
6
|
import { Text } from './text';
|
|
7
7
|
export function Person({ person, style }) {
|
|
8
8
|
const styles = useStyles();
|
|
9
|
-
return (
|
|
10
|
-
<Avatar sourceUri={person.avatar}/>
|
|
11
|
-
<View style={styles.content}>
|
|
12
|
-
<Text style={styles.name} numberOfLines={2}>
|
|
13
|
-
{person.name}
|
|
14
|
-
</Text>
|
|
15
|
-
<View style={styles.badges}>
|
|
16
|
-
{person.badges?.map((badge, index) => <Badge key={index} label={badge.title}/>)}
|
|
17
|
-
</View>
|
|
18
|
-
</View>
|
|
19
|
-
</View>);
|
|
9
|
+
return (_jsxs(View, { style: [styles.wrapper, style], children: [_jsx(Avatar, { sourceUri: person.avatar }), _jsxs(View, { style: styles.content, children: [_jsx(Text, { style: styles.name, numberOfLines: 2, children: person.name }), _jsx(View, { style: styles.badges, children: person.badges?.map((badge, index) => _jsx(Badge, { label: badge.title }, index)) })] })] }));
|
|
20
10
|
}
|
|
21
11
|
// =================================
|
|
22
12
|
// ====== Styles ===================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.js","sourceRoot":"","sources":["../../../src/components/display/person.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"person.js","sourceRoot":"","sources":["../../../src/components/display/person.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAA;AAE/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAW7B,MAAM,UAAU,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAe;IACnD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,aAClC,KAAC,MAAM,IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,GAAI,EACpC,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,aACzB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,CAAC,YACvC,MAAM,CAAC,IAAI,GACP,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,YACvB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAC,KAAK,IAAa,KAAK,EAAE,KAAK,CAAC,KAAK,IAAzB,KAAK,CAAwB,CAAC,GAC3E,IACF,IACF,CACR,CAAA;AACH,CAAC;AAED,oCAAoC;AACpC,oCAAoC;AACpC,oCAAoC;AAEpC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,OAAO,EAAE;YACP,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,OAAO,EAAE;YACP,GAAG,EAAE,CAAC;YACN,UAAU,EAAE,CAAC;SACd;QACD,IAAI,EAAE;YACJ,UAAU,EAAE,wBAAwB;SACrC;QACD,MAAM,EAAE;YACN,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;SACP;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, View, type ViewStyle } from 'react-native'\nimport { MemberResource } from '../../types'\nimport { platformFontWeightMedium } from '../../utils/styles'\nimport { Avatar } from './avatar'\nimport { Badge } from './badge'\nimport { Text } from './text'\n\n// =================================\n// ====== Components ===============\n// =================================\n\ninterface PersonProps {\n person: MemberResource\n style?: ViewStyle\n}\n\nexport function Person({ person, style }: PersonProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.wrapper, style]}>\n <Avatar sourceUri={person.avatar} />\n <View style={styles.content}>\n <Text style={styles.name} numberOfLines={2}>\n {person.name}\n </Text>\n <View style={styles.badges}>\n {person.badges?.map((badge, index) => <Badge key={index} label={badge.title} />)}\n </View>\n </View>\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = () => {\n return StyleSheet.create({\n wrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n content: {\n gap: 2,\n flexShrink: 1,\n },\n name: {\n fontWeight: platformFontWeightMedium,\n },\n badges: {\n flexDirection: 'row',\n gap: 4,\n },\n })\n}\n"]}
|
|
@@ -5,19 +5,19 @@ interface HeaderTextButtonProps {
|
|
|
5
5
|
title?: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare const HeaderTextButton: ({ onPress, title, ...props }: HeaderTextButtonProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const HeaderTextButton: ({ onPress, title, ...props }: HeaderTextButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
interface HeaderDismissButtonProps {
|
|
10
10
|
onPress: () => void;
|
|
11
11
|
title?: string;
|
|
12
12
|
tintColor?: ColorValue;
|
|
13
13
|
}
|
|
14
|
-
export declare const HeaderDismissButton: ({ onPress, title, tintColor, ...props }: HeaderDismissButtonProps) => import("react").JSX.Element;
|
|
14
|
+
export declare const HeaderDismissButton: ({ onPress, title, tintColor, ...props }: HeaderDismissButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
interface HeaderDoneButtonProps extends NativeStackHeaderRightProps {
|
|
16
16
|
navigation: {
|
|
17
17
|
goBack: () => void;
|
|
18
18
|
getState: () => any;
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
export declare const HeaderDoneButton: ({ navigation, ...props }: HeaderDoneButtonProps) => import("react").JSX.Element | null;
|
|
21
|
+
export declare const HeaderDoneButton: ({ navigation, ...props }: HeaderDoneButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
22
22
|
export {};
|
|
23
23
|
//# sourceMappingURL=platform_modal_header_buttons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform_modal_header_buttons.d.ts","sourceRoot":"","sources":["../../../src/components/display/platform_modal_header_buttons.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AACjF,OAAO,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAA;AAK/D,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,gBAAgB,GAAI,8BAI9B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"platform_modal_header_buttons.d.ts","sourceRoot":"","sources":["../../../src/components/display/platform_modal_header_buttons.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AACjF,OAAO,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAA;AAK/D,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,gBAAgB,GAAI,8BAI9B,qBAAqB,4CAavB,CAAA;AAED,UAAU,wBAAwB;IAChC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,UAAU,CAAA;CACvB;AAED,eAAO,MAAM,mBAAmB,GAAI,yCAKjC,wBAAwB,4CAoB1B,CAAA;AAED,UAAU,qBAAsB,SAAQ,2BAA2B;IACjE,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,CAAA;KAAE,CAAA;CACxD;AAED,eAAO,MAAM,gBAAgB,GAAI,0BAA0B,qBAAqB,mDAS/E,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { HeaderButton } from '@react-navigation/elements';
|
|
2
3
|
import { Platform, StyleSheet } from 'react-native';
|
|
3
4
|
import { useTheme } from '../../hooks';
|
|
@@ -5,19 +6,13 @@ import { Icon } from './icon';
|
|
|
5
6
|
import { TextButton } from './text_button';
|
|
6
7
|
export const HeaderTextButton = ({ onPress, title = 'Submit', ...props }) => {
|
|
7
8
|
const styles = useStyles();
|
|
8
|
-
return (
|
|
9
|
-
{title}
|
|
10
|
-
</TextButton>);
|
|
9
|
+
return (_jsx(TextButton, { maxFontSizeMultiplier: 1, onPress: onPress, textStyle: [styles.interactionColor, props.disabled && styles.disabledColor], ...props, children: title }));
|
|
11
10
|
};
|
|
12
11
|
export const HeaderDismissButton = ({ onPress, title = 'Cancel', tintColor, ...props }) => {
|
|
13
12
|
const styles = useStyles();
|
|
14
13
|
return Platform.select({
|
|
15
|
-
ios: (
|
|
16
|
-
{
|
|
17
|
-
</TextButton>),
|
|
18
|
-
default: (<HeaderButton onPress={onPress} style={[styles.androidCancelButton]} {...props}>
|
|
19
|
-
<Icon name="general.x" size={16} color={tintColor}/>
|
|
20
|
-
</HeaderButton>),
|
|
14
|
+
ios: (_jsx(TextButton, { maxFontSizeMultiplier: 1, onPress: onPress, textStyle: [styles.interactionColor, styles.iosCancelButton], ...props, children: title })),
|
|
15
|
+
default: (_jsx(HeaderButton, { onPress: onPress, style: [styles.androidCancelButton], ...props, children: _jsx(Icon, { name: "general.x", size: 16, color: tintColor }) })),
|
|
21
16
|
});
|
|
22
17
|
};
|
|
23
18
|
export const HeaderDoneButton = ({ navigation, ...props }) => {
|
|
@@ -26,7 +21,7 @@ export const HeaderDoneButton = ({ navigation, ...props }) => {
|
|
|
26
21
|
if (!isFirstScreen) {
|
|
27
22
|
return null;
|
|
28
23
|
}
|
|
29
|
-
return
|
|
24
|
+
return _jsx(HeaderTextButton, { ...props, onPress: navigation.goBack, title: "Done" });
|
|
30
25
|
};
|
|
31
26
|
const useStyles = () => {
|
|
32
27
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform_modal_header_buttons.js","sourceRoot":"","sources":["../../../src/components/display/platform_modal_header_buttons.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAc,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAQ1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,OAAO,EACP,KAAK,GAAG,QAAQ,EAChB,GAAG,KAAK,EACc,EAAE,EAAE;IAC1B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"platform_modal_header_buttons.js","sourceRoot":"","sources":["../../../src/components/display/platform_modal_header_buttons.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAc,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAQ1C,MAAM,CAAC,MAAM,gBAA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C,CAAA;IAEvC,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,KAAC,gBAAgB,OAAK,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,MAAM,EAAE,KAAK,EAAC,MAAM,GAAG,CAAA;AACjF,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC;gBACrB,GAAG,EAAE,MAAM,CAAC,6BAA6B;gBACzC,OAAO,EAAE,MAAM,CAAC,iCAAiC;aAClD,CAAC;SACH;QACD,mBAAmB,EAAE;YACnB,WAAW,EAAE,EAAE;SAChB;QACD,eAAe,EAAE;YACf,UAAU,EAAE,QAAQ;SACrB;QACD,aAAa,EAAE;YACb,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { HeaderButton } from '@react-navigation/elements'\nimport type { NativeStackHeaderRightProps } from '@react-navigation/native-stack'\nimport { ColorValue, Platform, StyleSheet } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { Icon } from './icon'\nimport { TextButton } from './text_button'\n\ninterface HeaderTextButtonProps {\n onPress: () => void\n title?: string\n disabled?: boolean\n}\n\nexport const HeaderTextButton = ({\n onPress,\n title = 'Submit',\n ...props\n}: HeaderTextButtonProps) => {\n const styles = useStyles()\n\n return (\n <TextButton\n maxFontSizeMultiplier={1}\n onPress={onPress}\n textStyle={[styles.interactionColor, props.disabled && styles.disabledColor]}\n {...props}\n >\n {title}\n </TextButton>\n )\n}\n\ninterface HeaderDismissButtonProps {\n onPress: () => void\n title?: string\n tintColor?: ColorValue\n}\n\nexport const HeaderDismissButton = ({\n onPress,\n title = 'Cancel',\n tintColor,\n ...props\n}: HeaderDismissButtonProps) => {\n const styles = useStyles()\n\n return Platform.select({\n ios: (\n <TextButton\n maxFontSizeMultiplier={1}\n onPress={onPress}\n textStyle={[styles.interactionColor, styles.iosCancelButton]}\n {...props}\n >\n {title}\n </TextButton>\n ),\n default: (\n <HeaderButton onPress={onPress} style={[styles.androidCancelButton]} {...props}>\n <Icon name=\"general.x\" size={16} color={tintColor} />\n </HeaderButton>\n ),\n })\n}\n\ninterface HeaderDoneButtonProps extends NativeStackHeaderRightProps {\n navigation: { goBack: () => void; getState: () => any }\n}\n\nexport const HeaderDoneButton = ({ navigation, ...props }: HeaderDoneButtonProps) => {\n const state = navigation.getState()\n const isFirstScreen = state.index === 0\n\n if (!isFirstScreen) {\n return null\n }\n\n return <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n interactionColor: {\n color: Platform.select({\n ios: colors.iOSModalHeaderButtonTextColor,\n android: colors.androidModalHeaderButtonTextColor,\n }),\n },\n androidCancelButton: {\n marginRight: 16,\n },\n iosCancelButton: {\n fontWeight: 'normal',\n },\n disabledColor: {\n color: colors.textColorDefaultDisabled,\n },\n })\n}\n"]}
|
|
@@ -10,5 +10,5 @@ export interface PressableRowProps extends PropsWithChildren {
|
|
|
10
10
|
iconPath?: IconProps['name'];
|
|
11
11
|
iconColor?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare const PressableRow: ({ children, isActive, onPress, style, text, textStyle, iconPath, iconColor, }: PressableRowProps) => import("react").JSX.Element;
|
|
13
|
+
export declare const PressableRow: ({ children, isActive, onPress, style, text, textStyle, iconPath, iconColor, }: PressableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
//# sourceMappingURL=pressable_row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pressable_row.d.ts","sourceRoot":"","sources":["../../../src/components/display/pressable_row.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAQ,SAAS,EAAE,MAAM,QAAQ,CAAA;AAGxC,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,YAAY,GAAI,+EAS1B,iBAAiB,
|
|
1
|
+
{"version":3,"file":"pressable_row.d.ts","sourceRoot":"","sources":["../../../src/components/display/pressable_row.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAQ,SAAS,EAAE,MAAM,QAAQ,CAAA;AAGxC,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,YAAY,GAAI,+EAS1B,iBAAiB,4CAsBnB,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { PlatformPressable } from '@react-navigation/elements';
|
|
2
3
|
import { StyleSheet, View } from 'react-native';
|
|
3
4
|
import { useTheme } from '../../hooks';
|
|
@@ -5,13 +6,7 @@ import { Icon } from './icon';
|
|
|
5
6
|
import { Text } from './text';
|
|
6
7
|
export const PressableRow = ({ children, isActive, onPress, style, text, textStyle, iconPath, iconColor, }) => {
|
|
7
8
|
const styles = useRowStyles({ isActive, iconColor });
|
|
8
|
-
return (
|
|
9
|
-
<View style={[styles.innerContainer, style]}>
|
|
10
|
-
{children}
|
|
11
|
-
<Text style={textStyle}>{text}</Text>
|
|
12
|
-
<Icon name={iconPath || 'general.check'} size={16} style={styles.rowIconRight} accessibilityElementsHidden/>
|
|
13
|
-
</View>
|
|
14
|
-
</PlatformPressable>);
|
|
9
|
+
return (_jsx(PlatformPressable, { style: styles.container, onPress: onPress, accessibilityRole: "radio", accessibilityState: { selected: isActive }, children: _jsxs(View, { style: [styles.innerContainer, style], children: [children, _jsx(Text, { style: textStyle, children: text }), _jsx(Icon, { name: iconPath || 'general.check', size: 16, style: styles.rowIconRight, accessibilityElementsHidden: true })] }) }));
|
|
15
10
|
};
|
|
16
11
|
const ASPECT_RATIO = 16 / 9;
|
|
17
12
|
const THUMBNAIL_WIDTH = 80;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pressable_row.js","sourceRoot":"","sources":["../../../src/components/display/pressable_row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAY7B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KA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,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { PropsWithChildren } from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { Icon, IconProps } from './icon'\nimport { Text } from './text'\n\nexport interface PressableRowProps extends PropsWithChildren {\n isActive?: boolean\n onPress: () => void\n style?: ViewStyle\n textStyle?: any\n text: string\n iconPath?: IconProps['name']\n iconColor?: string\n}\n\nexport const PressableRow = ({\n children,\n isActive,\n onPress,\n style,\n text,\n textStyle,\n iconPath,\n iconColor,\n}: PressableRowProps) => {\n const styles = useRowStyles({ isActive, iconColor })\n\n return (\n <PlatformPressable\n style={styles.container}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isActive }}\n >\n <View style={[styles.innerContainer, style]}>\n {children}\n <Text style={textStyle}>{text}</Text>\n <Icon\n name={iconPath || 'general.check'}\n size={16}\n style={styles.rowIconRight}\n accessibilityElementsHidden\n />\n </View>\n </PlatformPressable>\n )\n}\n\nconst ASPECT_RATIO = 16 / 9\nconst THUMBNAIL_WIDTH = 80\nconst THUMBNAIL_HEIGHT = THUMBNAIL_WIDTH / ASPECT_RATIO\n\nconst useRowStyles = ({\n isActive = false,\n iconColor,\n}: { isActive?: boolean; iconColor?: string } = {}) => {\n const theme = useTheme()\n return StyleSheet.create({\n container: {\n paddingLeft: 16,\n },\n innerContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n paddingVertical: 12,\n paddingRight: 16,\n },\n borderLessRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n paddingVertical: 12,\n paddingRight: 16,\n paddingLeft: 16,\n },\n viewMoreButton: {\n flex: 1,\n },\n row: {},\n rowImage: {\n width: THUMBNAIL_WIDTH,\n height: THUMBNAIL_HEIGHT,\n borderRadius: 4,\n },\n rowContent: {\n flexShrink: 1,\n },\n rowIconRight: {\n marginLeft: 'auto',\n color: iconColor || theme.colors.iconColorDefaultDim,\n opacity: isActive ? 1 : 0,\n },\n rowTitle: {\n fontSize: 16,\n flexShrink: 1,\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
2
|
interface SpinnerProps {
|
|
4
3
|
/**
|
|
@@ -18,6 +17,6 @@ interface SpinnerProps {
|
|
|
18
17
|
*/
|
|
19
18
|
style?: StyleProp<ViewStyle>;
|
|
20
19
|
}
|
|
21
|
-
export declare function Spinner({ size, maxFontSizeMultiplier, minFontSizeMultiplier, style, }: SpinnerProps):
|
|
20
|
+
export declare function Spinner({ size, maxFontSizeMultiplier, minFontSizeMultiplier, style, }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
22
21
|
export {};
|
|
23
22
|
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/display/spinner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/display/spinner.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAoBrE,UAAU,YAAY;IACpB;;SAEK;IACL,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B;AAED,wBAAgB,OAAO,CAAC,EACtB,IAAS,EACT,qBAA+C,EAC/C,qBAA+C,EAC/C,KAAK,GACN,EAAE,YAAY,2CAkCd"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
2
3
|
import { StyleSheet, View } from 'react-native';
|
|
3
4
|
import Animated, { useSharedValue, useAnimatedStyle, withRepeat, withTiming, Easing, } from 'react-native-reanimated';
|
|
4
5
|
import { useFontScale, useTheme } from '../../hooks';
|
|
@@ -24,14 +25,7 @@ export function Spinner({ size = 20, maxFontSizeMultiplier = PREVENT_SCALING_DEF
|
|
|
24
25
|
rotation.value = 0; // Reset rotation when Spinner unmounts
|
|
25
26
|
};
|
|
26
27
|
}, [rotation]);
|
|
27
|
-
return (
|
|
28
|
-
<Animated.View style={[styles.animatedContainer, animatedStyle]}>
|
|
29
|
-
<View style={styles.clipping}>
|
|
30
|
-
<View style={[styles.circle, styles.spinner]}/>
|
|
31
|
-
</View>
|
|
32
|
-
<View style={[styles.circle, styles.track]}/>
|
|
33
|
-
</Animated.View>
|
|
34
|
-
</View>);
|
|
28
|
+
return (_jsx(View, { style: style, children: _jsxs(Animated.View, { style: [styles.animatedContainer, animatedStyle], children: [_jsx(View, { style: styles.clipping, children: _jsx(View, { style: [styles.circle, styles.spinner] }) }), _jsx(View, { style: [styles.circle, styles.track] })] }) }));
|
|
35
29
|
}
|
|
36
30
|
const useStyles = ({ maxFontSizeMultiplier, minFontSizeMultiplier, size }) => {
|
|
37
31
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../../src/components/display/spinner.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../../src/components/display/spinner.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAa,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AACrE,OAAO,QAAQ,EAAE,EACf,cAAc,EACd,gBAA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Sheet, View, ViewStyle } from 'react-native'\nimport Animated, {\n useSharedValue,\n useAnimatedStyle,\n withRepeat,\n withTiming,\n Easing,\n} from 'react-native-reanimated'\nimport { useFontScale, useTheme } from '../../hooks'\n\n// =================================\n// ====== Constants ================\n// =================================\n\nconst PREVENT_SCALING_DEFAULT = 1\n\n// =================================\n// ====== Component ================\n// =================================\n\ninterface SpinnerProps {\n /**\n * Size of the spinner in px\n * */\n size?: number\n /**\n * Specifies the maximum size spinner can scale to if the device's font-size is increased.\n */\n maxFontSizeMultiplier?: number\n /**\n * Specifies the minimum size spinner can scale to if the device's font-size is decreased.\n */\n minFontSizeMultiplier?: number\n /**\n * Style to apply to the spinner\n */\n style?: StyleProp<ViewStyle>\n}\n\nexport function Spinner({\n size = 20,\n maxFontSizeMultiplier = PREVENT_SCALING_DEFAULT,\n minFontSizeMultiplier = PREVENT_SCALING_DEFAULT,\n style,\n}: SpinnerProps) {\n const styles = useStyles({ maxFontSizeMultiplier, minFontSizeMultiplier, size })\n\n const rotation = useSharedValue(0)\n const animatedStyle = useAnimatedStyle(() => {\n return {\n transform: [{ rotate: `${rotation.value}deg` }],\n }\n })\n\n useEffect(() => {\n rotation.value = withRepeat(\n withTiming(360, {\n duration: 1000,\n easing: Easing.linear,\n }),\n -1 // loops animation infinitely\n )\n\n return () => {\n rotation.value = 0 // Reset rotation when Spinner unmounts\n }\n }, [rotation])\n\n return (\n <View style={style}>\n <Animated.View style={[styles.animatedContainer, animatedStyle]}>\n <View style={styles.clipping}>\n <View style={[styles.circle, styles.spinner]} />\n </View>\n <View style={[styles.circle, styles.track]} />\n </Animated.View>\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\ninterface Styles {\n maxFontSizeMultiplier: number | undefined\n minFontSizeMultiplier: number | undefined\n size: number\n}\n\nconst useStyles = ({ maxFontSizeMultiplier, minFontSizeMultiplier, size }: Styles) => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier, minFontSizeMultiplier })\n const scalableSize = size * fontScale\n\n return StyleSheet.create({\n animatedContainer: {\n width: scalableSize,\n height: scalableSize,\n borderRadius: scalableSize / 2,\n },\n circle: {\n width: scalableSize,\n height: scalableSize,\n borderRadius: scalableSize / 2,\n borderStyle: 'solid',\n borderWidth: 3,\n },\n spinner: {\n borderColor: colors.borderColorDefaultDarkest,\n },\n track: {\n borderColor: colors.fillColorNeutral050Base,\n },\n clipping: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: scalableSize / 2,\n height: scalableSize / 2,\n overflow: 'hidden',\n zIndex: 200,\n },\n })\n}\n"]}
|