@sendbird/uikit-react-native-foundation 2.3.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/lib/commonjs/components/Box/index.js +46 -0
  2. package/lib/commonjs/components/Box/index.js.map +1 -0
  3. package/lib/commonjs/components/ImageWithPlaceholder/index.js +92 -0
  4. package/lib/commonjs/components/ImageWithPlaceholder/index.js.map +1 -0
  5. package/lib/commonjs/components/PressBox/index.js +60 -0
  6. package/lib/commonjs/components/PressBox/index.js.map +1 -0
  7. package/lib/commonjs/index.js +39 -5
  8. package/lib/commonjs/index.js.map +1 -1
  9. package/lib/commonjs/theme/DarkUIKitTheme.js +220 -179
  10. package/lib/commonjs/theme/DarkUIKitTheme.js.map +1 -1
  11. package/lib/commonjs/theme/LightUIKitTheme.js +220 -179
  12. package/lib/commonjs/theme/LightUIKitTheme.js.map +1 -1
  13. package/lib/commonjs/types.js.map +1 -1
  14. package/lib/commonjs/ui/Header/index.js +4 -2
  15. package/lib/commonjs/ui/Header/index.js.map +1 -1
  16. package/lib/commonjs/ui/OpenChannelMessage/Message.admin.js +40 -0
  17. package/lib/commonjs/ui/OpenChannelMessage/Message.admin.js.map +1 -0
  18. package/lib/commonjs/ui/OpenChannelMessage/Message.file.image.js +57 -0
  19. package/lib/commonjs/ui/OpenChannelMessage/Message.file.image.js.map +1 -0
  20. package/lib/commonjs/ui/OpenChannelMessage/Message.file.js +90 -0
  21. package/lib/commonjs/ui/OpenChannelMessage/Message.file.js.map +1 -0
  22. package/lib/commonjs/ui/OpenChannelMessage/Message.file.video.js +134 -0
  23. package/lib/commonjs/ui/OpenChannelMessage/Message.file.video.js.map +1 -0
  24. package/lib/commonjs/ui/OpenChannelMessage/Message.unknown.js +55 -0
  25. package/lib/commonjs/ui/OpenChannelMessage/Message.unknown.js.map +1 -0
  26. package/lib/commonjs/ui/OpenChannelMessage/Message.user.js +83 -0
  27. package/lib/commonjs/ui/OpenChannelMessage/Message.user.js.map +1 -0
  28. package/lib/commonjs/ui/OpenChannelMessage/Message.user.og.js +140 -0
  29. package/lib/commonjs/ui/OpenChannelMessage/Message.user.og.js.map +1 -0
  30. package/lib/commonjs/ui/OpenChannelMessage/MessageContainer.js +136 -0
  31. package/lib/commonjs/ui/OpenChannelMessage/MessageContainer.js.map +1 -0
  32. package/lib/commonjs/ui/OpenChannelMessage/index.js +35 -0
  33. package/lib/commonjs/ui/OpenChannelMessage/index.js.map +1 -0
  34. package/lib/commonjs/ui/OpenChannelPreview/index.js +134 -0
  35. package/lib/commonjs/ui/OpenChannelPreview/index.js.map +1 -0
  36. package/lib/module/components/Box/index.js +33 -0
  37. package/lib/module/components/Box/index.js.map +1 -0
  38. package/lib/module/components/ImageWithPlaceholder/index.js +71 -0
  39. package/lib/module/components/ImageWithPlaceholder/index.js.map +1 -0
  40. package/lib/module/components/PressBox/index.js +45 -0
  41. package/lib/module/components/PressBox/index.js.map +1 -0
  42. package/lib/module/index.js +6 -1
  43. package/lib/module/index.js.map +1 -1
  44. package/lib/module/theme/DarkUIKitTheme.js +220 -179
  45. package/lib/module/theme/DarkUIKitTheme.js.map +1 -1
  46. package/lib/module/theme/LightUIKitTheme.js +220 -179
  47. package/lib/module/theme/LightUIKitTheme.js.map +1 -1
  48. package/lib/module/types.js.map +1 -1
  49. package/lib/module/ui/Header/index.js +4 -2
  50. package/lib/module/ui/Header/index.js.map +1 -1
  51. package/lib/module/ui/OpenChannelMessage/Message.admin.js +27 -0
  52. package/lib/module/ui/OpenChannelMessage/Message.admin.js.map +1 -0
  53. package/lib/module/ui/OpenChannelMessage/Message.file.image.js +41 -0
  54. package/lib/module/ui/OpenChannelMessage/Message.file.image.js.map +1 -0
  55. package/lib/module/ui/OpenChannelMessage/Message.file.js +71 -0
  56. package/lib/module/ui/OpenChannelMessage/Message.file.js.map +1 -0
  57. package/lib/module/ui/OpenChannelMessage/Message.file.video.js +112 -0
  58. package/lib/module/ui/OpenChannelMessage/Message.file.video.js.map +1 -0
  59. package/lib/module/ui/OpenChannelMessage/Message.unknown.js +41 -0
  60. package/lib/module/ui/OpenChannelMessage/Message.unknown.js.map +1 -0
  61. package/lib/module/ui/OpenChannelMessage/Message.user.js +67 -0
  62. package/lib/module/ui/OpenChannelMessage/Message.user.js.map +1 -0
  63. package/lib/module/ui/OpenChannelMessage/Message.user.og.js +121 -0
  64. package/lib/module/ui/OpenChannelMessage/Message.user.og.js.map +1 -0
  65. package/lib/module/ui/OpenChannelMessage/MessageContainer.js +116 -0
  66. package/lib/module/ui/OpenChannelMessage/MessageContainer.js.map +1 -0
  67. package/lib/module/ui/OpenChannelMessage/index.js +18 -0
  68. package/lib/module/ui/OpenChannelMessage/index.js.map +1 -0
  69. package/lib/module/ui/OpenChannelPreview/index.js +117 -0
  70. package/lib/module/ui/OpenChannelPreview/index.js.map +1 -0
  71. package/lib/typescript/src/components/Box/index.d.ts +11 -0
  72. package/lib/typescript/src/components/ImageWithPlaceholder/index.d.ts +11 -0
  73. package/lib/typescript/src/components/PressBox/index.d.ts +16 -0
  74. package/lib/typescript/src/index.d.ts +8 -1
  75. package/lib/typescript/src/types.d.ts +21 -5
  76. package/lib/typescript/src/ui/Header/index.d.ts +1 -0
  77. package/lib/typescript/src/ui/OpenChannelMessage/Message.admin.d.ts +4 -0
  78. package/lib/typescript/src/ui/OpenChannelMessage/Message.file.d.ts +5 -0
  79. package/lib/typescript/src/ui/OpenChannelMessage/Message.file.image.d.ts +4 -0
  80. package/lib/typescript/src/ui/OpenChannelMessage/Message.file.video.d.ts +9 -0
  81. package/lib/typescript/src/ui/OpenChannelMessage/Message.unknown.d.ts +4 -0
  82. package/lib/typescript/src/ui/OpenChannelMessage/Message.user.d.ts +5 -0
  83. package/lib/typescript/src/ui/OpenChannelMessage/Message.user.og.d.ts +5 -0
  84. package/lib/typescript/src/ui/OpenChannelMessage/MessageContainer.d.ts +7 -0
  85. package/lib/typescript/src/ui/OpenChannelMessage/index.d.ts +136 -0
  86. package/lib/typescript/src/ui/OpenChannelPreview/index.d.ts +10 -0
  87. package/package.json +4 -4
  88. package/src/components/Box/index.tsx +65 -0
  89. package/src/components/ImageWithPlaceholder/index.tsx +83 -0
  90. package/src/components/PressBox/index.tsx +53 -0
  91. package/src/index.ts +8 -1
  92. package/src/theme/DarkUIKitTheme.ts +213 -171
  93. package/src/theme/LightUIKitTheme.ts +213 -171
  94. package/src/types.ts +41 -6
  95. package/src/ui/Header/index.tsx +7 -2
  96. package/src/ui/OpenChannelMessage/Message.admin.tsx +24 -0
  97. package/src/ui/OpenChannelMessage/Message.file.image.tsx +34 -0
  98. package/src/ui/OpenChannelMessage/Message.file.tsx +67 -0
  99. package/src/ui/OpenChannelMessage/Message.file.video.tsx +93 -0
  100. package/src/ui/OpenChannelMessage/Message.unknown.tsx +31 -0
  101. package/src/ui/OpenChannelMessage/Message.user.og.tsx +120 -0
  102. package/src/ui/OpenChannelMessage/Message.user.tsx +61 -0
  103. package/src/ui/OpenChannelMessage/MessageContainer.tsx +121 -0
  104. package/src/ui/OpenChannelMessage/index.ts +42 -0
  105. package/src/ui/OpenChannelPreview/index.tsx +97 -0
