@helpwave/hightide-native 0.6.0 → 0.7.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.
Files changed (86) hide show
  1. package/package.json +3 -3
  2. package/src/components/card/Card.tsx +2 -4
  3. package/src/components/chat/ChatAttachmentMessageBubble.tsx +152 -90
  4. package/src/components/chat/ChatConversationList.tsx +4 -12
  5. package/src/components/chat/ChatConversationRow.tsx +159 -164
  6. package/src/components/chat/ChatDateDivider.tsx +3 -8
  7. package/src/components/chat/ChatMessageBubble.tsx +51 -45
  8. package/src/components/chat/ChatMessageComposer.tsx +4 -12
  9. package/src/components/chat/ChatMessageList.tsx +3 -9
  10. package/src/components/chat/ChatQuickReplyChip.tsx +41 -27
  11. package/src/components/chat/ChatSystemLine.tsx +4 -12
  12. package/src/components/chat/ChatThreadHeader.tsx +136 -101
  13. package/src/components/layout/Divider.tsx +2 -4
  14. package/src/components/list/ListActionItem.tsx +57 -65
  15. package/src/components/list/ListItem.tsx +8 -28
  16. package/src/components/list/ListItemTextContent.tsx +4 -2
  17. package/src/components/list/ListNavigationItem.tsx +55 -63
  18. package/src/components/user-interaction/Button.tsx +43 -49
  19. package/src/components/user-interaction/Checkbox.tsx +47 -48
  20. package/src/components/user-interaction/IconButton.tsx +40 -42
  21. package/src/components/user-interaction/Input.tsx +69 -80
  22. package/src/components/user-interaction/MultiSelect/MultiSelect.tsx +40 -0
  23. package/src/components/user-interaction/MultiSelect/MultiSelectContext.tsx +70 -0
  24. package/src/components/user-interaction/MultiSelect/MultiSelectMenu.tsx +87 -0
  25. package/src/components/user-interaction/MultiSelect/MultiSelectOption.tsx +87 -0
  26. package/src/components/user-interaction/MultiSelect/MultiSelectRoot.tsx +194 -0
  27. package/src/components/user-interaction/MultiSelect/MultiSelectTrigger.tsx +123 -0
  28. package/src/components/user-interaction/MultiSelect/index.ts +6 -0
  29. package/src/components/user-interaction/SearchBar.tsx +11 -17
  30. package/src/components/user-interaction/Select/Select.tsx +40 -0
  31. package/src/components/user-interaction/Select/SelectContext.tsx +69 -0
  32. package/src/components/user-interaction/Select/SelectMenu.tsx +87 -0
  33. package/src/components/user-interaction/Select/SelectOption.tsx +77 -0
  34. package/src/components/user-interaction/Select/SelectRoot.tsx +186 -0
  35. package/src/components/user-interaction/Select/SelectTrigger.tsx +92 -0
  36. package/src/components/user-interaction/Select/index.ts +6 -0
  37. package/src/components/user-interaction/Switch.tsx +46 -98
  38. package/src/components/user-interaction/Textarea.tsx +165 -12
  39. package/src/components/user-interaction/ThemedPressable.tsx +48 -49
  40. package/src/components/visualization-and-display/Avatar.tsx +19 -17
  41. package/src/components/visualization-and-display/Chip.tsx +4 -12
  42. package/src/components/visualization-and-display/ThemedText.tsx +12 -5
  43. package/src/enums/chatMessageDirection.ts +18 -0
  44. package/src/enums/chatMessageStatus.ts +18 -0
  45. package/src/enums/hightideThemeModes.ts +18 -0
  46. package/src/enums/index.ts +7 -0
  47. package/src/enums/listItemContentOrder.ts +18 -0
  48. package/src/enums/themedTextAppearance.ts +18 -0
  49. package/src/enums/useMultiSelectFirstHighlightBehavior.ts +18 -0
  50. package/src/enums/useSelectFirstHighlightBehavior.ts +18 -0
  51. package/src/global-contexts/content-theme/ContentThemeProvider.tsx +9 -5
  52. package/src/global-contexts/theme/ThemeProvider.tsx +4 -1
  53. package/src/hooks/index.ts +2 -0
  54. package/src/hooks/useAnimatedStyleTransition.ts +460 -0
  55. package/src/hooks/useMemoizedTheme.ts +23 -0
  56. package/src/hooks/useMultiSelect.ts +3 -1
  57. package/src/hooks/useSelect.ts +3 -1
  58. package/src/icons/HightideIconRegistry.ts +2 -0
  59. package/src/theme/adapters/style-adapter-utils.ts +121 -27
  60. package/src/theme/resolvers/avatar.ts +48 -39
  61. package/src/theme/resolvers/button.ts +7 -17
  62. package/src/theme/resolvers/chat/attachment-message-bubble.ts +5 -6
  63. package/src/theme/resolvers/chat/conversation-row.ts +4 -6
  64. package/src/theme/resolvers/chat/message-bubble.ts +1 -2
  65. package/src/theme/resolvers/chat/message-composer.ts +1 -2
  66. package/src/theme/resolvers/chat/quick-reply-chip.ts +2 -3
  67. package/src/theme/resolvers/chat/system-line.ts +1 -2
  68. package/src/theme/resolvers/chat/thread-header.ts +3 -4
  69. package/src/theme/resolvers/checkbox.ts +2 -2
  70. package/src/theme/resolvers/chip.ts +1 -2
  71. package/src/theme/resolvers/iconButton.ts +4 -13
  72. package/src/theme/resolvers/input.ts +30 -14
  73. package/src/theme/resolvers/listItem.ts +2 -3
  74. package/src/theme/resolvers/multiSelect.ts +1 -2
  75. package/src/theme/resolvers/searchBar.ts +1 -2
  76. package/src/theme/resolvers/select.ts +1 -2
  77. package/src/theme/resolvers/themedPressable.ts +4 -15
  78. package/src/theme/themes/hightideThemes.ts +3 -1
  79. package/src/theme/types/components/chat.ts +6 -21
  80. package/src/theme/types/components/input.ts +3 -0
  81. package/src/theme/types/components/textarea.ts +1 -0
  82. package/src/theme/types/resolver.ts +4 -27
  83. package/src/utils/index.ts +1 -0
  84. package/src/utils/pressableInteraction.ts +7 -0
  85. package/src/components/user-interaction/MultiSelect.tsx +0 -282
  86. package/src/components/user-interaction/Select.tsx +0 -242
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "access": "public"
11
11
  },
