stream-chat-react 12.7.0 → 12.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/components/ChannelList/ChannelList.d.ts +3 -2
  2. package/dist/components/ChannelList/ChannelList.js +29 -34
  3. package/dist/components/ChannelList/hooks/index.d.ts +1 -0
  4. package/dist/components/ChannelList/hooks/index.js +1 -0
  5. package/dist/components/ChannelList/hooks/useChannelListShape.d.ts +60 -0
  6. package/dist/components/ChannelList/hooks/useChannelListShape.js +344 -0
  7. package/dist/components/ChannelList/hooks/useChannelMembershipState.d.ts +2 -0
  8. package/dist/components/ChannelList/hooks/useChannelMembershipState.js +15 -0
  9. package/dist/components/ChannelList/utils.d.ts +41 -5
  10. package/dist/components/ChannelList/utils.js +85 -0
  11. package/dist/components/ChannelPreview/ChannelPreview.js +2 -2
  12. package/dist/components/ChannelPreview/ChannelPreviewActionButtons.d.ts +6 -0
  13. package/dist/components/ChannelPreview/ChannelPreviewActionButtons.js +30 -0
  14. package/dist/components/ChannelPreview/ChannelPreviewMessenger.d.ts +2 -2
  15. package/dist/components/ChannelPreview/ChannelPreviewMessenger.js +14 -9
  16. package/dist/components/ChannelPreview/icons.d.ts +6 -0
  17. package/dist/components/ChannelPreview/icons.js +8 -0
  18. package/dist/components/ChannelPreview/index.d.ts +1 -0
  19. package/dist/components/ChannelPreview/index.js +1 -0
  20. package/dist/components/ChannelPreview/utils.d.ts +2 -1
  21. package/dist/components/ChannelPreview/utils.js +2 -2
  22. package/dist/components/Chat/Chat.d.ts +2 -1
  23. package/dist/components/Chat/Chat.js +2 -1
  24. package/dist/components/Chat/hooks/useChat.js +1 -1
  25. package/dist/components/Chat/hooks/useCreateChatContext.js +3 -1
  26. package/dist/components/Message/Message.js +2 -1
  27. package/dist/components/Message/MessageSimple.js +8 -4
  28. package/dist/components/Message/utils.d.ts +1 -1
  29. package/dist/components/Message/utils.js +1 -1
  30. package/dist/context/ChatContext.d.ts +1 -1
  31. package/dist/context/ComponentContext.d.ts +3 -1
  32. package/dist/context/MessageContext.d.ts +4 -0
  33. package/dist/css/v2/index.css +1 -1
  34. package/dist/css/v2/index.layout.css +1 -1
  35. package/dist/experimental/index.browser.cjs.map +2 -2
  36. package/dist/experimental/index.node.cjs.map +2 -2
  37. package/dist/i18n/Streami18n.d.ts +2 -0
  38. package/dist/i18n/de.json +2 -0
  39. package/dist/i18n/en.json +2 -0
  40. package/dist/i18n/es.json +2 -0
  41. package/dist/i18n/fr.json +2 -0
  42. package/dist/i18n/hi.json +2 -0
  43. package/dist/i18n/it.json +2 -0
  44. package/dist/i18n/ja.json +2 -0
  45. package/dist/i18n/ko.json +2 -0
  46. package/dist/i18n/nl.json +2 -0
  47. package/dist/i18n/pt.json +2 -0
  48. package/dist/i18n/ru.json +2 -0
  49. package/dist/i18n/tr.json +2 -0
  50. package/dist/index.browser.cjs +10304 -9700
  51. package/dist/index.browser.cjs.map +4 -4
  52. package/dist/index.node.cjs +10230 -9618
  53. package/dist/index.node.cjs.map +4 -4
  54. package/dist/scss/v2/ChannelPreview/ChannelPreview-layout.scss +24 -0
  55. package/dist/scss/v2/ChannelPreview/ChannelPreview-theme.scss +18 -0
  56. package/package.json +4 -4