@@ -2,207 +2,249 @@ import createTheme from './createTheme';
2
2
 
3
3
  const LightUIKitTheme = createTheme({
4
4
  colorScheme: 'light',
5
- colors: (palette) => ({
6
- primary: palette.primary300,
7
- secondary: palette.secondary300,
8
- error: palette.error300,
9
- background: palette.background50,
10
- text: palette.onBackgroundLight01,
11
- onBackground01: palette.onBackgroundLight01,
12
- onBackground02: palette.onBackgroundLight02,
13
- onBackground03: palette.onBackgroundLight03,
14
- onBackground04: palette.onBackgroundLight04,
15
- onBackgroundReverse01: palette.onBackgroundDark01,
16
- onBackgroundReverse02: palette.onBackgroundDark02,
17
- onBackgroundReverse03: palette.onBackgroundDark03,
18
- onBackgroundReverse04: palette.onBackgroundDark04,
19
- ui: {
20
- header: {
21
- nav: {
22
- none: {
23
- background: palette.background50,
24
- borderBottom: palette.onBackgroundLight04,
25
- },
5
+ colors: (palette) => {
6
+ const groupChannelMessage = {
7
+ incoming: {
8
+ enabled: {
9
+ textMsg: palette.onBackgroundLight01,
10
+ textEdited: palette.onBackgroundLight02,
11
+ textTime: palette.onBackgroundLight03,
12
+ textSenderName: palette.onBackgroundLight02,
13
+ background: palette.background100,
14
+ },
15
+ pressed: {
16
+ textMsg: palette.onBackgroundLight01,
17
+ textEdited: palette.onBackgroundLight02,
18
+ textTime: palette.onBackgroundLight03,
19
+ textSenderName: palette.onBackgroundLight02,
20
+ background: palette.primary100,
26
21
  },
27
22
  },
28
- button: {
29
- contained: {
30
- enabled: {
31
- background: palette.primary300,
32
- content: palette.onBackgroundDark01,
33
- },
34
- pressed: {
35
- background: palette.primary400,
36
- content: palette.onBackgroundDark01,
37
- },
38
- disabled: {
39
- background: palette.background100,
40
- content: palette.onBackgroundLight04,
41
- },
23
+ outgoing: {
24
+ enabled: {
25
+ textMsg: palette.onBackgroundDark01,
26
+ textEdited: palette.onBackgroundDark02,
27
+ textTime: palette.onBackgroundLight03,
28
+ textSenderName: palette.transparent,
29
+ background: palette.primary300,
42
30
  },
43
- text: {
44
- enabled: {
45
- background: palette.transparent,
46
- content: palette.primary300,
47
- },
48
- pressed: {
49
- background: palette.transparent,
50
- content: palette.primary300,
51
- },
52
- disabled: {
53
- background: palette.transparent,
54
- content: palette.onBackgroundLight04,
55
- },
31
+ pressed: {
32
+ textMsg: palette.onBackgroundDark01,
33
+ textEdited: palette.onBackgroundDark02,
34
+ textTime: palette.onBackgroundLight03,
35
+ textSenderName: palette.transparent,
36
+ background: palette.primary400,
56
37
  },
57
38
  },
58
- dialog: {
59
- default: {
60
- none: {
61
- background: palette.background50,
62
- text: palette.onBackgroundLight01,
63
- message: palette.onBackgroundLight02,
64
- highlight: palette.primary300,
65
- destructive: palette.error300,
39
+ };
40
+
41
+ return {
42
+ primary: palette.primary300,
43
+ secondary: palette.secondary300,
44
+ error: palette.error300,
45
+ background: palette.background50,
46
+ text: palette.onBackgroundLight01,
47
+ onBackground01: palette.onBackgroundLight01,
48
+ onBackground02: palette.onBackgroundLight02,
49
+ onBackground03: palette.onBackgroundLight03,
50
+ onBackground04: palette.onBackgroundLight04,
51
+ onBackgroundReverse01: palette.onBackgroundDark01,
52
+ onBackgroundReverse02: palette.onBackgroundDark02,
53
+ onBackgroundReverse03: palette.onBackgroundDark03,
54
+ onBackgroundReverse04: palette.onBackgroundDark04,
55
+ ui: {
56
+ header: {
57
+ nav: {
58
+ none: {
59
+ background: palette.background50,
60
+ borderBottom: palette.onBackgroundLight04,
61
+ },
66
62
  },
67
63
  },
68
- },
69
- input: {
70
- default: {
71
- active: {
72
- text: palette.onBackgroundLight01,
73
- placeholder: palette.onBackgroundLight03,
74
- background: palette.background100,
75
- highlight: palette.primary300,
76
- },
77
- disabled: {
78
- text: palette.onBackgroundLight04,
79
- placeholder: palette.onBackgroundLight04,
80
- background: palette.background100,
81
- highlight: palette.onBackgroundLight04,
64
+ button: {
65
+ contained: {
66
+ enabled: {
67
+ background: palette.primary300,
68
+ content: palette.onBackgroundDark01,
69
+ },
70
+ pressed: {
71
+ background: palette.primary400,
72
+ content: palette.onBackgroundDark01,
73
+ },
74
+ disabled: {
75
+ background: palette.background100,
76
+ content: palette.onBackgroundLight04,
77
+ },
78
+ },
79
+ text: {
80
+ enabled: {
81
+ background: palette.transparent,
82
+ content: palette.primary300,
83
+ },
84
+ pressed: {
85
+ background: palette.transparent,
86
+ content: palette.primary300,
87
+ },
88
+ disabled: {
89
+ background: palette.transparent,
90
+ content: palette.onBackgroundLight04,
91
+ },
82
92
  },
83
93
  },
84
- underline: {
85
- active: {
86
- text: palette.onBackgroundLight01,
87
- placeholder: palette.onBackgroundLight03,
88
- background: palette.transparent,
89
- highlight: palette.primary300,
90
- },
91
- disabled: {
92
- text: palette.onBackgroundLight04,
93
- placeholder: palette.onBackgroundLight04,
94
- background: palette.transparent,
95
- highlight: palette.onBackgroundLight04,
94
+ dialog: {
95
+ default: {
96
+ none: {
97
+ background: palette.background50,
98
+ text: palette.onBackgroundLight01,
99
+ message: palette.onBackgroundLight02,
100
+ highlight: palette.primary300,
101
+ destructive: palette.error300,
102
+ },
96
103
  },
97
104
  },
98
- },
99
- badge: {
100
- default: {
101
- none: {
102
- text: palette.background50,
103
- background: palette.primary300,
105
+ input: {
106
+ default: {
107
+ active: {
108
+ text: palette.onBackgroundLight01,
109
+ placeholder: palette.onBackgroundLight03,
110
+ background: palette.background100,
111
+ highlight: palette.primary300,
112
+ },
113
+ disabled: {
114
+ text: palette.onBackgroundLight04,
115
+ placeholder: palette.onBackgroundLight04,
116
+ background: palette.background100,
117
+ highlight: palette.onBackgroundLight04,
118
+ },
119
+ },
120
+ underline: {
121
+ active: {
122
+ text: palette.onBackgroundLight01,
123
+ placeholder: palette.onBackgroundLight03,
124
+ background: palette.transparent,
125
+ highlight: palette.primary300,
126
+ },
127
+ disabled: {
128
+ text: palette.onBackgroundLight04,
129
+ placeholder: palette.onBackgroundLight04,
130
+ background: palette.transparent,
131
+ highlight: palette.onBackgroundLight04,
132
+ },
104
133
  },
105
134
  },
106
- },
107
- placeholder: {
108
- default: {
109
- none: {
110
- content: palette.onBackgroundLight03,
111
- highlight: palette.primary300,
135
+ badge: {
136
+ default: {
137
+ none: {
138
+ text: palette.background50,
139
+ background: palette.primary300,
140
+ },
112
141
  },
113
142
  },
114
- },
115
- message: {
116
- incoming: {
117
- enabled: {
118
- textMsg: palette.onBackgroundLight01,
119
- textEdited: palette.onBackgroundLight02,
120
- textTime: palette.onBackgroundLight03,
121
- textSenderName: palette.onBackgroundLight02,
122
- background: palette.background100,
123
- },
124
- pressed: {
125
- textMsg: palette.onBackgroundLight01,
126
- textEdited: palette.onBackgroundLight02,
127
- textTime: palette.onBackgroundLight03,
128
- textSenderName: palette.onBackgroundLight02,
129
- background: palette.primary100,
143
+ placeholder: {
144
+ default: {
145
+ none: {
146
+ content: palette.onBackgroundLight03,
147
+ highlight: palette.primary300,
148
+ },
130
149
  },
131
150
  },
132
- outgoing: {
133
- enabled: {
134
- textMsg: palette.onBackgroundDark01,
135
- textEdited: palette.onBackgroundDark02,
136
- textTime: palette.onBackgroundLight03,
137
- textSenderName: palette.transparent,
138
- background: palette.primary300,
139
- },
140
- pressed: {
141
- textMsg: palette.onBackgroundDark01,
142
- textEdited: palette.onBackgroundDark02,
143
- textTime: palette.onBackgroundLight03,
144
- textSenderName: palette.transparent,
145
- background: palette.primary400,
151
+ message: groupChannelMessage,
152
+ dateSeparator: {
153
+ default: {
154
+ none: {
155
+ text: palette.onBackgroundDark01,
156
+ background: palette.overlay02,
157
+ },
146
158
  },
147
159
  },
148
- },
149
- dateSeparator: {
150
- default: {
151
- none: {
152
- text: palette.onBackgroundDark01,
153
- background: palette.overlay02,
160
+ groupChannelMessage,
161
+ groupChannelPreview: {
162
+ default: {
163
+ none: {
164
+ textTitle: palette.onBackgroundLight01,
165
+ textTitleCaption: palette.onBackgroundLight03,
166
+ textBody: palette.onBackgroundLight03,
167
+ bodyIcon: palette.onBackgroundLight02,
168
+ memberCount: palette.onBackgroundLight02,
169
+ background: palette.background50,
170
+ coverBackground: palette.onBackgroundLight04,
171
+ bodyIconBackground: palette.background100,
172
+ separator: palette.onBackgroundLight04,
173
+ },
154
174
  },
155
175
  },
156
- },
157
- groupChannelPreview: {
158
- default: {
159
- none: {
160
- textTitle: palette.onBackgroundLight01,
161
- textTitleCaption: palette.onBackgroundLight03,
162
- textBody: palette.onBackgroundLight03,
163
- bodyIcon: palette.onBackgroundLight02,
164
- memberCount: palette.onBackgroundLight02,
165
- background: palette.background50,
166
- coverBackground: palette.onBackgroundLight04,
167
- bodyIconBackground: palette.background100,
168
- separator: palette.onBackgroundLight04,
176
+ profileCard: {
177
+ default: {
178
+ none: {
179
+ textUsername: palette.onBackgroundLight01,
180
+ textBodyLabel: palette.onBackgroundLight02,
181
+ textBody: palette.onBackgroundLight01,
182
+ background: palette.background50,
183
+ },
169
184
  },
170
185
  },
171
- },
172
- profileCard: {
173
- default: {
174
- none: {
175
- textUsername: palette.onBackgroundLight01,
176
- textBodyLabel: palette.onBackgroundLight02,
177
- textBody: palette.onBackgroundLight01,
178
- background: palette.background50,
186
+ reaction: {
187
+ default: {
188
+ enabled: {
189
+ background: palette.transparent,
190
+ highlight: palette.onBackgroundLight03,
191
+ },
192
+ selected: {
193
+ background: palette.primary100,
194
+ highlight: palette.primary300,
195
+ },
196
+ },
197
+ rounded: {
198
+ enabled: {
199
+ background: palette.background100,
200
+ highlight: palette.transparent,
201
+ },
202
+ selected: {
203
+ background: palette.primary100,
204
+ highlight: palette.transparent,
205
+ },
179
206
  },
180
207
  },
181
- },
182
- reaction: {
183
- default: {
184
- enabled: {
185
- background: palette.transparent,
186
- highlight: palette.onBackgroundLight03,
187
- },
188
- selected: {
189
- background: palette.primary100,
190
- highlight: palette.primary300,
208
+ openChannelMessage: {
209
+ default: {
210
+ enabled: {
211
+ background: palette.transparent,
212
+ bubbleBackground: palette.background100,
213
+ adminBackground: palette.background100,
214
+ textMsg: palette.onBackgroundLight01,
215
+ textMsgPostfix: palette.onBackgroundLight02,
216
+ textSenderName: palette.onBackgroundLight02,
217
+ textTime: palette.onBackgroundLight03,
218
+ textOperator: palette.secondary300,
219
+ },
220
+ pressed: {
221
+ background: palette.background100,
222
+ bubbleBackground: palette.background300,
223
+ adminBackground: palette.background100,
224
+ textMsg: palette.onBackgroundLight01,
225
+ textMsgPostfix: palette.onBackgroundLight02,
226
+ textSenderName: palette.onBackgroundLight02,
227
+ textTime: palette.onBackgroundLight03,
228
+ textOperator: palette.secondary300,
229
+ },
191
230
  },
192
231
  },
193
- rounded: {
194
- enabled: {
195
- background: palette.background100,
196
- highlight: palette.transparent,
197
- },
198
- selected: {
199
- background: palette.primary100,
200
- highlight: palette.transparent,
232
+ openChannelPreview: {
233
+ default: {
234
+ none: {
235
+ textTitle: palette.onBackgroundLight01,
236
+ textParticipants: palette.onBackgroundLight02,
237
+ frozenIcon: palette.primary300,
238
+ participantsIcon: palette.onBackgroundLight02,
239
+ background: palette.background50,
240
+ coverBackground: palette.background300,
241
+ separator: palette.onBackgroundLight04,
242
+ },
201
243
  },
202
244
  },
203
245
  },
204
- },
205
- }),
246
+ };
247
+ },
206
248
  });
207
249
 
208
250
  export default LightUIKitTheme;
package/src/types.ts CHANGED
@@ -37,11 +37,14 @@ export type Component =
37
37
  | 'Input'
38
38
  | 'Badge'
39
39
  | 'Placeholder'
40
- | 'Message'
41
40
  | 'DateSeparator'
41
+ | 'GroupChannelMessage'
42
42
  | 'GroupChannelPreview'
43
43
  | 'ProfileCard'
44
- | 'Reaction';
44
+ | 'Reaction'
45
+ | 'OpenChannelMessage'
46
+ | 'OpenChannelPreview'
47
+ | 'Message';
45
48
 
46
49
  export type GetColorTree<
47
50
  Tree extends {
@@ -65,11 +68,15 @@ export type ComponentColorTree = GetColorTree<{
65
68
  Input: 'default' | 'underline';
66
69
  Badge: 'default';
67
70
  Placeholder: 'default';
68
- Message: 'incoming' | 'outgoing';
69
71
  DateSeparator: 'default';
72
+ GroupChannelMessage: 'incoming' | 'outgoing';
70
73
  GroupChannelPreview: 'default';
71
74
  ProfileCard: 'default';
72
75
  Reaction: 'default' | 'rounded';
76
+ OpenChannelMessage: 'default';
77
+ OpenChannelPreview: 'default';
78
+ /** @deprecated **/
79
+ Message: 'incoming' | 'outgoing';
73
80
  };
74
81
  State: {
75
82
  Header: 'none';
@@ -78,11 +85,15 @@ export type ComponentColorTree = GetColorTree<{
78
85
  Input: 'active' | 'disabled';
79
86
  Badge: 'none';
80
87
  Placeholder: 'none';
81
- Message: 'enabled' | 'pressed';
82
88
  DateSeparator: 'none';
89
+ GroupChannelMessage: 'enabled' | 'pressed';
83
90
  GroupChannelPreview: 'none';
84
91
  ProfileCard: 'none';
85
92
  Reaction: 'enabled' | 'selected';
93
+ OpenChannelMessage: 'enabled' | 'pressed';
94
+ OpenChannelPreview: 'none';
95
+ /** @deprecated **/
96
+ Message: 'enabled' | 'pressed';
86
97
  };
87
98
  ColorPart: {
88
99
  Header: 'background' | 'borderBottom';
@@ -91,8 +102,8 @@ export type ComponentColorTree = GetColorTree<{
91
102
  Input: 'text' | 'placeholder' | 'background' | 'highlight';
92
103
  Badge: 'text' | 'background';
93
104
  Placeholder: 'content' | 'highlight';
94
- Message: 'textMsg' | 'textEdited' | 'textSenderName' | 'textTime' | 'background';
95
105
  DateSeparator: 'text' | 'background';
106
+ GroupChannelMessage: 'textMsg' | 'textEdited' | 'textSenderName' | 'textTime' | 'background';
96
107
  GroupChannelPreview:
97
108
  | 'textTitle'
98
109
  | 'textTitleCaption'
@@ -105,6 +116,26 @@ export type ComponentColorTree = GetColorTree<{
105
116
  | 'separator';
106
117
  ProfileCard: 'textUsername' | 'textBodyLabel' | 'textBody' | 'background';
107
118
  Reaction: 'background' | 'highlight';
119
+ OpenChannelMessage:
120
+ | 'textMsg'
121
+ | 'textMsgPostfix'
122
+ | 'textSenderName'
123
+ | 'textTime'
124
+ | 'textOperator'
125
+ | 'background'
126
+ | 'bubbleBackground'
127
+ | 'adminBackground';
128
+ OpenChannelPreview:
129
+ | 'textTitle'
130
+ | 'textParticipants'
131
+ | 'frozenIcon'
132
+ | 'participantsIcon'
133
+ | 'background'
134
+ | 'coverBackground'
135
+ | 'separator';
136
+
137
+ /** @deprecated **/
138
+ Message: 'textMsg' | 'textEdited' | 'textSenderName' | 'textTime' | 'background';
108
139
  };
109
140
  }>;
110
141
  export type ComponentColors<T extends Component> = {
@@ -145,11 +176,15 @@ export interface UIKitColors {
145
176
  input: ComponentColors<'Input'>;
146
177
  badge: ComponentColors<'Badge'>;
147
178
  placeholder: ComponentColors<'Placeholder'>;
148
- message: ComponentColors<'Message'>;
149
179
  dateSeparator: ComponentColors<'DateSeparator'>;
180
+ groupChannelMessage: ComponentColors<'GroupChannelMessage'>;
150
181
  groupChannelPreview: ComponentColors<'GroupChannelPreview'>;
151
182
  profileCard: ComponentColors<'ProfileCard'>;
152
183
  reaction: ComponentColors<'Reaction'>;
184
+ openChannelMessage: ComponentColors<'OpenChannelMessage'>;
185
+ openChannelPreview: ComponentColors<'OpenChannelPreview'>;
186
+ /** @deprecated Please use `colors.ui.groupChannelMessage` **/
187
+ message: ComponentColors<'Message'>;
153
188
  };
154
189
  }
155
190
 
@@ -21,6 +21,7 @@ export type HeaderProps = BaseHeaderProps<
21
21
  },
22
22
  {
23
23
  clearTitleMargin?: boolean;
24
+ clearStatusBarTopInset?: boolean;
24
25
  statusBarTopInsetAs?: 'padding' | 'margin';
25
26
  }
26
27
  >;
@@ -39,6 +40,7 @@ const Header: ((props: HeaderProps) => JSX.Element) & {
39
40
  onPressLeft,
40
41
  onPressRight,
41
42
  clearTitleMargin = false,
43
+ clearStatusBarTopInset = false,
42
44
  statusBarTopInsetAs = 'padding',
43
45
  }) => {
44
46
  const { topInset, defaultTitleAlign, defaultHeight } = useHeaderStyle();
@@ -47,10 +49,13 @@ const Header: ((props: HeaderProps) => JSX.Element) & {
47
49
  const { left: paddingLeft, right: paddingRight } = useSafeAreaInsets();
48
50
 
49
51
  const actualTitleAlign = titleAlign ?? defaultTitleAlign;
52
+ const actualTopInset = clearStatusBarTopInset ? 0 : topInset;
50
53
 
51
54
  if (!title && !left && !right) {
52
55
  return (
53
- <View style={{ paddingTop: topInset, backgroundColor: colors.ui.header.nav.none.background }}>{children}</View>
56
+ <View style={{ paddingTop: actualTopInset, backgroundColor: colors.ui.header.nav.none.background }}>
57
+ {children}
58
+ </View>
54
59
  );
55
60
  }
56
61
 
@@ -59,7 +64,7 @@ const Header: ((props: HeaderProps) => JSX.Element) & {
59
64
  style={[
60
65
  styles.container,
61
66
  {
62
- [statusBarTopInsetAs === 'padding' ? 'paddingTop' : 'marginTop']: topInset,
67
+ [statusBarTopInsetAs === 'padding' ? 'paddingTop' : 'marginTop']: actualTopInset,
63
68
  paddingLeft: paddingLeft + styles.container.paddingHorizontal,
64
69
  paddingRight: paddingRight + styles.container.paddingHorizontal,
65
70
  backgroundColor: colors.ui.header.nav.none.background,
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+
3
+ import type { SendbirdAdminMessage } from '@sendbird/uikit-utils';
4
+
5
+ import Box from '../../components/Box';
6
+ import Text from '../../components/Text';
7
+ import useUIKitTheme from '../../theme/useUIKitTheme';
8
+ import type { OpenChannelMessageProps } from './index';
9
+
10
+ const AdminMessage = (props: OpenChannelMessageProps<SendbirdAdminMessage>) => {
11
+ const { colors } = useUIKitTheme();
12
+ const color = colors.ui.openChannelMessage.default;
13
+ return (
14
+ <Box marginVertical={8} paddingHorizontal={12} backgroundColor={colors.background}>
15
+ <Box borderRadius={8} paddingHorizontal={16} paddingVertical={14} backgroundColor={color.enabled.adminBackground}>
16
+ <Text caption2 color={colors.onBackground02}>
17
+ {props.message.message}
18
+ </Text>
19
+ </Box>
20
+ </Box>
21
+ );
22
+ };
23
+
24
+ export default AdminMessage;
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+
3
+ import type { SendbirdFileMessage } from '@sendbird/uikit-utils';
4
+ import { getAvailableUriFromFileMessage } from '@sendbird/uikit-utils';
5
+
6
+ import Box from '../../components/Box';
7
+ import ImageWithPlaceholder from '../../components/ImageWithPlaceholder';
8
+ import PressBox from '../../components/PressBox';
9
+ import createStyleSheet from '../../styles/createStyleSheet';
10
+ import MessageContainer from './MessageContainer';
11
+ import type { OpenChannelMessageProps } from './index';
12
+
13
+ const ImageFileMessage = (props: OpenChannelMessageProps<SendbirdFileMessage>) => {
14
+ const { onPress, onLongPress, ...rest } = props;
15
+ const uri = getAvailableUriFromFileMessage(props.message);
16
+ return (
17
+ <MessageContainer {...rest}>
18
+ <Box borderRadius={8} overflow={'hidden'} style={styles.container}>
19
+ <PressBox style={styles.container} activeOpacity={0.8} onPress={onPress} onLongPress={onLongPress}>
20
+ <ImageWithPlaceholder source={{ uri }} width={'100%'} height={'100%'} />
21
+ </PressBox>
22
+ </Box>
23
+ </MessageContainer>
24
+ );
25
+ };
26
+
27
+ const styles = createStyleSheet({
28
+ container: {
29
+ maxWidth: 296,
30
+ height: 196,
31
+ },
32
+ });
33
+
34
+ export default ImageFileMessage;