12
12
  "license": "AGPL-3.0-only",
13
- "version": "0.6.0",
13
+ "version": "0.7.0",
14
14
  "type": "module",
15
15
  "files": [
16
16
  "src"
@@ -47,8 +47,8 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "lucide-react-native": "0.561.0",
50
- "@helpwave/hightide-design": "0.6.0",
51
- "@helpwave/hightide-utils": "0.1.0"
50
+ "@helpwave/hightide-utils": "0.1.1",
51
+ "@helpwave/hightide-design": "0.7.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@react-native-async-storage/async-storage": ">=2.0.0",
@@ -10,6 +10,7 @@ import {
10
10
  } from 'react-native'
11
11
 
12
12
  import { useTheme } from '../../global-contexts/theme/ThemeContext'
13
+ import { useMemoizedTheme } from '../../hooks/useMemoizedTheme'
13
14
  import type { CardStyle } from '../../theme/types/components/card'
14
15
  import type { StyleOverwrite } from '../../theme/types/resolver'
15
16
 
@@ -28,10 +29,7 @@ export const Card = ({
28
29
  const { theme } = useTheme()
29
30
  const state = useMemo(() => ({}), [])
30
31
 
31
- const resolvedCardStyle = useMemo(
32
- () => theme.components.card.container(state, cardStyle),
33
- [theme, state, cardStyle]
34
- )
32
+ const resolvedCardStyle = useMemoizedTheme(theme.components.card.container, state, cardStyle)
35
33
 
36
34
  return (
37
35
  <View {...props} style={[resolvedCardStyle, style]}>
@@ -3,16 +3,20 @@ import {
3
3
  type ReactNode
4
4
  } from 'react'
5
5
  import {
6
+ Pressable,
7
+ StyleSheet,
6
8
  View,
7
9
  type StyleProp,
8
10
  type ViewStyle
9
11
  } from 'react-native'
10
- import { HightideIconRegistry } from '../../icons/HightideIconRegistry'
11
- import { ThemedIcon } from '../visualization-and-display/ThemedIcon'
12
- import { ThemedText } from '../visualization-and-display/ThemedText'
13
- import { ThemedPressable } from '../user-interaction/ThemedPressable'
14
12
  import { useTheme } from '../../global-contexts/theme/ThemeContext'
13
+ import { HightideIconRegistry } from '../../icons/HightideIconRegistry'
14
+ import {
15
+ useMemoizedTheme,
16
+ useMemoizedThemeFactory
17
+ } from '../../hooks/useMemoizedTheme'
15
18
  import type {
19
+ ChatAttachmentMessageBubbleFileIconStyle,
16
20
  ChatAttachmentMessageBubbleFileMetadataTextStyle,
17
21
  ChatAttachmentMessageBubbleFileNameTextStyle,
18
22
  ChatAttachmentMessageBubbleState,
@@ -24,9 +28,15 @@ import type {
24
28
  ChatMessageBubbleMetaDataTextStyle,
25
29
  ChatMessageBubbleState,
26
30
  PressableContainerStyle,
27
- PressableState
31
+ PressableIconStyle,
32
+ PressableState,
33
+ PressableStateLayerStyle,
34
+ PressableTextStyle
28
35
  } from '../../theme/types/components/chat'
29
- import type { StyleOverwrite } from '../../theme/types/resolver'
36
+ import type { StyleOverwrite, StyleResolverFunction } from '../../theme/types/resolver'
37
+ import type { PressableInteractionState } from '../../utils/pressableInteraction'
38
+ import { ThemedIcon } from '../visualization-and-display/ThemedIcon'
39
+ import { ThemedText } from '../visualization-and-display/ThemedText'
30
40
  import {
31
41
  ChatMessageBubble,
32
42
  type ChatMessageBubbleProps
@@ -39,7 +49,7 @@ export type ChatAttachmentMessageBubbleProps = Omit<ChatMessageBubbleProps, 'chi
39
49
  icon?: ReactNode,
40
50
  downloadLabel?: string,
41
51
  onDownload?: () => void,
42
- style: ChatMessageBubbleProps['style'],
52
+ style?: ChatMessageBubbleProps['style'],
43
53
  contentContainerStyle?: StyleOverwrite<
44
54
  PressableState,
45
55
  PressableContainerStyle
@@ -54,6 +64,20 @@ export type ChatAttachmentMessageBubbleProps = Omit<ChatMessageBubbleProps, 'chi
54
64
  >,
55
65
  }
56
66
 
67
+ type AttachmentContentPressableResolvers = {
68
+ container: StyleResolverFunction<PressableState, PressableContainerStyle>,
69
+ stateLayer: StyleResolverFunction<PressableState, PressableStateLayerStyle>,
70
+ text: StyleResolverFunction<PressableState, PressableTextStyle>,
71
+ icon: StyleResolverFunction<PressableState, PressableIconStyle>,
72
+ }
73
+
74
+ const toPressableThemeState = (interaction: PressableInteractionState): PressableState => ({
75
+ isPressed: interaction.pressed,
76
+ isHovered: !!interaction.hovered,
77
+ isFocused: !!interaction.focused,
78
+ isFocusVisible: !!interaction.focusVisible,
79
+ })
80
+
57
81
  const mergeBubbleStyleOverwrite = <TStyle extends StyleProp<ViewStyle> | object>(
58
82
  tokenOverride: TStyle,
59
83
  userOverwrite?: StyleOverwrite<ChatMessageBubbleState, TStyle>
@@ -79,6 +103,85 @@ const mergeBubbleStyleOverwrite = <TStyle extends StyleProp<ViewStyle> | object>
79
103
  }
80
104
  )
81
105
 
106
+ type AttachmentDownloadContentProps = {
107
+ pressableState: PressableInteractionState,
108
+ contentResolvers: AttachmentContentPressableResolvers,
109
+ contentContainerStyle?: StyleOverwrite<PressableState, PressableContainerStyle>,
110
+ name: ReactNode,
111
+ metadata?: ReactNode,
112
+ icon?: ReactNode,
113
+ resolvedFileIconContainerStyle: StyleProp<ViewStyle>,
114
+ resolvedFileIcon: ChatAttachmentMessageBubbleFileIconStyle,
115
+ resolvedDownloadIconContainerStyle: StyleProp<ViewStyle>,
116
+ resolvedDownloadIcon: ChatAttachmentMessageBubbleFileIconStyle,
117
+ resolvedFileNameTextStyle: StyleProp<ViewStyle>,
118
+ resolvedFileMetadataTextStyle: StyleProp<ViewStyle>,
119
+ spacingXs: number,
120
+ }
121
+
122
+ const AttachmentDownloadContent = ({
123
+ pressableState,
124
+ contentResolvers,
125
+ contentContainerStyle,
126
+ name,
127
+ metadata,
128
+ icon,
129
+ resolvedFileIconContainerStyle,
130
+ resolvedFileIcon,
131
+ resolvedDownloadIconContainerStyle,
132
+ resolvedDownloadIcon,
133
+ resolvedFileNameTextStyle,
134
+ resolvedFileMetadataTextStyle,
135
+ spacingXs,
136
+ }: AttachmentDownloadContentProps) => {
137
+ const pressableThemeState = useMemo(() => toPressableThemeState(pressableState),
138
+ [pressableState])
139
+
140
+ const resolvedContainerStyle = useMemoizedTheme(contentResolvers.container, pressableThemeState, contentContainerStyle)
141
+ const resolvedStateLayerStyle = useMemoizedTheme(contentResolvers.stateLayer, pressableThemeState)
142
+ const resolvedTextStyle = useMemoizedTheme(contentResolvers.text, pressableThemeState)
143
+
144
+ return (
145
+ <View style={resolvedContainerStyle}>
146
+ <View pointerEvents="none" style={resolvedStateLayerStyle} />
147
+ <View style={resolvedFileIconContainerStyle}>
148
+ {icon ?? (
149
+ <ThemedIcon
150
+ icon={HightideIconRegistry.FileText}
151
+ size={resolvedFileIcon.size}
152
+ strokeWidth={resolvedFileIcon.strokeWidth}
153
+ color={resolvedFileIcon.color}
154
+ />
155
+ )}
156
+ </View>
157
+ <View style={{ gap: spacingXs }}>
158
+ {typeof name === 'string' || typeof name === 'number' ? (
159
+ <ThemedText style={[resolvedFileNameTextStyle, resolvedTextStyle]} numberOfLines={1}>{name}</ThemedText>
160
+ ) : (
161
+ name
162
+ )}
163
+ {metadata != null && (
164
+ typeof metadata === 'string' || typeof metadata === 'number' ? (
165
+ <ThemedText appearance="description" style={[resolvedFileMetadataTextStyle, resolvedTextStyle]}>
166
+ {metadata}
167
+ </ThemedText>
168
+ ) : (
169
+ metadata
170
+ )
171
+ )}
172
+ </View>
173
+ <View style={resolvedDownloadIconContainerStyle}>
174
+ <ThemedIcon
175
+ icon={HightideIconRegistry.Download}
176
+ size={resolvedDownloadIcon.size}
177
+ strokeWidth={resolvedDownloadIcon.strokeWidth}
178
+ color={resolvedDownloadIcon.color}
179
+ />
180
+ </View>
181
+ </View>
182
+ )
183
+ }
184
+
82
185
  export const ChatAttachmentMessageBubble = ({
83
186
  children,
84
187
  name,
@@ -88,7 +191,7 @@ export const ChatAttachmentMessageBubble = ({
88
191
  downloadLabel = 'Download',
89
192
  onDownload,
90
193
  timestamp,
91
- readReceipt,
194
+ messageStatus,
92
195
  style,
93
196
  bodyStyle,
94
197
  bodyTextStyle,
@@ -104,74 +207,62 @@ export const ChatAttachmentMessageBubble = ({
104
207
  const state = useMemo(() => ({ direction }), [direction])
105
208
  const attachment = theme.components.chat.attachmentMessageBubble
106
209
  const bubbleOverrides = attachment.chatMessageBubbleOverrides
107
- const contentResolvers = useMemo(
108
- () => attachment.contentContainer(state),
109
- [attachment, state]
110
- )
210
+ const contentResolvers = useMemoizedThemeFactory<
211
+ ChatAttachmentMessageBubbleState,
212
+ AttachmentContentPressableResolvers
213
+ >(attachment.contentContainer, state)
111
214
 
112
- const resolvedFileIconContainerStyle = useMemo(
113
- () => attachment.fileIconContainer(state),
114
- [attachment, state]
115
- )
116
- const resolvedFileIcon = useMemo(
117
- () => attachment.fileIcon(state),
118
- [attachment, state]
119
- )
120
- const resolvedDownloadIconContainerStyle = useMemo(
121
- () => attachment.downloadIconContainer(state),
122
- [attachment, state]
123
- )
124
- const resolvedDownloadIcon = useMemo(
125
- () => attachment.downloadIcon(state),
126
- [attachment, state]
127
- )
128
- const resolvedFileNameTextStyle = useMemo(
129
- () => attachment.fileNameText(state, fileNameTextStyle),
130
- [attachment, state, fileNameTextStyle]
131
- )
132
- const resolvedFileMetadataTextStyle = useMemo(
133
- () => attachment.fileMetadataText(state, fileMetadataTextStyle),
134
- [attachment, state, fileMetadataTextStyle]
135
- )
215
+ const resolvedFileIconContainerStyle = useMemoizedTheme(attachment.fileIconContainer, state)
216
+ const resolvedFileIcon = useMemoizedTheme<
217
+ ChatAttachmentMessageBubbleState,
218
+ ChatAttachmentMessageBubbleFileIconStyle
219
+ >(attachment.fileIcon, state)
220
+ const resolvedDownloadIconContainerStyle = useMemoizedTheme(attachment.downloadIconContainer, state)
221
+ const resolvedDownloadIcon = useMemoizedTheme<
222
+ ChatAttachmentMessageBubbleState,
223
+ ChatAttachmentMessageBubbleFileIconStyle
224
+ >(attachment.downloadIcon, state)
225
+ const resolvedFileNameTextStyle = useMemoizedTheme(attachment.fileNameText, state, fileNameTextStyle)
226
+ const resolvedFileMetadataTextStyle = useMemoizedTheme(attachment.fileMetadataText, state, fileMetadataTextStyle)
136
227
 
137
228
  const resolvedContainerStyle = useMemo(
138
229
  () => mergeBubbleStyleOverwrite<ChatMessageBubbleContainerStyle>(
139
- bubbleOverrides.container(state),
230
+ StyleSheet.flatten(bubbleOverrides.container(state)) as ChatMessageBubbleContainerStyle,
140
231
  style
141
232
  ),
142
233
  [bubbleOverrides, state, style]
143
234
  )
144
235
  const resolvedBodyStyle = useMemo(
145
236
  () => mergeBubbleStyleOverwrite<ChatMessageBubbleBodyStyle>(
146
- bubbleOverrides.body(state),
237
+ StyleSheet.flatten(bubbleOverrides.body(state)) as ChatMessageBubbleBodyStyle,
147
238
  bodyStyle
148
239
  ),
149
240
  [bubbleOverrides, state, bodyStyle]
150
241
  )
151
242
  const resolvedBodyTextStyle = useMemo(
152
243
  () => mergeBubbleStyleOverwrite<ChatMessageBubbleBodyTextStyle>(
153
- bubbleOverrides.bodyText(state),
244
+ StyleSheet.flatten(bubbleOverrides.bodyText(state)) as ChatMessageBubbleBodyTextStyle,
154
245
  bodyTextStyle
155
246
  ),
156
247
  [bubbleOverrides, state, bodyTextStyle]
157
248
  )
158
249
  const resolvedMetaDataContainerStyle = useMemo(
159
250
  () => mergeBubbleStyleOverwrite<ChatMessageBubbleMetaDataContainerStyle>(
160
- bubbleOverrides.metaDataContainer(state),
251
+ StyleSheet.flatten(bubbleOverrides.metaDataContainer(state)) as ChatMessageBubbleMetaDataContainerStyle,
161
252
  metaDataContainerStyle
162
253
  ),
163
254
  [bubbleOverrides, state, metaDataContainerStyle]
164
255
  )
165
256
  const resolvedMetaDataStatusContainerStyle = useMemo(
166
257
  () => mergeBubbleStyleOverwrite<ChatMessageBubbleMetaDataStatusContainerStyle>(
167
- bubbleOverrides.metaDataStatusContainer(state),
258
+ StyleSheet.flatten(bubbleOverrides.metaDataStatusContainer(state)) as ChatMessageBubbleMetaDataStatusContainerStyle,
168
259
  metaDataStatusContainerStyle
169
260
  ),
170
261
  [bubbleOverrides, state, metaDataStatusContainerStyle]
171
262
  )
172
263
  const resolvedMetaDataTextStyle = useMemo(
173
264
  () => mergeBubbleStyleOverwrite<ChatMessageBubbleMetaDataTextStyle>(
174
- bubbleOverrides.metaDataText(state),
265
+ StyleSheet.flatten(bubbleOverrides.metaDataText(state)) as ChatMessageBubbleMetaDataTextStyle,
175
266
  metaDataTextStyle
176
267
  ),
177
268
  [bubbleOverrides, state, metaDataTextStyle]
@@ -182,7 +273,7 @@ export const ChatAttachmentMessageBubble = ({
182
273
  {...props}
183
274
  direction={direction}
184
275
  timestamp={timestamp}
185
- readReceipt={readReceipt}
276
+ messageStatus={messageStatus}
186
277
  style={resolvedContainerStyle}
187
278
  bodyStyle={resolvedBodyStyle}
188
279
  bodyTextStyle={resolvedBodyTextStyle}
@@ -191,58 +282,29 @@ export const ChatAttachmentMessageBubble = ({
191
282
  metaDataTextStyle={resolvedMetaDataTextStyle}
192
283
  >
193
284
  {children}
194
- <ThemedPressable
285
+ <Pressable
195
286
  accessibilityLabel={downloadLabel}
196
287
  disabled={onDownload == null}
197
288
  onPress={onDownload}
198
- style={(pressableState) => (
199
- contentResolvers.container(pressableState, contentContainerStyle)
200
- )}
201
- stateLayerStyle={(pressableState) => (
202
- contentResolvers.stateLayer(pressableState)
203
- )}
204
- textStyle={(pressableState) => (
205
- contentResolvers.text(pressableState)
206
- )}
207
- iconStyle={(pressableState) => (
208
- contentResolvers.icon(pressableState)
209
- )}
210
289
  >
211
- <View style={resolvedFileIconContainerStyle}>
212
- {icon ?? (
213
- <ThemedIcon
214
- icon={HightideIconRegistry.FileText}
215
- size={resolvedFileIcon.size}
216
- strokeWidth={resolvedFileIcon.strokeWidth}
217
- color={resolvedFileIcon.color}
218
- />
219
- )}
220
- </View>
221
- <View style={{ gap: theme.spacing.xs }}>
222
- {typeof name === 'string' || typeof name === 'number' ? (
223
- <ThemedText style={resolvedFileNameTextStyle} numberOfLines={1}>{name}</ThemedText>
224
- ) : (
225
- name
226
- )}
227
- {metadata != null && (
228
- typeof metadata === 'string' || typeof metadata === 'number' ? (
229
- <ThemedText appearance="description" style={resolvedFileMetadataTextStyle}>
230
- {metadata}
231
- </ThemedText>
232
- ) : (
233
- metadata
234
- )
235
- )}
236
- </View>
237
- <View style={resolvedDownloadIconContainerStyle}>
238
- <ThemedIcon
239
- icon={HightideIconRegistry.Download}
240
- size={resolvedDownloadIcon.size}
241
- strokeWidth={resolvedDownloadIcon.strokeWidth}
242
- color={resolvedDownloadIcon.color}
290
+ {(pressableState) => (
291
+ <AttachmentDownloadContent
292
+ pressableState={pressableState as PressableInteractionState}
293
+ contentResolvers={contentResolvers}
294
+ contentContainerStyle={contentContainerStyle}
295
+ name={name}
296
+ metadata={metadata}
297
+ icon={icon}
298
+ resolvedFileIconContainerStyle={resolvedFileIconContainerStyle}
299
+ resolvedFileIcon={resolvedFileIcon}
300
+ resolvedDownloadIconContainerStyle={resolvedDownloadIconContainerStyle}
301
+ resolvedDownloadIcon={resolvedDownloadIcon}
302
+ resolvedFileNameTextStyle={resolvedFileNameTextStyle}
303
+ resolvedFileMetadataTextStyle={resolvedFileMetadataTextStyle}
304
+ spacingXs={theme.spacing.xs}
243
305
  />
244
- </View>
245
- </ThemedPressable>
306
+ )}
307
+ </Pressable>
246
308
  </ChatMessageBubble>
247
309
  )
248
310
  }
@@ -11,6 +11,7 @@ import {
11
11
  } from 'react-native'
12
12
 
13
13
  import { useTheme } from '../../global-contexts/theme/ThemeContext'
14
+ import { useMemoizedTheme } from '../../hooks/useMemoizedTheme'
14
15
  import type {
15
16
  ChatConversationListFooterStyle,
16
17
  ChatConversationListHeaderStyle,
@@ -43,18 +44,9 @@ export const ChatConversationList = ({
43
44
  const { theme } = useTheme()
44
45
  const state = useMemo(() => ({}), [])
45
46
 
46
- const resolvedListStyle = useMemo(
47
- () => theme.components.chat.conversationList.container(state, listStyle),
48
- [theme, state, listStyle]
49
- )
50
- const resolvedHeaderStyle = useMemo(
51
- () => theme.components.chat.conversationList.header(state, headerStyle),
52
- [theme, state, headerStyle]
53
- )
54
- const resolvedFooterStyle = useMemo(
55
- () => theme.components.chat.conversationList.footer(state, footerStyle),
56
- [theme, state, footerStyle]
57
- )
47
+ const resolvedListStyle = useMemoizedTheme(theme.components.chat.conversationList.container, state, listStyle)
48
+ const resolvedHeaderStyle = useMemoizedTheme(theme.components.chat.conversationList.header, state, headerStyle)
49
+ const resolvedFooterStyle = useMemoizedTheme(theme.components.chat.conversationList.footer, state, footerStyle)
58
50
 
59
51
  return (
60
52
  <View {...props} style={[resolvedListStyle, style]}>