@@ -25,6 +25,28 @@
25
25
  }
26
26
  }
27
27
 
28
+ .str-chat__channel-preview-container {
29
+ position: relative;
30
+
31
+ .str-chat__channel-preview__action-buttons {
32
+ position: absolute;
33
+ right: var(--str-chat__spacing-2);
34
+ bottom: var(--str-chat__spacing-3);
35
+ display: flex;
36
+ flex-direction: row;
37
+ align-items: center;
38
+ gap: 1px;
39
+
40
+ .str-chat__channel-preview__action-button {
41
+
42
+ --str-chat-icon-height: 13px;
43
+ cursor: pointer;
44
+ padding-block: 2px;
45
+ padding-inline: 4px;
46
+ }
47
+ }
48
+ }
49
+
28
50
  .str-chat__channel-preview {
29
51
  @include channel-preview-layout;
30
52
  cursor: pointer;
@@ -78,6 +100,8 @@
78
100
  p {
79
101
  @include utils.ellipsis-text;
80
102
  margin: 0;
103
+ // 40px is the width of the two action buttons
104
+ max-width: calc(100% - 40px);
81
105
  }
82
106
  }
83
107
  }
@@ -64,6 +64,24 @@
64
64
  --str-chat__channel-preview-message-time-color: var(--str-chat__message-secondary-color);
65
65
  }
66
66
 
67
+ .str-chat__channel-preview-container {
68
+ .str-chat__channel-preview__action-buttons {
69
+ .str-chat__channel-preview__action-button {
70
+ --str-chat-icon-color: var(--str-chat__text-low-emphasis-color);
71
+ border: none;
72
+ background-color: transparent;
73
+ }
74
+
75
+ .str-chat__channel-preview__action-button--pin.str-chat__channel-preview__action-button--active {
76
+ --str-chat-icon-color: var(--str-chat__unread-badge-color);
77
+ }
78
+
79
+ .str-chat__channel-preview__action-button--archive.str-chat__channel-preview__action-button--active {
80
+ --str-chat-icon-color: var(--str-chat__text-color);
81
+ }
82
+ }
83
+ }
84
+
67
85
  .str-chat__channel-preview {
68
86
  @include utils.component-layer-overrides('channel-preview');
69
87
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-react",
3
- "version": "12.7.0",
3
+ "version": "12.8.0",
4
4
  "description": "React components to create chat conversations or livestream style chat",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -145,7 +145,7 @@
145
145
  "emoji-mart": "^5.4.0",
146
146
  "react": "^18.0.0 || ^17.0.0 || ^16.8.0",
147
147
  "react-dom": "^18.0.0 || ^17.0.0 || ^16.8.0",
148
- "stream-chat": "^8.46.0"
148
+ "stream-chat": "^8.46.1"
149
149
  },
150
150
  "peerDependenciesMeta": {
151
151
  "@breezystack/lamejs": {
@@ -187,7 +187,7 @@
187
187
  "@semantic-release/exec": "^6.0.3",
188
188
  "@semantic-release/git": "^10.0.1",
189
189
  "@stream-io/rollup-plugin-node-builtins": "^2.1.5",
190
- "@stream-io/stream-chat-css": "^5.5.0",
190
+ "@stream-io/stream-chat-css": "^5.6.0",
191
191
  "@testing-library/jest-dom": "^6.1.4",
192
192
  "@testing-library/react": "^13.1.1",
193
193
  "@testing-library/react-hooks": "^8.0.0",
@@ -257,7 +257,7 @@
257
257
  "react-dom": "^18.1.0",
258
258
  "react-test-renderer": "^18.1.0",
259
259
  "semantic-release": "^19.0.5",
260
- "stream-chat": "^8.46.0",
260
+ "stream-chat": "^8.46.1",
261
261
  "ts-jest": "^29.1.4",
262
262
  "typescript": "^5.4.5"
263
263
  },