@planningcenter/chat-react-native 3.15.0-rc.0 → 3.15.0-rc.10
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/conversations/conversation_actions.js +1 -1
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +9 -5
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/mute_indicator.d.ts.map +1 -1
- package/build/components/conversations/mute_indicator.js +3 -1
- package/build/components/conversations/mute_indicator.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +6 -3
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/conversations/unread_count_badge.js +9 -6
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +2 -4
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/avatar.d.ts +3 -1
- package/build/components/display/avatar.d.ts.map +1 -1
- package/build/components/display/avatar.js +2 -2
- package/build/components/display/avatar.js.map +1 -1
- package/build/components/display/avatar_group.d.ts +3 -1
- package/build/components/display/avatar_group.d.ts.map +1 -1
- package/build/components/display/avatar_group.js +2 -2
- package/build/components/display/avatar_group.js.map +1 -1
- package/build/components/display/badge.d.ts +5 -1
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +2 -2
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/icon.d.ts +26 -13
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +0 -12
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/index.d.ts +1 -0
- package/build/components/display/index.d.ts.map +1 -1
- package/build/components/display/index.js +1 -0
- package/build/components/display/index.js.map +1 -1
- package/build/components/display/pressable_row.d.ts +14 -0
- package/build/components/display/pressable_row.d.ts.map +1 -0
- package/build/components/display/pressable_row.js +65 -0
- package/build/components/display/pressable_row.js.map +1 -0
- package/build/components/display/toggle_button.d.ts +3 -1
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +1 -1
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/primitive/avatar_primitive.d.ts +2 -0
- package/build/components/primitive/avatar_primitive.d.ts.map +1 -1
- package/build/components/primitive/avatar_primitive.js +20 -19
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +3 -2
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +5 -3
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.d.ts.map +1 -1
- package/build/hooks/index.js +1 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/use_api.d.ts +1 -1
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_api_client.d.ts +1 -1
- package/build/hooks/use_api_client.d.ts.map +1 -1
- package/build/hooks/use_api_client.js +1 -1
- package/build/hooks/use_api_client.js.map +1 -1
- package/build/hooks/use_app_name.d.ts +3 -0
- package/build/hooks/use_app_name.d.ts.map +1 -0
- package/build/hooks/use_app_name.js +12 -0
- package/build/hooks/use_app_name.js.map +1 -0
- package/build/hooks/use_async_storage.d.ts +1 -1
- package/build/hooks/use_async_storage.d.ts.map +1 -1
- package/build/hooks/use_async_storage.js +6 -5
- package/build/hooks/use_async_storage.js.map +1 -1
- package/build/hooks/use_report_bug_action.d.ts +1 -1
- package/build/hooks/use_report_bug_action.d.ts.map +1 -1
- package/build/hooks/use_report_bug_action.js +1 -9
- package/build/hooks/use_report_bug_action.js.map +1 -1
- package/build/hooks/use_scalable_number_of_lines.d.ts +2 -0
- package/build/hooks/use_scalable_number_of_lines.d.ts.map +1 -0
- package/build/hooks/use_scalable_number_of_lines.js +9 -0
- package/build/hooks/use_scalable_number_of_lines.js.map +1 -0
- package/build/hooks/use_suspense_api.d.ts +1 -1
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/navigation/index.d.ts +20 -5
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +23 -15
- package/build/navigation/index.js.map +1 -1
- package/build/polyfills/events/CustomEvent.d.ts +21 -0
- package/build/polyfills/events/CustomEvent.d.ts.map +1 -0
- package/build/polyfills/events/CustomEvent.js +22 -0
- package/build/polyfills/events/CustomEvent.js.map +1 -0
- package/build/polyfills/events/Event.d.ts +49 -0
- package/build/polyfills/events/Event.d.ts.map +1 -0
- package/build/polyfills/events/Event.js +125 -0
- package/build/polyfills/events/Event.js.map +1 -0
- package/build/polyfills/events/EventHandlerAttributes.d.ts +8 -0
- package/build/polyfills/events/EventHandlerAttributes.d.ts.map +1 -0
- package/build/polyfills/events/EventHandlerAttributes.js +46 -0
- package/build/polyfills/events/EventHandlerAttributes.js.map +1 -0
- package/build/polyfills/events/EventTarget.d.ts +33 -0
- package/build/polyfills/events/EventTarget.d.ts.map +1 -0
- package/build/polyfills/events/EventTarget.js +238 -0
- package/build/polyfills/events/EventTarget.js.map +1 -0
- package/build/polyfills/events/internals/EventInternals.d.ts +30 -0
- package/build/polyfills/events/internals/EventInternals.d.ts.map +1 -0
- package/build/polyfills/events/internals/EventInternals.js +76 -0
- package/build/polyfills/events/internals/EventInternals.js.map +1 -0
- package/build/polyfills/events/internals/EventTargetInternals.d.ts +9 -0
- package/build/polyfills/events/internals/EventTargetInternals.d.ts.map +1 -0
- package/build/polyfills/events/internals/EventTargetInternals.js +11 -0
- package/build/polyfills/events/internals/EventTargetInternals.js.map +1 -0
- package/build/polyfills/webidl/PlatformObjects.d.ts +31 -0
- package/build/polyfills/webidl/PlatformObjects.d.ts.map +1 -0
- package/build/polyfills/webidl/PlatformObjects.js +39 -0
- package/build/polyfills/webidl/PlatformObjects.js.map +1 -0
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +62 -57
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +9 -7
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +50 -31
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +2 -2
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +6 -6
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.js +1 -1
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/get_help_screen.d.ts +5 -0
- package/build/screens/get_help_screen.d.ts.map +1 -0
- package/build/screens/get_help_screen.js +94 -0
- package/build/screens/get_help_screen.js.map +1 -0
- package/build/screens/message_actions_screen.d.ts +1 -1
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.js +14 -11
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/utils/client/index.d.ts +1 -0
- package/build/utils/client/index.d.ts.map +1 -1
- package/build/utils/client/index.js +1 -0
- package/build/utils/client/index.js.map +1 -1
- package/build/utils/client/types.d.ts +61 -0
- package/build/utils/client/types.d.ts.map +1 -0
- package/build/utils/client/types.js +2 -0
- package/build/utils/client/types.js.map +1 -0
- package/build/utils/styles.d.ts +1 -1
- package/build/utils/styles.js +1 -1
- package/build/utils/styles.js.map +1 -1
- package/build/utils/theme.d.ts +1 -0
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js +2 -0
- package/build/utils/theme.js.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/event-polyfill.test.ts +314 -0
- package/src/components/conversations/conversation_actions.tsx +1 -1
- package/src/components/conversations/conversation_preview.tsx +15 -4
- package/src/components/conversations/mute_indicator.tsx +9 -1
- package/src/components/conversations/swipeable_toggle_button.tsx +18 -3
- package/src/components/conversations/unread_count_badge.tsx +9 -6
- package/src/components/display/action_button.tsx +3 -4
- package/src/components/display/avatar.tsx +5 -1
- package/src/components/display/avatar_group.tsx +5 -1
- package/src/components/display/badge.tsx +6 -1
- package/src/components/display/icon.tsx +17 -14
- package/src/components/display/index.ts +1 -0
- package/src/components/display/pressable_row.tsx +103 -0
- package/src/components/display/toggle_button.tsx +12 -1
- package/src/components/primitive/avatar_primitive.tsx +35 -19
- package/src/components/primitive/form_sheet.tsx +33 -5
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use_api.ts +1 -1
- package/src/hooks/use_api_client.ts +2 -2
- package/src/hooks/use_app_name.ts +17 -0
- package/src/hooks/use_async_storage.ts +8 -5
- package/src/hooks/use_report_bug_action.ts +2 -10
- package/src/hooks/use_scalable_number_of_lines.ts +10 -0
- package/src/hooks/use_suspense_api.ts +1 -1
- package/src/index.tsx +2 -0
- package/src/navigation/index.tsx +38 -25
- package/src/polyfills/events/CustomEvent.ts +32 -0
- package/src/polyfills/events/Event.ts +186 -0
- package/src/polyfills/events/EventHandlerAttributes.ts +67 -0
- package/src/polyfills/events/EventTarget.ts +360 -0
- package/src/polyfills/events/README.md +1 -0
- package/src/polyfills/events/internals/EventInternals.ts +95 -0
- package/src/polyfills/events/internals/EventTargetInternals.ts +16 -0
- package/src/polyfills/webidl/PlatformObjects.ts +50 -0
- package/src/screens/bug_report_screen.tsx +79 -67
- package/src/screens/conversation_filters/components/conversation_filters.tsx +10 -7
- package/src/screens/conversation_filters/components/rows.tsx +63 -50
- package/src/screens/conversations/components/list_header_component.tsx +3 -1
- package/src/screens/conversations/conversations_screen.tsx +8 -6
- package/src/screens/design_system_screen.tsx +1 -1
- package/src/screens/get_help_screen.tsx +131 -0
- package/src/screens/message_actions_screen.tsx +34 -12
- package/src/utils/client/index.ts +1 -0
- package/src/utils/styles.ts +1 -1
- package/src/utils/theme.ts +3 -0
- /package/src/utils/client/{types.d.ts → types.ts} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { useNavigation } from '@react-navigation/native'
|
|
2
|
+
import { NativeStackScreenProps } from '@react-navigation/native-stack'
|
|
3
|
+
import { useCallback } from 'react'
|
|
4
|
+
import { Linking, StyleSheet, View } from 'react-native'
|
|
5
|
+
import { Heading, PressableRow, Text, TextInlineButton } from '../components'
|
|
6
|
+
import { useApiGet, useTheme } from '../hooks'
|
|
7
|
+
import { useAppName } from '../hooks/use_app_name'
|
|
8
|
+
import { ResourceObject } from '../types'
|
|
9
|
+
|
|
10
|
+
type GetHelpScreenProps = NativeStackScreenProps<{}>
|
|
11
|
+
|
|
12
|
+
interface OrganizationResource extends ResourceObject {
|
|
13
|
+
id: number
|
|
14
|
+
name: string
|
|
15
|
+
contactEmail: string
|
|
16
|
+
contactPhoneNumber: string
|
|
17
|
+
churchCenterChatHelpUrl: string
|
|
18
|
+
servicesChatHelpUrl: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const useOrganization = () => {
|
|
22
|
+
const { data: organization } = useApiGet<OrganizationResource>({
|
|
23
|
+
url: '/',
|
|
24
|
+
data: {
|
|
25
|
+
fields: {
|
|
26
|
+
Organization: [
|
|
27
|
+
'contact_phone_number',
|
|
28
|
+
'contact_email',
|
|
29
|
+
'name',
|
|
30
|
+
'church_center_chat_help_url',
|
|
31
|
+
'services_chat_help_url',
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
return organization
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const GetHelpScreen = ({}: GetHelpScreenProps) => {
|
|
41
|
+
const styles = useStyles()
|
|
42
|
+
const appName = useAppName()
|
|
43
|
+
const isChurchCenter = appName === 'churchcenter'
|
|
44
|
+
const navigation = useNavigation()
|
|
45
|
+
const organization = useOrganization()
|
|
46
|
+
const contactPresent = organization?.contactEmail || organization?.contactPhoneNumber
|
|
47
|
+
const getHelpLink = isChurchCenter
|
|
48
|
+
? organization?.churchCenterChatHelpUrl
|
|
49
|
+
: organization?.servicesChatHelpUrl
|
|
50
|
+
|
|
51
|
+
const handleNavigateToBugReport = useCallback(() => {
|
|
52
|
+
navigation.navigate('BugReport')
|
|
53
|
+
}, [navigation])
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<View style={[styles.container]}>
|
|
57
|
+
<Heading variant="h2" style={[styles.heading, styles.headingBottomBorder]}>
|
|
58
|
+
How-to articles
|
|
59
|
+
</Heading>
|
|
60
|
+
<PressableRow
|
|
61
|
+
onPress={() => Linking.openURL(getHelpLink || '')}
|
|
62
|
+
text="Get help with chat"
|
|
63
|
+
isActive={true}
|
|
64
|
+
iconPath="general.newWindow"
|
|
65
|
+
/>
|
|
66
|
+
{contactPresent && (
|
|
67
|
+
<Heading variant="h2" style={[styles.heading, styles.headingBottomBorder]}>
|
|
68
|
+
Contact {organization?.name}
|
|
69
|
+
</Heading>
|
|
70
|
+
)}
|
|
71
|
+
<ContactRow email={organization?.contactEmail} />
|
|
72
|
+
<ContactRow phone={organization?.contactPhoneNumber} />
|
|
73
|
+
<Heading variant="h2" style={[styles.heading]}>
|
|
74
|
+
Report a bug
|
|
75
|
+
</Heading>
|
|
76
|
+
<View style={styles.text}>
|
|
77
|
+
<Text>
|
|
78
|
+
Having an issue?{' '}
|
|
79
|
+
<TextInlineButton onPress={handleNavigateToBugReport}>
|
|
80
|
+
Submit a bug report
|
|
81
|
+
</TextInlineButton>{' '}
|
|
82
|
+
to the development team.
|
|
83
|
+
</Text>
|
|
84
|
+
</View>
|
|
85
|
+
</View>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const ContactRow = ({ email, phone }: { email?: string; phone?: string }) => {
|
|
90
|
+
if (!email && !phone) return null
|
|
91
|
+
|
|
92
|
+
const contact = email || phone
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<PressableRow
|
|
96
|
+
onPress={() => {}}
|
|
97
|
+
text={contact || ''}
|
|
98
|
+
isActive={true}
|
|
99
|
+
iconPath={email ? 'services.email' : 'general.phone'}
|
|
100
|
+
/>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const useStyles = () => {
|
|
105
|
+
const { colors } = useTheme()
|
|
106
|
+
|
|
107
|
+
return StyleSheet.create({
|
|
108
|
+
container: {
|
|
109
|
+
flex: 1,
|
|
110
|
+
},
|
|
111
|
+
text: {
|
|
112
|
+
paddingVertical: 4,
|
|
113
|
+
paddingHorizontal: 16,
|
|
114
|
+
},
|
|
115
|
+
heading: {
|
|
116
|
+
marginLeft: 16,
|
|
117
|
+
paddingTop: 24,
|
|
118
|
+
paddingBottom: 12,
|
|
119
|
+
},
|
|
120
|
+
headingBottomBorder: {
|
|
121
|
+
marginLeft: 16,
|
|
122
|
+
paddingLeft: 0,
|
|
123
|
+
borderBottomWidth: 1,
|
|
124
|
+
borderBottomColor: colors.borderColorDefaultBase,
|
|
125
|
+
},
|
|
126
|
+
headingAux: {
|
|
127
|
+
paddingTop: 24,
|
|
128
|
+
paddingHorizontal: 16,
|
|
129
|
+
},
|
|
130
|
+
})
|
|
131
|
+
}
|
|
@@ -13,6 +13,7 @@ import { useConversationMessages } from '../hooks/use_conversation_messages'
|
|
|
13
13
|
import { useMessageReactionToggle } from '../hooks/use_message_reaction_toggle'
|
|
14
14
|
import { ReactionCountResource } from '../types/resources/reaction'
|
|
15
15
|
import { Clipboard, Haptic } from '../utils/native_adapters'
|
|
16
|
+
import { MessageResource } from '../types'
|
|
16
17
|
|
|
17
18
|
export const MessageActionsScreenOptions = getFormSheetScreenOptions({
|
|
18
19
|
sheetAllowedDetents: [0.5],
|
|
@@ -26,19 +27,40 @@ export type MessageActionsScreenProps = StaticScreenProps<{
|
|
|
26
27
|
}>
|
|
27
28
|
|
|
28
29
|
export function MessageActionsScreen({ route }: MessageActionsScreenProps) {
|
|
29
|
-
const navigation = useNavigation()
|
|
30
30
|
const { conversation_id, message_id, canDeleteNonAuthoredMessages } = route.params
|
|
31
31
|
|
|
32
|
-
const apiClient = useApiClient()
|
|
33
|
-
const styles = useStyles()
|
|
34
|
-
|
|
35
32
|
const { messages, refetch } = useConversationMessages(
|
|
36
33
|
{ conversation_id },
|
|
37
34
|
{ refetchOnMount: false }
|
|
38
35
|
)
|
|
39
36
|
const message = messages.find(m => m.id === message_id)
|
|
40
37
|
|
|
41
|
-
if (!message)
|
|
38
|
+
if (!message) return null
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<MessageActionsScreenContent
|
|
42
|
+
message={message}
|
|
43
|
+
conversation_id={conversation_id}
|
|
44
|
+
canDeleteNonAuthoredMessages={canDeleteNonAuthoredMessages || false}
|
|
45
|
+
refetchMessages={refetch}
|
|
46
|
+
/>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function MessageActionsScreenContent({
|
|
51
|
+
message,
|
|
52
|
+
conversation_id,
|
|
53
|
+
canDeleteNonAuthoredMessages,
|
|
54
|
+
refetchMessages,
|
|
55
|
+
}: {
|
|
56
|
+
message: MessageResource
|
|
57
|
+
conversation_id: number
|
|
58
|
+
canDeleteNonAuthoredMessages: boolean
|
|
59
|
+
refetchMessages: () => void
|
|
60
|
+
}) {
|
|
61
|
+
const navigation = useNavigation()
|
|
62
|
+
const apiClient = useApiClient()
|
|
63
|
+
const styles = useStyles()
|
|
42
64
|
|
|
43
65
|
const myReactions = message?.reactionCounts
|
|
44
66
|
.filter(reaction => reaction.mine)
|
|
@@ -73,15 +95,15 @@ export function MessageActionsScreen({ route }: MessageActionsScreenProps) {
|
|
|
73
95
|
})
|
|
74
96
|
|
|
75
97
|
const deleteMessage = useCallback(() => {
|
|
76
|
-
const url = `/me/conversations/${conversation_id}/messages/${
|
|
98
|
+
const url = `/me/conversations/${conversation_id}/messages/${message.id}/`
|
|
77
99
|
|
|
78
100
|
return apiClient.chat.delete({ url })
|
|
79
|
-
}, [apiClient, conversation_id,
|
|
101
|
+
}, [apiClient, conversation_id, message.id])
|
|
80
102
|
|
|
81
103
|
const { mutate: handleDeleteMessage } = useMutation({
|
|
82
104
|
mutationFn: deleteMessage,
|
|
83
105
|
onSuccess: () => {
|
|
84
|
-
|
|
106
|
+
refetchMessages()
|
|
85
107
|
Haptic.notificationSuccess()
|
|
86
108
|
navigation.goBack()
|
|
87
109
|
},
|
|
@@ -104,24 +126,24 @@ export function MessageActionsScreen({ route }: MessageActionsScreenProps) {
|
|
|
104
126
|
{
|
|
105
127
|
...(targetRoute?.params || {}),
|
|
106
128
|
conversation_id,
|
|
107
|
-
editing_message_id:
|
|
129
|
+
editing_message_id: message.id,
|
|
108
130
|
},
|
|
109
131
|
isNil
|
|
110
132
|
)
|
|
111
133
|
navigation.dispatch(StackActions.popTo('Conversation', params))
|
|
112
|
-
}, [navigation, conversation_id,
|
|
134
|
+
}, [navigation, conversation_id, message.id])
|
|
113
135
|
|
|
114
136
|
const handleViewReadReceiptsPress = useCallback(() => {
|
|
115
137
|
Haptic.impactLight()
|
|
116
138
|
const params = omitBy(
|
|
117
139
|
{
|
|
118
140
|
conversation_id,
|
|
119
|
-
message_id,
|
|
141
|
+
message_id: message.id,
|
|
120
142
|
},
|
|
121
143
|
isNil
|
|
122
144
|
)
|
|
123
145
|
navigation.dispatch(StackActions.popTo('MessageReadReceipts', params))
|
|
124
|
-
}, [navigation, conversation_id,
|
|
146
|
+
}, [navigation, conversation_id, message.id])
|
|
125
147
|
|
|
126
148
|
return (
|
|
127
149
|
<FormSheet.Root style={styles.formSheetContent}>
|
package/src/utils/styles.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Platform } from 'react-native'
|
|
|
2
2
|
import { tokens } from '../vendor/tapestry/tokens'
|
|
3
3
|
|
|
4
4
|
export const MAX_FONT_SIZE_MULTIPLIER = 1.5
|
|
5
|
-
export const MAX_FONT_SIZE_MULTIPLIER_LANDMARK = 1.
|
|
5
|
+
export const MAX_FONT_SIZE_MULTIPLIER_LANDMARK = 1.2 // Use in headers, footers, toolbars, etc.
|
|
6
6
|
|
|
7
7
|
export const CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL = 16 // TODO: move to `screens/conversation/utils/styles` when `/screens/conversation` is created
|
|
8
8
|
|
package/src/utils/theme.ts
CHANGED
|
@@ -57,6 +57,7 @@ interface ChatColors {
|
|
|
57
57
|
androidModalHeaderButtonTextColor: ColorValue | string | undefined
|
|
58
58
|
iOSModalHeaderButtonTextColor: OpaqueColorValue | string | undefined
|
|
59
59
|
androidSwitchThumbColor: string | undefined
|
|
60
|
+
conversationActionsBackground: string
|
|
60
61
|
testColor: string
|
|
61
62
|
statusSuccessIcon: string
|
|
62
63
|
statusSuccessText: string
|
|
@@ -99,6 +100,7 @@ const colorsChatLight: ChatColors = {
|
|
|
99
100
|
buttonEnd: undefined,
|
|
100
101
|
interaction: tokens.fillColorInteractionDefault,
|
|
101
102
|
androidSwitchThumbColor: undefined,
|
|
103
|
+
conversationActionsBackground: tokens.colorNeutral100White,
|
|
102
104
|
testColor: 'hotpink',
|
|
103
105
|
statusInfoIcon: tokens.iconColorStatusInfoPrimary,
|
|
104
106
|
statusInfoText: tokens.textColorStatusInfo,
|
|
@@ -141,6 +143,7 @@ const colorsChatDark: ChatColors = {
|
|
|
141
143
|
buttonEnd: undefined,
|
|
142
144
|
interaction: tokens.fillColorInteractionDefaultDark,
|
|
143
145
|
androidSwitchThumbColor: undefined,
|
|
146
|
+
conversationActionsBackground: tokens.colorNeutral7,
|
|
144
147
|
testColor: 'pink',
|
|
145
148
|
statusInfoIcon: tokens.iconColorStatusInfoPrimaryDark,
|
|
146
149
|
statusInfoText: tokens.textColorStatusInfoDark,
|
|
File without changes
|