stream-chat-react 14.0.0-beta.3 → 14.0.0-beta.5

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 (180) hide show
  1. package/dist/cjs/WithAudioPlayback.0c10cb67.js +4638 -0
  2. package/dist/cjs/WithAudioPlayback.0c10cb67.js.map +1 -0
  3. package/dist/cjs/emojis.js +2 -2
  4. package/dist/cjs/emojis.js.map +1 -1
  5. package/dist/cjs/index.js +262 -364
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/css/emoji-replacement.css +34 -0
  8. package/dist/css/emoji-replacement.css.map +1 -0
  9. package/dist/css/index.css +81 -78
  10. package/dist/css/index.css.map +1 -1
  11. package/dist/es/WithAudioPlayback.e7821fd4.mjs +4622 -0
  12. package/dist/es/WithAudioPlayback.e7821fd4.mjs.map +1 -0
  13. package/dist/es/emojis.mjs +2 -2
  14. package/dist/es/emojis.mjs.map +1 -1
  15. package/dist/es/index.mjs +323 -425
  16. package/dist/es/index.mjs.map +1 -1
  17. package/dist/types/components/ChannelHeader/ChannelHeader.d.ts +1 -1
  18. package/dist/types/components/ChannelHeader/ChannelHeader.d.ts.map +1 -1
  19. package/dist/types/components/Dialog/service/DialogPortal.d.ts.map +1 -1
  20. package/dist/types/components/Form/SwitchField.d.ts.map +1 -1
  21. package/dist/types/components/Form/TextInput.d.ts +2 -2
  22. package/dist/types/components/Form/TextInput.d.ts.map +1 -1
  23. package/dist/types/components/Icons/icons.d.ts +57 -373
  24. package/dist/types/components/Icons/icons.d.ts.map +1 -1
  25. package/dist/types/components/Icons/index.d.ts +0 -1
  26. package/dist/types/components/Icons/index.d.ts.map +1 -1
  27. package/dist/types/components/Loading/LoadingIndicator.d.ts +2 -2
  28. package/dist/types/components/Loading/LoadingIndicator.d.ts.map +1 -1
  29. package/dist/types/components/Message/Message.d.ts.map +1 -1
  30. package/dist/types/components/Message/hooks/useUserRole.d.ts.map +1 -1
  31. package/dist/types/components/Message/types.d.ts +1 -5
  32. package/dist/types/components/Message/types.d.ts.map +1 -1
  33. package/dist/types/components/MessageActions/MessageActions.defaults.d.ts.map +1 -1
  34. package/dist/types/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.d.ts.map +1 -1
  35. package/dist/types/components/MessageComposer/MessageComposerUI.d.ts.map +1 -1
  36. package/dist/types/components/MessageComposer/hooks/useSubmitHandler.d.ts.map +1 -1
  37. package/dist/types/components/MessageComposer/preEditSnapshot.d.ts +16 -0
  38. package/dist/types/components/MessageComposer/preEditSnapshot.d.ts.map +1 -0
  39. package/dist/types/components/MessageList/MessageList.d.ts +1 -1
  40. package/dist/types/components/MessageList/MessageList.d.ts.map +1 -1
  41. package/dist/types/components/MessageList/VirtualizedMessageList.d.ts +1 -1
  42. package/dist/types/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
  43. package/dist/types/components/MessageList/VirtualizedMessageListComponents.d.ts.map +1 -1
  44. package/dist/types/components/Poll/PollCreationDialog/OptionFieldSet.d.ts.map +1 -1
  45. package/dist/types/components/Reactions/MessageReactions.d.ts +4 -16
  46. package/dist/types/components/Reactions/MessageReactions.d.ts.map +1 -1
  47. package/dist/types/components/Reactions/MessageReactionsDetail.d.ts +4 -4
  48. package/dist/types/components/Reactions/MessageReactionsDetail.d.ts.map +1 -1
  49. package/dist/types/components/Reactions/hooks/useProcessReactions.d.ts +4 -2
  50. package/dist/types/components/Reactions/hooks/useProcessReactions.d.ts.map +1 -1
  51. package/dist/types/components/Reactions/types.d.ts +0 -1
  52. package/dist/types/components/Reactions/types.d.ts.map +1 -1
  53. package/dist/types/components/SummarizedMessagePreview/SummarizedMessagePreview.d.ts.map +1 -1
  54. package/dist/types/components/SummarizedMessagePreview/hooks/useLatestMessagePreview.d.ts.map +1 -1
  55. package/dist/types/components/Thread/ThreadHeader.d.ts +1 -1
  56. package/dist/types/components/Thread/ThreadHeader.d.ts.map +1 -1
  57. package/dist/types/context/MessageBounceContext.d.ts.map +1 -1
  58. package/dist/types/context/MessageContext.d.ts +1 -5
  59. package/dist/types/context/MessageContext.d.ts.map +1 -1
  60. package/package.json +3 -4
  61. package/dist/assets/icons/stream-chat-icons.eot +0 -0
  62. package/dist/assets/icons/stream-chat-icons.svg +0 -50
  63. package/dist/assets/icons/stream-chat-icons.ttf +0 -0
  64. package/dist/assets/icons/stream-chat-icons.woff +0 -0
  65. package/dist/assets/icons/stream-chat-icons.woff2 +0 -0
  66. package/dist/cjs/WithAudioPlayback.4a84360f.js +0 -4727
  67. package/dist/cjs/WithAudioPlayback.4a84360f.js.map +0 -1
  68. package/dist/css/v2/emoji-mart.css +0 -1
  69. package/dist/css/v2/emoji-replacement.css +0 -1
  70. package/dist/css/v2/index.css +0 -1
  71. package/dist/css/v2/index.layout.css +0 -1
  72. package/dist/es/WithAudioPlayback.a3d5a2fc.mjs +0 -4711
  73. package/dist/es/WithAudioPlayback.a3d5a2fc.mjs.map +0 -1
  74. package/dist/scss/v2/AIStateIndicator/AIStateIndicator-layout.scss +0 -3
  75. package/dist/scss/v2/AIStateIndicator/AIStateIndicator-theme.scss +0 -7
  76. package/dist/scss/v2/AttachmentList/AttachmentList-layout.scss +0 -701
  77. package/dist/scss/v2/AttachmentList/AttachmentList-theme.scss +0 -605
  78. package/dist/scss/v2/AttachmentPreviewList/AttachmentPreviewList-layout.scss +0 -141
  79. package/dist/scss/v2/AttachmentPreviewList/AttachmentPreviewList-theme.scss +0 -190
  80. package/dist/scss/v2/AudioRecorder/AudioRecorder-layout.scss +0 -139
  81. package/dist/scss/v2/AudioRecorder/AudioRecorder-theme.scss +0 -61
  82. package/dist/scss/v2/Autocomplete/Autocomplete-layout.scss +0 -94
  83. package/dist/scss/v2/Autocomplete/Autocomplete-theme.scss +0 -220
  84. package/dist/scss/v2/Avatar/Avatar-layout.scss +0 -137
  85. package/dist/scss/v2/Avatar/Avatar-theme.scss +0 -64
  86. package/dist/scss/v2/BaseImage/BaseImage-layout.scss +0 -21
  87. package/dist/scss/v2/BaseImage/BaseImage-theme.scss +0 -35
  88. package/dist/scss/v2/BaseImage/index.scss +0 -2
  89. package/dist/scss/v2/Channel/Channel-layout.scss +0 -141
  90. package/dist/scss/v2/Channel/Channel-theme.scss +0 -100
  91. package/dist/scss/v2/ChannelHeader/ChannelHeader-layout.scss +0 -27
  92. package/dist/scss/v2/ChannelHeader/ChannelHeader-theme.scss +0 -43
  93. package/dist/scss/v2/ChannelList/ChannelList-layout.scss +0 -65
  94. package/dist/scss/v2/ChannelList/ChannelList-theme.scss +0 -89
  95. package/dist/scss/v2/ChannelPreview/ChannelPreview-layout.scss +0 -126
  96. package/dist/scss/v2/ChannelPreview/ChannelPreview-theme.scss +0 -148
  97. package/dist/scss/v2/ChannelSearch/ChannelSearch-layout.scss +0 -122
  98. package/dist/scss/v2/ChannelSearch/ChannelSearch-theme.scss +0 -238
  99. package/dist/scss/v2/ChatView/ChatView-layout.scss +0 -43
  100. package/dist/scss/v2/ChatView/ChatView-theme.scss +0 -32
  101. package/dist/scss/v2/Dialog/Dialog-layout.scss +0 -70
  102. package/dist/scss/v2/Dialog/Dialog-theme.scss +0 -103
  103. package/dist/scss/v2/DragAndDropContainer/DragAndDropContainer-layout.scss +0 -5
  104. package/dist/scss/v2/DragAndDropContainer/DragAndDropContainer-theme.scss +0 -47
  105. package/dist/scss/v2/DropzoneContainer/DropzoneContainer-layout.scss +0 -14
  106. package/dist/scss/v2/DropzoneContainer/DropzoneContainer-theme.scss +0 -17
  107. package/dist/scss/v2/EditMessageForm/EditMessageForm-layout.scss +0 -51
  108. package/dist/scss/v2/EditMessageForm/EditMessageForm-theme.scss +0 -50
  109. package/dist/scss/v2/Form/Form-layout.scss +0 -49
  110. package/dist/scss/v2/Form/Form-theme.scss +0 -82
  111. package/dist/scss/v2/Icon/Icon-layout.scss +0 -98
  112. package/dist/scss/v2/Icon/Icon-theme.scss +0 -17
  113. package/dist/scss/v2/ImageCarousel/ImageCarousel-layout.scss +0 -51
  114. package/dist/scss/v2/ImageCarousel/ImageCarousel-theme.scss +0 -30
  115. package/dist/scss/v2/InfiniteScrollPaginator/InfiniteScrollPaginator-layout.scss +0 -4
  116. package/dist/scss/v2/LinkPreview/LinkPreview-layout.scss +0 -67
  117. package/dist/scss/v2/LinkPreview/LinkPreview-theme.scss +0 -32
  118. package/dist/scss/v2/LinkPreview/index.scss +0 -2
  119. package/dist/scss/v2/LoadingIndicator/LoadingIndicator-layout.scss +0 -64
  120. package/dist/scss/v2/LoadingIndicator/LoadingIndicator-theme.scss +0 -14
  121. package/dist/scss/v2/Location/Location-layout.scss +0 -52
  122. package/dist/scss/v2/Location/Location-theme.scss +0 -32
  123. package/dist/scss/v2/Message/Message-layout.scss +0 -619
  124. package/dist/scss/v2/Message/Message-theme.scss +0 -483
  125. package/dist/scss/v2/MessageActionsBox/MessageActionsBox-layout.scss +0 -21
  126. package/dist/scss/v2/MessageActionsBox/MessageActionsBox-theme.scss +0 -85
  127. package/dist/scss/v2/MessageBouncePrompt/MessageBouncePrompt-layout.scss +0 -19
  128. package/dist/scss/v2/MessageBouncePrompt/MessageBouncePrompt-theme.scss +0 -51
  129. package/dist/scss/v2/MessageInput/MessageInput-layout.scss +0 -268
  130. package/dist/scss/v2/MessageInput/MessageInput-theme.scss +0 -359
  131. package/dist/scss/v2/MessageList/MessageList-layout.scss +0 -65
  132. package/dist/scss/v2/MessageList/MessageList-theme.scss +0 -107
  133. package/dist/scss/v2/MessageList/VirtualizedMessageList-layout.scss +0 -57
  134. package/dist/scss/v2/MessageList/VirtualizedMessageList-theme.scss +0 -41
  135. package/dist/scss/v2/MessageReactions/MessageReactions-layout.scss +0 -143
  136. package/dist/scss/v2/MessageReactions/MessageReactions-theme.scss +0 -92
  137. package/dist/scss/v2/MessageReactions/MessageReactionsSelector-layout.scss +0 -86
  138. package/dist/scss/v2/MessageReactions/MessageReactionsSelector-theme.scss +0 -94
  139. package/dist/scss/v2/Modal/Modal-layout.scss +0 -74
  140. package/dist/scss/v2/Modal/Modal-theme.scss +0 -109
  141. package/dist/scss/v2/Notification/MessageNotification-layout.scss +0 -12
  142. package/dist/scss/v2/Notification/MessageNotification-theme.scss +0 -34
  143. package/dist/scss/v2/Notification/Notification-layout.scss +0 -7
  144. package/dist/scss/v2/Notification/Notification-theme.scss +0 -32
  145. package/dist/scss/v2/Notification/NotificationList-layout.scss +0 -11
  146. package/dist/scss/v2/Notification/NotificationList-theme.scss +0 -31
  147. package/dist/scss/v2/Poll/Poll-layout.scss +0 -493
  148. package/dist/scss/v2/Poll/Poll-theme.scss +0 -178
  149. package/dist/scss/v2/Search/Search-layout.scss +0 -148
  150. package/dist/scss/v2/Search/Search-theme.scss +0 -222
  151. package/dist/scss/v2/Thread/Thread-layout.scss +0 -65
  152. package/dist/scss/v2/Thread/Thread-theme.scss +0 -82
  153. package/dist/scss/v2/ThreadList/ThreadList-layout.scss +0 -152
  154. package/dist/scss/v2/ThreadList/ThreadList-theme.scss +0 -75
  155. package/dist/scss/v2/Tooltip/Tooltip-layout.scss +0 -10
  156. package/dist/scss/v2/Tooltip/Tooltip-theme.scss +0 -36
  157. package/dist/scss/v2/TypingIndicator/TypingIndicator-layout.scss +0 -31
  158. package/dist/scss/v2/TypingIndicator/TypingIndicator-theme.scss +0 -68
  159. package/dist/scss/v2/UnreadCountBadge/UnreadCountBadge-layout.scss +0 -49
  160. package/dist/scss/v2/UnreadCountBadge/UnreadCountBadge-theme.scss +0 -11
  161. package/dist/scss/v2/_base.scss +0 -65
  162. package/dist/scss/v2/_emoji-replacement.scss +0 -45
  163. package/dist/scss/v2/_global-layout-variables.scss +0 -65
  164. package/dist/scss/v2/_global-theme-variables.scss +0 -173
  165. package/dist/scss/v2/_icons.scss +0 -36
  166. package/dist/scss/v2/_palette-variables.scss +0 -55
  167. package/dist/scss/v2/_utils.scss +0 -212
  168. package/dist/scss/v2/_variables.scss +0 -2
  169. package/dist/scss/v2/common/CTAButton/CTAButton-layout.scss +0 -4
  170. package/dist/scss/v2/common/CTAButton/CTAButton-theme.scss +0 -42
  171. package/dist/scss/v2/common/CircleFAButton/CircleFAButton-layout.scss +0 -14
  172. package/dist/scss/v2/common/CircleFAButton/CircleFAButton-theme.scss +0 -35
  173. package/dist/scss/v2/index.layout.scss +0 -49
  174. package/dist/scss/v2/index.scss +0 -50
  175. package/dist/scss/v2/vendor/emoji-mart.scss +0 -514
  176. package/dist/scss/v2/vendor/react-image-gallery.scss +0 -258
  177. package/dist/types/components/Icons/IconGiphy.d.ts +0 -3
  178. package/dist/types/components/Icons/IconGiphy.d.ts.map +0 -1
  179. /package/dist/{assets → css/assets}/EmojiOneColor.woff2 +0 -0
  180. /package/dist/{assets → css/assets}/NotoColorEmoji-flags.woff2 +0 -0
