@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.
- package/lib/commonjs/components/Box/index.js +46 -0
- package/lib/commonjs/components/Box/index.js.map +1 -0
- package/lib/commonjs/components/ImageWithPlaceholder/index.js +92 -0
- package/lib/commonjs/components/ImageWithPlaceholder/index.js.map +1 -0
- package/lib/commonjs/components/PressBox/index.js +60 -0
- package/lib/commonjs/components/PressBox/index.js.map +1 -0
- package/lib/commonjs/index.js +39 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theme/DarkUIKitTheme.js +220 -179
- package/lib/commonjs/theme/DarkUIKitTheme.js.map +1 -1
- package/lib/commonjs/theme/LightUIKitTheme.js +220 -179
- package/lib/commonjs/theme/LightUIKitTheme.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/ui/Header/index.js +4 -2
- package/lib/commonjs/ui/Header/index.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.admin.js +40 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.admin.js.map +1 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.image.js +57 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.image.js.map +1 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.js +90 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.js.map +1 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.video.js +134 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.video.js.map +1 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.unknown.js +55 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.unknown.js.map +1 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.js +83 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.js.map +1 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.og.js +140 -0
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.og.js.map +1 -0
- package/lib/commonjs/ui/OpenChannelMessage/MessageContainer.js +136 -0
- package/lib/commonjs/ui/OpenChannelMessage/MessageContainer.js.map +1 -0
- package/lib/commonjs/ui/OpenChannelMessage/index.js +35 -0
- package/lib/commonjs/ui/OpenChannelMessage/index.js.map +1 -0
- package/lib/commonjs/ui/OpenChannelPreview/index.js +134 -0
- package/lib/commonjs/ui/OpenChannelPreview/index.js.map +1 -0
- package/lib/module/components/Box/index.js +33 -0
- package/lib/module/components/Box/index.js.map +1 -0
- package/lib/module/components/ImageWithPlaceholder/index.js +71 -0
- package/lib/module/components/ImageWithPlaceholder/index.js.map +1 -0
- package/lib/module/components/PressBox/index.js +45 -0
- package/lib/module/components/PressBox/index.js.map +1 -0
- package/lib/module/index.js +6 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/theme/DarkUIKitTheme.js +220 -179
- package/lib/module/theme/DarkUIKitTheme.js.map +1 -1
- package/lib/module/theme/LightUIKitTheme.js +220 -179
- package/lib/module/theme/LightUIKitTheme.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/ui/Header/index.js +4 -2
- package/lib/module/ui/Header/index.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.admin.js +27 -0
- package/lib/module/ui/OpenChannelMessage/Message.admin.js.map +1 -0
- package/lib/module/ui/OpenChannelMessage/Message.file.image.js +41 -0
- package/lib/module/ui/OpenChannelMessage/Message.file.image.js.map +1 -0
- package/lib/module/ui/OpenChannelMessage/Message.file.js +71 -0
- package/lib/module/ui/OpenChannelMessage/Message.file.js.map +1 -0
- package/lib/module/ui/OpenChannelMessage/Message.file.video.js +112 -0
- package/lib/module/ui/OpenChannelMessage/Message.file.video.js.map +1 -0
- package/lib/module/ui/OpenChannelMessage/Message.unknown.js +41 -0
- package/lib/module/ui/OpenChannelMessage/Message.unknown.js.map +1 -0
- package/lib/module/ui/OpenChannelMessage/Message.user.js +67 -0
- package/lib/module/ui/OpenChannelMessage/Message.user.js.map +1 -0
- package/lib/module/ui/OpenChannelMessage/Message.user.og.js +121 -0
- package/lib/module/ui/OpenChannelMessage/Message.user.og.js.map +1 -0
- package/lib/module/ui/OpenChannelMessage/MessageContainer.js +116 -0
- package/lib/module/ui/OpenChannelMessage/MessageContainer.js.map +1 -0
- package/lib/module/ui/OpenChannelMessage/index.js +18 -0
- package/lib/module/ui/OpenChannelMessage/index.js.map +1 -0
- package/lib/module/ui/OpenChannelPreview/index.js +117 -0
- package/lib/module/ui/OpenChannelPreview/index.js.map +1 -0
- package/lib/typescript/src/components/Box/index.d.ts +11 -0
- package/lib/typescript/src/components/ImageWithPlaceholder/index.d.ts +11 -0
- package/lib/typescript/src/components/PressBox/index.d.ts +16 -0
- package/lib/typescript/src/index.d.ts +8 -1
- package/lib/typescript/src/types.d.ts +21 -5
- package/lib/typescript/src/ui/Header/index.d.ts +1 -0
- package/lib/typescript/src/ui/OpenChannelMessage/Message.admin.d.ts +4 -0
- package/lib/typescript/src/ui/OpenChannelMessage/Message.file.d.ts +5 -0
- package/lib/typescript/src/ui/OpenChannelMessage/Message.file.image.d.ts +4 -0
- package/lib/typescript/src/ui/OpenChannelMessage/Message.file.video.d.ts +9 -0
- package/lib/typescript/src/ui/OpenChannelMessage/Message.unknown.d.ts +4 -0
- package/lib/typescript/src/ui/OpenChannelMessage/Message.user.d.ts +5 -0
- package/lib/typescript/src/ui/OpenChannelMessage/Message.user.og.d.ts +5 -0
- package/lib/typescript/src/ui/OpenChannelMessage/MessageContainer.d.ts +7 -0
- package/lib/typescript/src/ui/OpenChannelMessage/index.d.ts +136 -0
- package/lib/typescript/src/ui/OpenChannelPreview/index.d.ts +10 -0
- package/package.json +4 -4
- package/src/components/Box/index.tsx +65 -0
- package/src/components/ImageWithPlaceholder/index.tsx +83 -0
- package/src/components/PressBox/index.tsx +53 -0
- package/src/index.ts +8 -1
- package/src/theme/DarkUIKitTheme.ts +213 -171
- package/src/theme/LightUIKitTheme.ts +213 -171
- package/src/types.ts +41 -6
- package/src/ui/Header/index.tsx +7 -2
- package/src/ui/OpenChannelMessage/Message.admin.tsx +24 -0
- package/src/ui/OpenChannelMessage/Message.file.image.tsx +34 -0
- package/src/ui/OpenChannelMessage/Message.file.tsx +67 -0
- package/src/ui/OpenChannelMessage/Message.file.video.tsx +93 -0
- package/src/ui/OpenChannelMessage/Message.unknown.tsx +31 -0
- package/src/ui/OpenChannelMessage/Message.user.og.tsx +120 -0
- package/src/ui/OpenChannelMessage/Message.user.tsx +61 -0
- package/src/ui/OpenChannelMessage/MessageContainer.tsx +121 -0
- package/src/ui/OpenChannelMessage/index.ts +42 -0
- 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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
135
|
+
badge: {
|
|
136
|
+
default: {
|
|
137
|
+
none: {
|
|
138
|
+
text: palette.background50,
|
|
139
|
+
background: palette.primary300,
|
|
140
|
+
},
|
|
112
141
|
},
|
|
113
142
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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
|
|
package/src/ui/Header/index.tsx
CHANGED
|
@@ -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:
|
|
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']:
|
|
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;
|