tf-checkout-react-native 2.0.0-beta.5 → 2.0.0-beta.7

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.
@@ -59,6 +59,16 @@ const LoadedImage = ({
59
59
  return (
60
60
  <Image
61
61
  source={{ uri: image.data }}
62
+ accessible={full}
63
+ accessibilityLabel={
64
+ full
65
+ ? t('Image {{number}} of {{total}}', {
66
+ number: index + 1,
67
+ total: comment.images.length,
68
+ })
69
+ : undefined
70
+ }
71
+ accessibilityLiveRegion={full ? 'polite' : undefined}
62
72
  style={s.image}
63
73
  resizeMode={full ? 'contain' : 'cover'}
64
74
  />
@@ -72,12 +82,14 @@ export const CommentImages = ({
72
82
  previewKey,
73
83
  onPreviewChange,
74
84
  locale,
85
+ renderCloseIcon,
75
86
  }: {
76
87
  eventId: string
77
88
  comment: EventComment
78
89
  previewKey?: string
79
90
  onPreviewChange: (open: boolean) => void
80
91
  locale?: string
92
+ renderCloseIcon?: (color: string) => React.ReactNode
81
93
  }) => {
82
94
  const t = useAccountT(locale)
83
95
  const theme = useTheme()
@@ -140,19 +152,23 @@ export const CommentImages = ({
140
152
  >
141
153
  <View style={s.preview}>
142
154
  <View style={s.toolbar}>
143
- <Text accessibilityLiveRegion="polite" style={white}>
144
- {t('Image {{number}} of {{total}}', {
145
- number: position + 1,
146
- total: images.length,
147
- })}
148
- </Text>
149
155
  <Pressable
150
156
  accessibilityRole="button"
151
157
  accessibilityLabel={t('Close image')}
152
- style={s.navButton}
158
+ style={s.closeButton}
153
159
  onPress={() => setSelected(null)}
154
160
  >
155
- <Text style={white}>{t('Close')}</Text>
161
+ <View
162
+ pointerEvents="none"
163
+ accessible={false}
164
+ importantForAccessibility="no-hide-descendants"
165
+ >
166
+ {renderCloseIcon ? (
167
+ renderCloseIcon('#9F9CB0')
168
+ ) : (
169
+ <Text style={[white, s.closeGlyph]}>×</Text>
170
+ )}
171
+ </View>
156
172
  </Pressable>
157
173
  </View>
158
174
  <View style={s.full}>
@@ -306,11 +322,19 @@ const s = StyleSheet.create({
306
322
  preview: {
307
323
  flex: 1,
308
324
  backgroundColor: 'rgba(11,10,21,0.96)',
309
- paddingTop: 60,
325
+ paddingTop: 53,
310
326
  paddingBottom: 40,
311
327
  paddingHorizontal: 16,
312
328
  },
313
- toolbar: { flexDirection: 'row', justifyContent: 'space-between', padding: 12 },
329
+ toolbar: { flexDirection: 'row', justifyContent: 'flex-end' },
330
+ closeButton: {
331
+ width: 44,
332
+ height: 44,
333
+ marginRight: -10,
334
+ alignItems: 'center',
335
+ justifyContent: 'center',
336
+ },
337
+ closeGlyph: { fontSize: 28, lineHeight: 28, color: '#9F9CB0', textAlign: 'center' },
314
338
  full: { flex: 1, width: '100%' },
315
339
  white: { color: '#EBEBEE', fontSize: 16 },
316
340
  navButton: {
@@ -26,3 +26,15 @@ export * from './TicketGift'
26
26
 
27
27
  export { AccountRewardsSection } from './AccountRewards'
28
28
  export * from './PostReaction'
29
+ export {
30
+ Streaming,
31
+ StreamingView,
32
+ type StreamingProps,
33
+ type StreamingProvider,
34
+ } from './Streaming'
35
+
36
+ export {
37
+ AccountDeletion,
38
+ AccountDeletionView,
39
+ type AccountDeletionProps,
40
+ } from './AccountDeletion'