@@ -1,3 +0,0 @@
1
- .str-chat__ai-state-indicator-container {
2
- padding: 0 8px;
3
- }
@@ -1,7 +0,0 @@
1
- .str-chat__ai-state-indicator-container {
2
- background-color: var(--str-chat__grey300);
3
- }
4
-
5
- .str-chat__ai-state-indicator-text {
6
- color: var(--str-chat__text-color);
7
- }
@@ -1,701 +0,0 @@
1
- @use '../utils';
2
-
3
- .str-chat {
4
- /* The margin applied to every attachment in the attachment list */
5
- --str-chat__attachment-margin: var(--str-chat__spacing-0_5);
6
-
7
- /* The height of GIFs */
8
- --str-chat__gif-height: calc(var(--str-chat__spacing-px) * 200);
9
-
10
- /* The width of the amplitude bar of the voice recording wave data */
11
- --str-chat__voice-recording-amplitude-bar-width: 2px;
12
-
13
- /* The gap between amplitudes of the wave data of a voice recording */
14
- --str-chat__voice-recording-amplitude-bar-gap-width: var(--str-chat__spacing-px);
15
- }
16
-
17
- .str-chat__attachment-list {
18
- /* The maximum allowed width and height of attachments, in case of gallery images this is the maximum size of the whole gallery (not just for a single image inside the gallery). There are some constraints for the acceptable values you can provide for this variable, [Angular documentation](https://getstream.io/chat/docs/sdk/angular/components/AttachmentListComponent/#maximum-size), [React documentation](https://getstream.io/chat/docs/sdk/react/message-components/attachment/#image-and-video-sizing). */
19
- --str-chat__attachment-max-width: calc(
20
- var(--str-chat__message-max-width) - calc(2 * var(--str-chat__attachment-margin))
21
- );
22
-
23
- /* The maximum height of videos, the default value is the mase as `--str-chat__attachment-max-width`. The rendered video can be smaller based on the aspect ratio */
24
- --str-chat__video-height: var(--str-chat__attachment-max-width);
25
-
26
- /* The height of scraped images, the default value is optimized for 1.91:1 aspect ratio */
27
- --str-chat__scraped-image-height: calc(var(--str-chat__attachment-max-width) * calc(1 / 1.91));
28
-
29
- /* The height of scraped videos, the default value is optimized for 16:9 aspect ratio */
30
- --str-chat__scraped-video-height: calc(var(--str-chat__attachment-max-width) * calc(9 / 16));
31
-
32
- display: flex;
33
- flex-direction: column;
34
- align-items: stretch;
35
- min-width: 0;
36
-
37
- .str-chat__message-attachment--card {
38
- .str-chat__message-attachment-card--header {
39
- position: relative;
40
- }
41
-
42
- .str-chat__message-attachment-card--source-link {
43
- padding-bottom: var(--str-chat__spacing-2);
44
- }
45
-
46
- .str-chat__message-attachment-card--text {
47
- @include utils.ellipsis-text();
48
- }
49
- }
50
-
51
- .str-chat__message-attachment--image,
52
- .str-chat__message-attachment--video,
53
- .str-chat__message-attachment-card--header {
54
- width: auto;
55
- display: flex;
56
- justify-content: center;
57
- align-items: center;
58
- overflow: hidden;
59
- }
60
-
61
- // Scraped images
62
- .str-chat__message-attachment-card--header {
63
- height: var(--str-chat__scraped-image-height);
64
-
65
- img {
66
- object-fit: cover;
67
- max-height: 100%;
68
- max-width: 100%;
69
- width: 100%;
70
- height: 100%;
71
- cursor: default;
72
- }
73
- }
74
-
75
- // image enlargement available in React SDK only
76
- .str-chat__message-attachment-card-react--header {
77
- img {
78
- cursor: zoom-in;
79
- }
80
- }
81
-
82
- .str-chat__message-attachment-card--giphy {
83
- .str-chat__message-attachment-card--header {
84
- height: var(--str-chat__gif-height);
85
-
86
- img {
87
- object-fit: contain;
88
- max-height: 100%;
89
- max-width: 100%;
90
- cursor: default;
91
- }
92
- }
93
-
94
- // image enlargement available in React SDK only
95
- .str-chat__message-attachment-card-react--header {
96
- img {
97
- cursor: zoom-in;
98
- }
99
- }
100
- }
101
-
102
- // Images uploaded from files
103
- .str-chat__message-attachment--image:not(.str-chat__message-attachment--card) > img {
104
- @include utils.clamped-height-from-original-image-dimensions(
105
- '--str-chat__attachment-max-width',
106
- '--str-chat__attachment-max-width'
107
- );
108
-
109
- // CDN resize requires max-width and height/max-height to be present on this element
110
- max-width: var(--str-chat__attachment-max-width);
111
- max-height: var(--str-chat__attachment-max-width);
112
- object-fit: cover;
113
- width: 100%;
114
- cursor: zoom-in;
115
- }
116
-
117
- // Video files: uploaded from files and scraped
118
- .str-chat__message-attachment--video:not(.str-chat__message-attachment--card),
119
- .str-chat__message-attachment-card--video .str-chat__message-attachment-card--header {
120
- $maxWidth: var(--str-chat__attachment-max-width);
121
- max-width: $maxWidth;
122
- display: flex;
123
-
124
- .str-chat__player-wrapper {
125
- height: 100%;
126
- width: 100%;
127
- min-width: 0;
128
- // CDN resize requires max-width to be present on this element - React
129
- max-width: $maxWidth;
130
- display: flex;
131
- flex-direction: column;
132
-
133
- .react-player,
134
- .str-chat__video-angular {
135
- height: 100%;
136
- width: 100%;
137
- // CDN resize requires max-width to be present on this element - Angular
138
- max-width: $maxWidth;
139
- max-height: 100%;
140
- min-height: 0;
141
- }
142
- }
143
- }
144
-
145
- .str-chat__message-attachment--video:not(.str-chat__message-attachment--card):not(.str-chat__message-attachment-dynamic-size) {
146
- height: var(--str-chat__video-height);
147
- }
148
-
149
- .str-chat__message-attachment--video.str-chat__message-attachment-dynamic-size:not(.str-chat__message-attachment--card) {
150
- $maxHeight: var(--str-chat__video-height);
151
-
152
- max-height: $maxHeight;
153
-
154
- .str-chat__player-wrapper {
155
- @include utils.clamped-height-from-original-image-dimensions(
156
- '--str-chat__video-height',
157
- '--str-chat__attachment-max-width'
158
- );
159
- // CDN resize requires max-height to be present on this element - React
160
- max-height: $maxHeight;
161
- }
162
-
163
- .str-chat__video-angular {
164
- // CDN resize requires max-height to be present on this element - Angular
165
- max-height: $maxHeight;
166
- }
167
- }
168
-
169
- .str-chat__message-attachment-card--video .str-chat__message-attachment-card--header {
170
- height: var(--str-chat__scraped-video-height);
171
- }
172
-
173
- .str-chat__message-attachment--video:not(.str-chat__message-attachment--card),
174
- .str-chat__message-attachment--image:not(.str-chat__message-attachment--card) {
175
- margin: var(--str-chat__attachment-margin);
176
- }
177
-
178
- .str-chat__message-attachment--gallery {
179
- $max-width: var(--str-chat__attachment-max-width);
180
- margin: var(--str-chat__attachment-margin);
181
-
182
- .str-chat__gallery {
183
- display: grid;
184
- grid-template-columns: 50% 50%;
185
- overflow: hidden;
186
- // Safari needs this
187
- width: fit-content;
188
- gap: var(--str-chat__spacing-0_5);
189
- max-width: $max-width;
190
- // CDN resize requires height/max-height to be present on the img element, this rule ensures that
191
- height: var(--str-chat__attachment-max-width);
192
-
193
- &.str-chat__gallery-two-rows {
194
- grid-template-rows: 50% 50%;
195
- }
196
-
197
- .str-chat__gallery-image {
198
- padding: 0;
199
- margin: 0;
200
- position: relative;
201
-
202
- img {
203
- width: 100%;
204
- height: 100%;
205
- object-fit: cover;
206
- cursor: zoom-in;
207
- // CDN resize requires max-width to be present on this element
208
- max-width: $max-width;
209
- }
210
- }
211
-
212
- .str-chat__gallery-placeholder {
213
- position: relative;
214
- display: flex;
215
- align-items: center;
216
- justify-content: center;
217
- background-size: cover;
218
- background-position: top left;
219
- background-repeat: no-repeat;
220
- margin: 0;
221
- cursor: zoom-in;
222
- // CDN resize requires max-width to be present on this element
223
- max-width: $max-width;
224
-
225
- p {
226
- position: relative;
227
- z-index: 1;
228
- }
229
-
230
- &::after {
231
- content: '';
232
- position: absolute;
233
- top: 0;
234
- left: 0;
235
- width: 100%;
236
- height: 100%;
237
- z-index: 0;
238
- }
239
- }
240
- }
241
- }
242
-
243
- .str-chat__gallery .str-chat__message-attachment--svg-image,
244
- .str-chat__message-attachment--image.str-chat__message-attachment--svg-image {
245
- $padding: var(--str-chat__spacing-6);
246
- padding: $padding;
247
-
248
- img {
249
- object-fit: contain;
250
- // CDN resize requires max-width and height/max-height to be present on this element
251
- max-width: calc(var(--str-chat__attachment-max-width) - #{$padding});
252
- max-height: calc(var(--str-chat__attachment-max-width) - #{$padding});
253
- }
254
- }
255
-
256
- .str-chat__message-attachment-unsupported {
257
- @include utils.flex-row-center;
258
- padding: var(--str-chat__spacing-2);
259
- column-gap: var(--str-chat__spacing-4);
260
- margin: var(--str-chat__attachment-margin);
261
-
262
- .str-chat__file-icon {
263
- width: calc(var(--str-chat__spacing-px) * 30);
264
- }
265
-
266
- .str-chat__message-attachment-unsupported__metadata {
267
- min-width: 0;
268
- flex: 1;
269
- display: flex;
270
- flex-direction: column;
271
- align-items: flex-start;
272
- justify-content: center;
273
- }
274
-
275
- .str-chat__message-attachment-unsupported__title {
276
- @include utils.ellipsis-text;
277
- max-width: 100%;
278
- }
279
- }
280
-
281
- .str-chat__message-attachment-file--item,
282
- .str-chat__message-attachment-audio-widget {
283
- @include utils.flex-row-center;
284
- padding: var(--str-chat__spacing-2);
285
- column-gap: var(--str-chat__spacing-4);
286
- margin: var(--str-chat__attachment-margin);
287
-
288
- .str-chat__message-attachment-file--item-text,
289
- .str-chat__message-attachment-audio-widget--text {
290
- width: 100%;
291
- display: flex;
292
- flex-direction: column;
293
- align-items: flex-start;
294
- justify-content: center;
295
- row-gap: var(--str-chat__spacing-0_5);
296
- min-width: 0;
297
-
298
- .str-chat__message-attachment-file--item-first-row,
299
- .str-chat__message-attachment-audio-widget--text-first-row {
300
- width: 100%;
301
- display: flex;
302
- align-items: center;
303
- justify-content: space-between;
304
- column-gap: var(--str-chat__spacing-2);
305
-
306
- .str-chat__message-attachment-file--item-name,
307
- .str-chat__message-attachment-audio-widget--title {
308
- @include utils.ellipsis-text;
309
- min-width: 0;
310
- }
311
-
312
- .str-chat__message-attachment-download-icon {
313
- svg {
314
- width: calc(var(--str-chat__spacing-px) * 24);
315
- height: calc(var(--str-chat__spacing-px) * 16);
316
- }
317
- }
318
- }
319
- }
320
- }
321
-
322
- .str-chat__message-attachment-file--item {
323
- .str-chat__file-icon {
324
- width: calc(var(--str-chat__spacing-px) * 34);
325
- }
326
- }
327
-
328
- .str-chat__message-attachment-geolocation {
329
- margin: var(--str-chat__attachment-margin);
330
- min-width: 200px;
331
-
332
- .str-chat__message-attachment-geolocation__placeholder {
333
- position: relative;
334
- display: flex;
335
- justify-content: center;
336
- align-items: center;
337
- padding: var(--str-chat__spacing-2);
338
-
339
- .str-chat__message-geolocation__icon {
340
- height: calc(var(--str-chat__spacing-px) *150);
341
- }
342
-
343
- .str-chat__message-attachment-geolocation__placeholder-link {
344
- position: absolute;
345
- inset-inline-end: 0.75rem;
346
- inset-block: 0.75rem;
347
- height: calc(var(--str-chat__spacing-px) * 20);
348
- width: calc(var(--str-chat__spacing-px) * 20);
349
- }
350
- }
351
-
352
- .str-chat__message-attachment-geolocation__status {
353
- display: flex;
354
- justify-content: center;
355
- padding: 0.5rem 2rem;
356
-
357
- .str-chat__message-attachment-geolocation__status--active {
358
- display: flex;
359
- flex-direction: column;
360
- align-items: center;
361
- gap: 0.375rem;
362
-
363
- .str-chat__message-attachment-geolocation__stop-sharing-button {
364
- color: var(--str-chat__danger-color);
365
- }
366
-
367
- .str-chat__message-attachment-geolocation__status--active-status {
368
- color: var(--str-chat__info-color);
369
- }
370
-
371
- .str-chat__message-attachment-geolocation__status--active-until {
372
- text-transform: lowercase;
373
- }
374
- }
375
- }
376
- }
377
-
378
- .str-chat__message-attachment-audio-widget {
379
- .str-chat__message-attachment-audio-widget--play-controls {
380
- @include utils.flex-row-center();
381
- }
382
-
383
- .str-chat__message-attachment-audio-widget--progress-track {
384
- max-width: calc(var(--str-chat__spacing-px) * 120);
385
- }
386
-
387
- .str-chat__message-attachment-audio-widget--text-second-row {
388
- display: flex;
389
- align-items: center;
390
- width: 100%;
391
- grid-column-gap: var(--str-chat__spacing-5);
392
- padding-top: var(--str-chat__spacing-2_5);
393
-
394
- .str-chat__message-attachment-file--item-size {
395
- line-height: calc(var(--str-chat__spacing-px) * 14);
396
- }
397
- }
398
- }
399
-
400
- .str-chat__message-attachment-audio-widget--progress-track {
401
- position: relative;
402
- height: calc(var(--str-chat__spacing-px) * 5);
403
- flex: 1;
404
- cursor: pointer;
405
-
406
- .str-chat__message-attachment-audio-widget--progress-indicator {
407
- position: absolute;
408
- inset-inline-start: 0;
409
- height: inherit;
410
- }
411
- }
412
-
413
- .str-chat__message-attachment__voice-recording-widget {
414
- display: grid;
415
- grid-template-columns: 36px auto 55px;
416
- align-items: center;
417
- justify-content: center;
418
- gap: calc(var(--str-chat__spacing-px) * 9);
419
- padding: var(--str-chat__spacing-2);
420
- margin: var(--str-chat__attachment-margin);
421
-
422
- .str-chat__message-attachment__voice-recording-widget__metadata {
423
- flex: 1;
424
- min-width: 0;
425
- display: flex;
426
- flex-direction: column;
427
- gap: var(--str-chat__spacing-2);
428
-
429
- a {
430
- cursor: pointer;
431
- text-decoration: none;
432
- }
433
-
434
- .str-chat__message-attachment-voice-recording-widget--first-row {
435
- @include utils.ellipsis-text-parent;
436
-
437
- width: 100%;
438
- display: flex;
439
- align-items: center;
440
- justify-content: space-between;
441
- gap: var(--str-chat__spacing-1);
442
- }
443
-
444
- .str-chat__message-attachment__voice-recording-widget__title {
445
- @include utils.ellipsis-text;
446
- min-width: 0;
447
- }
448
-
449
- .str-chat__message-attachment-download-icon {
450
- svg {
451
- width: calc(var(--str-chat__spacing-px) * 24);
452
- height: calc(var(--str-chat__spacing-px) * 16);
453
- }
454
- }
455
-
456
- .str-chat__message-attachment__voice-recording-widget__audio-state {
457
- display: flex;
458
- align-items: center;
459
- justify-content: space-between;
460
- gap: var(--str-chat__spacing-1_5);
461
- height: 100%;
462
- }
463
-
464
- .str-chat__message-attachment__voice-recording-widget__error-message {
465
- display: flex;
466
- align-items: center;
467
- justify-content: flex-start;
468
- gap: var(--str-chat__spacing-1);
469
- }
470
- }
471
-
472
- .str-chat__message-attachment__voice-recording-widget__right-section {
473
- justify-self: center;
474
- }
475
-
476
- .str-chat__message-attachment__voice-recording-widget__timer {
477
- min-width: calc(var(--str-chat__spacing-px) * 45);
478
- width: calc(var(--str-chat__spacing-px) * 45);
479
- }
480
-
481
- // Angular SDK element, do not remove
482
- stream-voice-recording-wavebar {
483
- flex: 1;
484
- }
485
-
486
- .str-chat__wave-progress-bar__track {
487
- $min_amplitude_height: 2px;
488
- position: relative;
489
- flex: 1;
490
- width: 100%;
491
- height: calc(var(--str-chat__spacing-px) * 25);
492
- display: flex;
493
- align-items: center;
494
- justify-content: space-between;
495
- gap: var(--str-chat__voice-recording-amplitude-bar-gap-width);
496
-
497
- .str-chat__wave-progress-bar__amplitude-bar {
498
- width: var(--str-chat__voice-recording-amplitude-bar-width);
499
- min-width: var(--str-chat__voice-recording-amplitude-bar-width);
500
- height: calc(
501
- var(--str-chat__wave-progress-bar__amplitude-bar-height) + #{$min_amplitude_height}
502
- ); // variable set dynamically on element
503
- }
504
-
505
- .str-chat__wave-progress-bar__progress-indicator {
506
- position: absolute;
507
- left: 0;
508
- height: calc(100% + #{$min_amplitude_height} + 2px);
509
- width: calc(var(--str-chat__spacing-px) * 6);
510
- }
511
- }
512
- }
513
-
514
- .str-chat__message_attachment__playback-rate-button {
515
- @include utils.flex-row-center;
516
- @include utils.button-reset;
517
- padding: var(--str-chat__spacing-1_5) var(--str-chat__spacing-2_5);
518
- }
519
-
520
- .str-chat__message-attachment-card {
521
- min-width: 0;
522
- max-width: var(--str-chat__attachment-max-width);
523
- margin: var(--str-chat__attachment-margin);
524
-
525
- .str-chat__message-attachment-card--content {
526
- padding: var(--str-chat__spacing-2_5);
527
-
528
- .str-chat__message-attachment-card--title {
529
- @include utils.ellipsis-text;
530
- }
531
- }
532
- }
533
-
534
- .str-chat__message-attachment-card--audio {
535
- .str-chat__message-attachment-card--content {
536
- padding: 0;
537
-
538
- .str-chat__message-attachment-card-audio-widget {
539
- display: flex;
540
- flex-direction: column;
541
- row-gap: var(--str-chat__spacing-2_5);
542
- width: 100%;
543
- padding: var(--str-chat__spacing-2);
544
-
545
- .str-chat__message-attachment-card-audio-widget--first-row {
546
- display: flex;
547
- align-items: center;
548
- column-gap: var(--str-chat__spacing-3_5);
549
- }
550
- }
551
- }
552
- }
553
-
554
- .str-chat__message-attachment-actions {
555
- .str-chat__message-attachment-actions-form {
556
- display: flex;
557
- justify-content: stretch;
558
-
559
- .str-chat__message-attachment-actions-button {
560
- cursor: pointer;
561
- width: 100%;
562
- padding: var(--str-chat__spacing-3) var(--str-chat__spacing-4);
563
- white-space: nowrap;
564
- }
565
- }
566
- }
567
-
568
- .str-chat__message-attachment-with-actions.str-chat__message-attachment--giphy {
569
- .str-chat__message-attachment-card {
570
- .str-chat__message-attachment-card--content {
571
- display: none;
572
- }
573
- }
574
- }
575
-
576
- /* Angular has different UI here, the download icon is too small to use on mobile */
577
- .str-chat-angular__message-attachment-file-single
578
- .str-chat__message-attachment-file--item-first-row {
579
- cursor: pointer;
580
- text-decoration: none;
581
- }
582
-
583
- .str-chat__message-attachment-download-icon {
584
- --str-chat-icon-height: calc(var(--str-chat__spacing-px) * 16);
585
- }
586
-
587
- .str-chat__attachment-type-icon {
588
- --str-chat-icon-height: calc(var(--str-chat__spacing-px) * 37);
589
- }
590
- }
591
-
592
- .str-chat__message-attachment-audio-widget--play-button {
593
- --str-chat-icon-height: calc(var(--str-chat__spacing-px) * 24);
594
- @include utils.flex-row-center();
595
- height: calc(var(--str-chat__spacing-px) * 36);
596
- width: calc(var(--str-chat__spacing-px) * 36);
597
- cursor: pointer;
598
-
599
- svg {
600
- width: var(--str-chat__spacing-3);
601
- }
602
- }
603
-
604
- .str-chat__quoted-message-preview {
605
- /* stylelint-disable-next-line length-zero-no-unit */
606
- --str-chat__attachment-margin: 0px;
607
-
608
- * {
609
- cursor: pointer !important;
610
- }
611
-
612
- .str-chat__message-attachment-card {
613
- .str-chat__message-attachment-card--source-link,
614
- .str-chat__message-attachment-card--content {
615
- display: none;
616
- }
617
- }
618
-
619
- .str-chat__message-attachment__voice-recording-widget {
620
- display: flex;
621
- justify-content: space-between;
622
-
623
- .str-chat__wave-progress-bar__track {
624
- display: none;
625
- }
626
-
627
- .str-chat__message-attachment-audio-widget--play-button {
628
- display: none;
629
- }
630
- }
631
-
632
- .str-chat__message-attachment-file--item-download {
633
- display: none;
634
- }
635
- }
636
-
637
- .str-chat__message {
638
- .str-chat__quoted-message-preview {
639
- .str-chat__message-attachment-file--item {
640
- padding: 0;
641
- }
642
- }
643
- }
644
-
645
- .str-chat__audio_recorder__waveform-box,
646
- .str-chat__wave-progress-bar__track {
647
- $min_amplitude_height: 2px;
648
- position: relative;
649
- flex: 1;
650
- width: 120px;
651
- height: calc(var(--str-chat__spacing-px) * 25);
652
- display: flex;
653
- align-items: center;
654
- gap: var(--str-chat__spacing-px);
655
-
656
- .str-chat__wave-progress-bar__amplitude-bar {
657
- width: 2px;
658
- min-width: 2px;
659
- height: calc(
660
- var(--str-chat__wave-progress-bar__amplitude-bar-height) + $min_amplitude_height
661
- ); // variable set dynamically on element
662
- }
663
-
664
- .str-chat__wave-progress-bar__progress-indicator {
665
- position: absolute;
666
- left: 0;
667
- height: calc(100% + $min_amplitude_height + 2px);
668
- width: calc(var(--str-chat__spacing-px) * 6);
669
- }
670
- }
671
-
672
- .str-chat__attachment-list-angular-host {
673
- min-width: 0;
674
-
675
- .str-chat__message-attachment-card--video {
676
- width: 100%;
677
-
678
- a {
679
- display: block;
680
- width: 100%;
681
- height: 100%;
682
- position: relative;
683
-
684
- .str-chat__message-attachment-card--video-play,
685
- stream-icon-placeholder {
686
- position: absolute;
687
- top: 50%;
688
- left: 0;
689
- right: 0;
690
- margin: auto;
691
- transform: translateY(-50%);
692
- width: calc(var(--str-chat__spacing-px) * 36);
693
- height: calc(var(--str-chat__spacing-px) * 36);
694
- }
695
-
696
- img {
697
- cursor: pointer;
698
- }
699
- }
700
- }
701
- }