stream-chat-react 12.4.1 → 12.5.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/dist/assets/icons/stream-chat-icons.eot +0 -0
- package/dist/assets/icons/stream-chat-icons.svg +4 -0
- package/dist/assets/icons/stream-chat-icons.ttf +0 -0
- package/dist/assets/icons/stream-chat-icons.woff +0 -0
- package/dist/assets/icons/stream-chat-icons.woff2 +0 -0
- package/dist/components/Attachment/components/ProgressBar.d.ts +2 -2
- package/dist/components/Attachment/components/ProgressBar.js +2 -1
- package/dist/components/Channel/Channel.d.ts +1 -1
- package/dist/components/Channel/Channel.js +36 -15
- package/dist/components/Channel/constants.d.ts +1 -0
- package/dist/components/Channel/constants.js +1 -0
- package/dist/components/Channel/hooks/useChannelContainerClasses.d.ts +2 -0
- package/dist/components/Channel/hooks/useChannelContainerClasses.js +10 -5
- package/dist/components/ChannelPreview/utils.js +35 -0
- package/dist/components/Chat/hooks/useChat.js +2 -0
- package/dist/components/Dialog/DialogAnchor.d.ts +1 -2
- package/dist/components/Dialog/DialogMenu.d.ts +3 -0
- package/dist/components/Dialog/DialogMenu.js +5 -0
- package/dist/components/Dialog/DialogPortal.d.ts +1 -1
- package/dist/components/Dialog/DialogPortal.js +4 -12
- package/dist/components/Dialog/FormDialog.d.ts +23 -0
- package/dist/components/Dialog/FormDialog.js +72 -0
- package/dist/components/Dialog/PromptDialog.d.ts +8 -0
- package/dist/components/Dialog/PromptDialog.js +7 -0
- package/dist/components/DragAndDrop/DragAndDropContainer.d.ts +7 -0
- package/dist/components/DragAndDrop/DragAndDropContainer.js +93 -0
- package/dist/components/Form/FieldError.d.ts +6 -0
- package/dist/components/Form/FieldError.js +3 -0
- package/dist/components/Form/SwitchField.d.ts +7 -0
- package/dist/components/Form/SwitchField.js +21 -0
- package/dist/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +10 -0
- package/dist/components/InfiniteScrollPaginator/InfiniteScroll.js +10 -0
- package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.d.ts +10 -0
- package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.js +68 -0
- package/dist/components/InfiniteScrollPaginator/hooks/useCursorPaginator.d.ts +18 -0
- package/dist/components/InfiniteScrollPaginator/hooks/useCursorPaginator.js +41 -0
- package/dist/components/Message/MessageSimple.js +5 -1
- package/dist/components/Message/QuotedMessage.js +8 -4
- package/dist/components/Message/hooks/useUserRole.js +3 -2
- package/dist/components/Message/index.d.ts +1 -0
- package/dist/components/MessageInput/AttachmentSelector.d.ts +25 -0
- package/dist/components/MessageInput/AttachmentSelector.js +125 -0
- package/dist/components/MessageInput/EditMessageForm.js +1 -1
- package/dist/components/MessageInput/MessageInput.d.ts +2 -0
- package/dist/components/MessageInput/MessageInput.js +9 -4
- package/dist/components/MessageInput/MessageInputFlat.js +4 -10
- package/dist/components/MessageInput/QuotedMessagePreview.js +7 -3
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.js +3 -1
- package/dist/components/MessageInput/hooks/usePasteHandler.js +5 -8
- package/dist/components/MessageInput/hooks/useSubmitHandler.js +4 -1
- package/dist/components/MessageInput/index.d.ts +1 -0
- package/dist/components/MessageInput/index.js +1 -0
- package/dist/components/Modal/ModalHeader.d.ts +8 -0
- package/dist/components/Modal/ModalHeader.js +6 -0
- package/dist/components/Poll/Poll.d.ts +7 -0
- package/dist/components/Poll/Poll.js +8 -0
- package/dist/components/Poll/PollActions/AddCommentForm.d.ts +7 -0
- package/dist/components/Poll/PollActions/AddCommentForm.js +24 -0
- package/dist/components/Poll/PollActions/EndPollDialog.d.ts +6 -0
- package/dist/components/Poll/PollActions/EndPollDialog.js +19 -0
- package/dist/components/Poll/PollActions/PollAction.d.ts +9 -0
- package/dist/components/Poll/PollActions/PollAction.js +5 -0
- package/dist/components/Poll/PollActions/PollActions.d.ts +17 -0
- package/dist/components/Poll/PollActions/PollActions.js +46 -0
- package/dist/components/Poll/PollActions/PollAnswerList.d.ts +7 -0
- package/dist/components/Poll/PollActions/PollAnswerList.js +28 -0
- package/dist/components/Poll/PollActions/PollOptionsFullList.d.ts +6 -0
- package/dist/components/Poll/PollActions/PollOptionsFullList.js +16 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionVotesList.d.ts +7 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionVotesList.js +18 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithLatestVotes.d.ts +9 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithLatestVotes.js +19 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.d.ts +11 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.js +18 -0
- package/dist/components/Poll/PollActions/PollResults/PollResults.d.ts +6 -0
- package/dist/components/Poll/PollActions/PollResults/PollResults.js +33 -0
- package/dist/components/Poll/PollActions/PollResults/index.d.ts +1 -0
- package/dist/components/Poll/PollActions/PollResults/index.js +1 -0
- package/dist/components/Poll/PollActions/SuggestPollOptionForm.d.ts +7 -0
- package/dist/components/Poll/PollActions/SuggestPollOptionForm.js +37 -0
- package/dist/components/Poll/PollActions/index.d.ts +7 -0
- package/dist/components/Poll/PollActions/index.js +7 -0
- package/dist/components/Poll/PollContent.d.ts +3 -0
- package/dist/components/Poll/PollContent.js +18 -0
- package/dist/components/Poll/PollCreationDialog/OptionFieldSet.d.ts +9 -0
- package/dist/components/Poll/PollCreationDialog/OptionFieldSet.js +70 -0
- package/dist/components/Poll/PollCreationDialog/PollCreationDialog.d.ts +5 -0
- package/dist/components/Poll/PollCreationDialog/PollCreationDialog.js +87 -0
- package/dist/components/Poll/PollCreationDialog/PollCreationDialogControls.d.ts +8 -0
- package/dist/components/Poll/PollCreationDialog/PollCreationDialogControls.js +44 -0
- package/dist/components/Poll/PollCreationDialog/index.d.ts +1 -0
- package/dist/components/Poll/PollCreationDialog/index.js +1 -0
- package/dist/components/Poll/PollCreationDialog/types.d.ts +21 -0
- package/dist/components/Poll/PollCreationDialog/types.js +1 -0
- package/dist/components/Poll/PollHeader.d.ts +3 -0
- package/dist/components/Poll/PollHeader.js +31 -0
- package/dist/components/Poll/PollOptionList.d.ts +6 -0
- package/dist/components/Poll/PollOptionList.js +14 -0
- package/dist/components/Poll/PollOptionSelector.d.ts +19 -0
- package/dist/components/Poll/PollOptionSelector.js +53 -0
- package/dist/components/Poll/PollVote.d.ts +12 -0
- package/dist/components/Poll/PollVote.js +31 -0
- package/dist/components/Poll/QuotedPoll.d.ts +3 -0
- package/dist/components/Poll/QuotedPoll.js +17 -0
- package/dist/components/Poll/constants.d.ts +3 -0
- package/dist/components/Poll/constants.js +3 -0
- package/dist/components/Poll/hooks/index.d.ts +2 -0
- package/dist/components/Poll/hooks/index.js +2 -0
- package/dist/components/Poll/hooks/useManagePollVotesRealtime.d.ts +4 -0
- package/dist/components/Poll/hooks/useManagePollVotesRealtime.js +36 -0
- package/dist/components/Poll/hooks/usePollAnswerPagination.d.ts +13 -0
- package/dist/components/Poll/hooks/usePollAnswerPagination.js +27 -0
- package/dist/components/Poll/hooks/usePollOptionVotesPagination.d.ts +13 -0
- package/dist/components/Poll/hooks/usePollOptionVotesPagination.js +27 -0
- package/dist/components/Poll/index.d.ts +10 -0
- package/dist/components/Poll/index.js +10 -0
- package/dist/components/Portal/Portal.d.ts +6 -0
- package/dist/components/Portal/Portal.js +14 -0
- package/dist/components/ReactFileUtilities/UploadButton.d.ts +11 -1
- package/dist/components/ReactFileUtilities/UploadButton.js +22 -4
- package/dist/components/Thread/Thread.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -0
- package/dist/context/AttachmentSelectorContext.d.ts +8 -0
- package/dist/context/AttachmentSelectorContext.js +6 -0
- package/dist/context/ComponentContext.d.ts +21 -5
- package/dist/context/PollContext.d.ts +11 -0
- package/dist/context/PollContext.js +7 -0
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.js +1 -0
- package/dist/css/v2/index.css +2 -2
- package/dist/css/v2/index.layout.css +2 -2
- package/dist/experimental/index.browser.cjs +129 -117
- package/dist/experimental/index.browser.cjs.map +4 -4
- package/dist/experimental/index.node.cjs +129 -117
- package/dist/experimental/index.node.cjs.map +4 -4
- package/dist/i18n/Streami18n.d.ts +45 -0
- package/dist/i18n/de.json +70 -25
- package/dist/i18n/en.json +46 -1
- package/dist/i18n/es.json +74 -25
- package/dist/i18n/fr.json +83 -34
- package/dist/i18n/hi.json +54 -9
- package/dist/i18n/it.json +75 -26
- package/dist/i18n/ja.json +46 -5
- package/dist/i18n/ko.json +46 -5
- package/dist/i18n/nl.json +59 -14
- package/dist/i18n/pt.json +66 -17
- package/dist/i18n/ru.json +66 -13
- package/dist/i18n/tr.json +77 -32
- package/dist/index.browser.cjs +4229 -1861
- package/dist/index.browser.cjs.map +4 -4
- package/dist/index.node.cjs +4169 -1774
- package/dist/index.node.cjs.map +4 -4
- package/dist/scss/v2/AttachmentPreviewList/AttachmentPreviewList-layout.scss +2 -2
- package/dist/scss/v2/AudioRecorder/AudioRecorder-layout.scss +64 -14
- package/dist/scss/v2/AudioRecorder/AudioRecorder-theme.scss +11 -1
- package/dist/scss/v2/Avatar/Avatar-layout.scss +4 -0
- package/dist/scss/v2/ChannelList/ChannelList-layout.scss +15 -0
- package/dist/scss/v2/Dialog/Dialog-layout.scss +54 -0
- package/dist/scss/v2/Dialog/Dialog-theme.scss +103 -0
- package/dist/scss/v2/DragAndDropContainer/DragAmdDropContainer-layout.scss +5 -0
- package/dist/scss/v2/DragAndDropContainer/DragAndDropContainer-theme.scss +47 -0
- package/dist/scss/v2/Form/Form-layout.scss +9 -0
- package/dist/scss/v2/Form/Form-theme.scss +17 -0
- package/dist/scss/v2/Icon/Icon-layout.scss +6 -1
- package/dist/scss/v2/InfiniteScrollPaginator/InfiniteScrollPaginator-layout.scss +4 -0
- package/dist/scss/v2/MessageActionsBox/MessageActionsBox-layout.scss +0 -9
- package/dist/scss/v2/MessageInput/MessageInput-layout.scss +29 -4
- package/dist/scss/v2/MessageInput/MessageInput-theme.scss +61 -0
- package/dist/scss/v2/Modal/Modal-layout.scss +31 -0
- package/dist/scss/v2/Modal/Modal-theme.scss +6 -0
- package/dist/scss/v2/Notification/MessageNotification-layout.scss +1 -1
- package/dist/scss/v2/Poll/Poll-layout.scss +488 -0
- package/dist/scss/v2/Poll/Poll-theme.scss +206 -0
- package/dist/scss/v2/_base.scss +4 -0
- package/dist/scss/v2/_global-theme-variables.scss +1 -1
- package/dist/scss/v2/_icons.scss +7 -0
- package/dist/scss/v2/index.layout.scss +4 -0
- package/dist/scss/v2/index.scss +4 -0
- package/dist/types/types.d.ts +6 -0
- package/package.json +4 -4
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
@use '../utils';
|
|
2
|
+
|
|
3
|
+
.str-chat__poll {
|
|
4
|
+
$checkmark_size: 1rem;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: 0.5rem;
|
|
8
|
+
padding: 0.75rem 0.675rem;
|
|
9
|
+
max-width: 270px;
|
|
10
|
+
font: var(--str-chat__body-text);
|
|
11
|
+
|
|
12
|
+
button {
|
|
13
|
+
@include utils.button-reset;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.str-chat__checkmark {
|
|
18
|
+
grid-column: 1 / 2;
|
|
19
|
+
grid-row: 1 / 2;
|
|
20
|
+
margin-right: 0.125rem;
|
|
21
|
+
height: $checkmark_size;
|
|
22
|
+
width: $checkmark_size;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.str-chat__checkmark--checked {
|
|
26
|
+
height: calc($checkmark_size + 1px);
|
|
27
|
+
width: calc($checkmark_size + 1px);
|
|
28
|
+
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Im00IDkuNC00LTRMMS40IDQgNCA2LjYgMTAuNiAwIDEyIDEuNGwtOCA4WiIvPjwvc3ZnPg==');
|
|
29
|
+
background-repeat: no-repeat;
|
|
30
|
+
background-position: center;
|
|
31
|
+
background-size: 11px 10px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.str-chat__poll-header {
|
|
35
|
+
.str-chat__poll-title {
|
|
36
|
+
font: var(--str-chat__body-medium-text);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.str-chat__poll-subtitle {
|
|
40
|
+
font: var(--str-chat__caption-text);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.str-chat__poll-actions {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
align-items: center;
|
|
48
|
+
|
|
49
|
+
.str-chat__poll-action {
|
|
50
|
+
padding: 0.675rem;
|
|
51
|
+
font: var(--str-chat__subtitle-text);
|
|
52
|
+
color: var(--str-chat__primary-color);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.str-chat__poll-option-list--full,
|
|
58
|
+
.str-chat__modal__poll-results {
|
|
59
|
+
.str-chat__amount-bar {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.str-chat__poll-option {
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
|
|
67
|
+
&.str-chat__poll-option--full-vote-list {
|
|
68
|
+
cursor: default;
|
|
69
|
+
height: 100%;
|
|
70
|
+
padding: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.str-chat__poll-option-data {
|
|
74
|
+
flex: 1;
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: flex-start;
|
|
77
|
+
font: var(--str-chat__body-text);
|
|
78
|
+
gap: 0.125rem;
|
|
79
|
+
|
|
80
|
+
p {
|
|
81
|
+
margin: 0;
|
|
82
|
+
flex: 1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.str-chat__poll-option-voters {
|
|
86
|
+
--str-chat__avatar-size: 1.175rem;
|
|
87
|
+
display: flex;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
.str-chat__poll-option-list--full {
|
|
94
|
+
.str-chat__poll-option {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: row;
|
|
97
|
+
padding: 1rem 0.75rem;
|
|
98
|
+
|
|
99
|
+
&:nth-of-type(1) {
|
|
100
|
+
padding-top: 1rem;
|
|
101
|
+
border-top-left-radius: var(--str-chat__border-radius-sm);
|
|
102
|
+
border-top-right-radius: var(--str-chat__border-radius-sm);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:last-child {
|
|
106
|
+
padding-bottom: 1rem;
|
|
107
|
+
border-bottom-left-radius: var(--str-chat__border-radius-sm);
|
|
108
|
+
border-bottom-right-radius: var(--str-chat__border-radius-sm);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.str-chat__poll-option-list:not(.str-chat__poll-option-list--full) {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: 1.5rem;
|
|
117
|
+
padding-block: 1rem 0.5rem;
|
|
118
|
+
|
|
119
|
+
.str-chat__poll-option {
|
|
120
|
+
display: grid;
|
|
121
|
+
grid-template-columns: auto 1fr;
|
|
122
|
+
grid-template-rows: 1fr auto;
|
|
123
|
+
gap: 0.125rem;
|
|
124
|
+
|
|
125
|
+
.str-chat__poll-option-data {
|
|
126
|
+
grid-column: 2 / 3;
|
|
127
|
+
grid-row: 1 / 2;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.str-chat__poll-option__votes-bar {
|
|
131
|
+
grid-column: 2 / 3;
|
|
132
|
+
grid-row: 2 / 3;
|
|
133
|
+
height: 0.25rem;
|
|
134
|
+
width: 100%;
|
|
135
|
+
margin-top: 0.25rem;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
.str-chat__modal__poll-results {
|
|
142
|
+
.str-chat__poll-option {
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.str-chat__poll-actions .str-chat__modal {
|
|
149
|
+
.str-chat__modal__close-button {
|
|
150
|
+
display: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.str-chat__modal__inner {
|
|
154
|
+
$content-offset-inline: 1rem;
|
|
155
|
+
padding: 0 0 0.5rem;
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
max-width: 400px;
|
|
158
|
+
|
|
159
|
+
.str-chat__tooltip {
|
|
160
|
+
max-width: 300px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.str-chat__modal__suggest-poll-option {
|
|
164
|
+
.str-chat__form-field-error {
|
|
165
|
+
height: 1rem;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.str-chat__modal__poll-answer-list,
|
|
170
|
+
.str-chat__modal__poll-option-list,
|
|
171
|
+
.str-chat__modal__poll-results {
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
width: 100%;
|
|
175
|
+
height: 100%;
|
|
176
|
+
min-height: 400px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.str-chat__modal__poll-answer-list,
|
|
180
|
+
.str-chat__poll-option--full-vote-list {
|
|
181
|
+
.str-chat__loading-indicator-placeholder {
|
|
182
|
+
display: flex;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
align-items: center;
|
|
185
|
+
width: 100%;
|
|
186
|
+
height: 40px;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.str-chat__modal__poll-option-list__title,
|
|
191
|
+
.str-chat__modal__poll-results__title {
|
|
192
|
+
padding: 1.175rem 1rem;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.str-chat__modal__poll-answer-list__body,
|
|
196
|
+
.str-chat__modal__poll-results__body {
|
|
197
|
+
display: flex;
|
|
198
|
+
flex-direction: column;
|
|
199
|
+
min-height: 0;
|
|
200
|
+
padding-bottom: 1rem;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.str-chat__modal__poll-results__body,
|
|
204
|
+
.str-chat__modal__poll-option-list__body,
|
|
205
|
+
.str-chat__poll-answer-list,
|
|
206
|
+
.str-chat__modal__poll-results__option-list {
|
|
207
|
+
display: flex;
|
|
208
|
+
flex-direction: column;
|
|
209
|
+
flex: 1;
|
|
210
|
+
max-height: 100%;
|
|
211
|
+
min-height: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.str-chat__poll-answer-list {
|
|
215
|
+
padding-bottom: 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.str-chat__modal__poll-results__body,
|
|
219
|
+
.str-chat__modal__poll-option-list__body,
|
|
220
|
+
.str-chat__poll-answer-list {
|
|
221
|
+
overflow-y: auto;
|
|
222
|
+
padding: 0 $content-offset-inline 1.25rem;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.str-chat__poll-answer-list,
|
|
226
|
+
.str-chat__modal__poll-results__option-list {
|
|
227
|
+
gap: 0.5rem;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.str-chat__modal__poll-results__body,
|
|
231
|
+
.str-chat__modal__poll-option-list__body {
|
|
232
|
+
gap: 2rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.str-chat__poll-option__show-all-votes-button {
|
|
236
|
+
padding-bottom: 1rem;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.str-chat__poll-answer {
|
|
240
|
+
display: flex;
|
|
241
|
+
flex-direction: column;
|
|
242
|
+
gap: 1rem;
|
|
243
|
+
padding: 0.75rem 1rem;
|
|
244
|
+
|
|
245
|
+
.str-chat__poll-answer__text {
|
|
246
|
+
margin: 0;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.str-chat__checkmark {
|
|
251
|
+
margin-right: 1rem;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.str-chat__poll-option__header {
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: flex-start;
|
|
257
|
+
gap: 0.25rem;
|
|
258
|
+
width: 100%;
|
|
259
|
+
padding: 0.75rem 1rem;
|
|
260
|
+
|
|
261
|
+
.str-chat__poll-option__option-text {
|
|
262
|
+
flex: 1;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.str-chat__poll-vote {
|
|
267
|
+
display: flex;
|
|
268
|
+
justify-content: space-between;
|
|
269
|
+
align-items: center;
|
|
270
|
+
gap: 0.5rem;
|
|
271
|
+
white-space: nowrap;
|
|
272
|
+
padding-block: 0.375rem;
|
|
273
|
+
|
|
274
|
+
.str-chat__poll-vote__author {
|
|
275
|
+
display: flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
gap: calc(var(--str-chat__spacing-px) * 5);
|
|
278
|
+
min-width: 0;
|
|
279
|
+
|
|
280
|
+
.str-chat__poll-vote__author__name {
|
|
281
|
+
@include utils.ellipsis-text;
|
|
282
|
+
max-width: 130px;
|
|
283
|
+
min-width: 0;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.str-chat__poll-result-option-vote-counter {
|
|
289
|
+
display: flex;
|
|
290
|
+
gap: 0.375rem;
|
|
291
|
+
|
|
292
|
+
.str-chat__poll-result-winning-option-icon {
|
|
293
|
+
height: 1.25rem;
|
|
294
|
+
width: 1.25rem;
|
|
295
|
+
background-image: var(--str-chat__winning-poll-option-icon);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.str-chat__poll-vote-listing {
|
|
302
|
+
padding: 0 1rem 0.75rem;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.str-chat__modal__poll-results--option-detail {
|
|
306
|
+
.str-chat__modal-header__title {
|
|
307
|
+
padding-inline: 1rem;
|
|
308
|
+
flex: 1;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.str-chat__modal__poll-results__body {
|
|
312
|
+
padding-inline: 1rem;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.str-chat__quoted-poll-preview {
|
|
317
|
+
display: flex;
|
|
318
|
+
flex-wrap: wrap;
|
|
319
|
+
gap: 0.5rem;
|
|
320
|
+
align-items: flex-start;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.str-chat__modal.str-chat__create-poll-modal {
|
|
324
|
+
.str-chat__modal__close-button {
|
|
325
|
+
display: none;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.str-chat__modal__inner {
|
|
329
|
+
padding: 0;
|
|
330
|
+
max-height: unset;
|
|
331
|
+
display: block;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.str-chat__poll-creation-dialog {
|
|
335
|
+
width: 100%;
|
|
336
|
+
height: 700px;
|
|
337
|
+
display: flex;
|
|
338
|
+
flex-direction: column;
|
|
339
|
+
|
|
340
|
+
button {
|
|
341
|
+
@include utils.button-reset;
|
|
342
|
+
cursor: pointer;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.str-chat__modal-header {
|
|
346
|
+
padding-block: 14px;
|
|
347
|
+
|
|
348
|
+
.str-chat__modal-header__close-button {
|
|
349
|
+
background-image: var(--str-chat__close-icon);
|
|
350
|
+
background-repeat: no-repeat;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.str-chat__dialog__body {
|
|
355
|
+
flex: 1 1;
|
|
356
|
+
padding: 1rem;
|
|
357
|
+
|
|
358
|
+
form {
|
|
359
|
+
display: flex;
|
|
360
|
+
flex-direction: column;
|
|
361
|
+
gap: 2rem;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.str-chat__form__input-fieldset {
|
|
366
|
+
margin: 0;
|
|
367
|
+
padding: 0;
|
|
368
|
+
|
|
369
|
+
.str-chat__form__input-field {
|
|
370
|
+
width: 100%;
|
|
371
|
+
padding: 1rem;
|
|
372
|
+
|
|
373
|
+
.str-chat__form__input-field__value {
|
|
374
|
+
width: 100%;
|
|
375
|
+
|
|
376
|
+
.str-chat__form__input-field__error {
|
|
377
|
+
width: 100%;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.str-chat__form__input-field--with-label {
|
|
384
|
+
.str-chat__form__input-field__value {
|
|
385
|
+
padding: 1rem;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.str-chat__form__input-field__value input {
|
|
390
|
+
width: 100%;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.str-chat__form__expandable-field {
|
|
394
|
+
padding: 1rem;
|
|
395
|
+
display: flex;
|
|
396
|
+
flex-direction: column;
|
|
397
|
+
gap: 1rem;
|
|
398
|
+
|
|
399
|
+
.str-chat__form__switch-field {
|
|
400
|
+
padding: 0;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.str-chat__form__input-field {
|
|
404
|
+
width: 100%;
|
|
405
|
+
|
|
406
|
+
.str-chat__form__input-field__value {
|
|
407
|
+
padding: 0;
|
|
408
|
+
|
|
409
|
+
.str-chat__form-field-error {
|
|
410
|
+
height: 1rem;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.str-chat__form__input-fieldset__values {
|
|
417
|
+
display: flex;
|
|
418
|
+
flex-direction: column;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.str-chat__form__field-label {
|
|
422
|
+
display: block;
|
|
423
|
+
margin-bottom: 0.5rem;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.str-chat__form__input-field--draggable {
|
|
427
|
+
display: flex;
|
|
428
|
+
align-items: center;
|
|
429
|
+
justify-content: space-between;
|
|
430
|
+
gap: 0.5rem;
|
|
431
|
+
|
|
432
|
+
.str-chat__drag-handle {
|
|
433
|
+
height: 1rem;
|
|
434
|
+
width: 1rem;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.str-chat__form__switch-field {
|
|
439
|
+
width: 100%;
|
|
440
|
+
padding: 1rem;
|
|
441
|
+
|
|
442
|
+
input[type='checkbox'] {
|
|
443
|
+
display: none;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
label {
|
|
447
|
+
display: flex;
|
|
448
|
+
align-items: center;
|
|
449
|
+
justify-content: space-between;
|
|
450
|
+
width: 100%;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.str-chat__form__switch-field__switch {
|
|
454
|
+
display: flex;
|
|
455
|
+
align-items: center;
|
|
456
|
+
width: calc(var(--str-chat__spacing-px) * 52);
|
|
457
|
+
height: calc(var(--str-chat__spacing-px) * 32);
|
|
458
|
+
padding: 0.25rem;
|
|
459
|
+
|
|
460
|
+
.str-chat__form__switch-field__switch-handle {
|
|
461
|
+
height: 1.5rem;
|
|
462
|
+
width: 1.5rem;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
&.str-chat__form__switch-field__switch--on {
|
|
466
|
+
.str-chat__form__switch-field__switch-handle {
|
|
467
|
+
transform: translateX(1.25rem);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
@media only screen and (max-device-width: 768px) {
|
|
476
|
+
.str-chat__modal--open .str-chat__modal__inner {
|
|
477
|
+
width: 90%;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.str-chat__create-poll-modal,
|
|
481
|
+
.str-chat__poll-answer-list-modal,
|
|
482
|
+
.str-chat__poll-results-modal {
|
|
483
|
+
.str-chat__modal__inner {
|
|
484
|
+
height: 90%;
|
|
485
|
+
max-height: unset;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
@mixin field-background {
|
|
2
|
+
background-color: var(--str-chat__tertiary-surface-color);
|
|
3
|
+
border-radius: 0.75rem;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.str-chat__poll {
|
|
7
|
+
.str-chat__poll-header {
|
|
8
|
+
.str-chat__poll-subtitle {
|
|
9
|
+
color: var(--str-chat__text-low-emphasis-color);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.str-chat__checkmark {
|
|
14
|
+
border-radius: var(--str-chat__border-radius-circle);
|
|
15
|
+
border: 1px solid var(--str-chat__disabled-color);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.str-chat__checkmark--checked {
|
|
19
|
+
background-color: var(--str-chat__primary-color);
|
|
20
|
+
border: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.str-chat__poll-option-list {
|
|
24
|
+
.str-chat__poll-option {
|
|
25
|
+
&.str-chat__poll-option--votable:hover {
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.str-chat__poll-option__votes-bar {
|
|
30
|
+
background: linear-gradient(
|
|
31
|
+
to right,
|
|
32
|
+
var(--str-chat__primary-color) var(--str-chat__amount-bar-fulfillment),
|
|
33
|
+
var(--str-chat__surface-color) var(--str-chat__amount-bar-fulfillment)
|
|
34
|
+
);
|
|
35
|
+
border-radius: calc(var(--str-chat__spacing-px) * 4);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.str-chat__poll-option__votes-bar--winner {
|
|
39
|
+
background: linear-gradient(
|
|
40
|
+
to right,
|
|
41
|
+
var(--str-chat__info-color) var(--str-chat__amount-bar-fulfillment),
|
|
42
|
+
var(--str-chat__surface-color) var(--str-chat__amount-bar-fulfillment)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.str-chat__poll-option-list--full,
|
|
49
|
+
.str-chat__poll-answer,
|
|
50
|
+
.str-chat__modal__poll-option-list__title,
|
|
51
|
+
.str-chat__modal__poll-results .str-chat__modal__poll-results__title,
|
|
52
|
+
.str-chat__modal__poll-results .str-chat__poll-option {
|
|
53
|
+
border-radius: 0.75rem;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.str-chat__poll-option-list--full {
|
|
58
|
+
overflow: clip;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.str-chat__poll--closed {
|
|
62
|
+
.str-chat__poll-option {
|
|
63
|
+
&:hover {
|
|
64
|
+
cursor: unset;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.str-chat__poll-actions .str-chat__modal {
|
|
70
|
+
.str-chat__poll-answer__text,
|
|
71
|
+
.str-chat__modal__poll-option-list__title,
|
|
72
|
+
.str-chat__modal__poll-results__title {
|
|
73
|
+
font: var(--str-chat__subtitle-medium-text);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.str-chat__poll-option-list--full,
|
|
77
|
+
.str-chat__poll-answer,
|
|
78
|
+
.str-chat__modal__poll-option-list__title,
|
|
79
|
+
.str-chat__modal__poll-results__title,
|
|
80
|
+
.str-chat__poll-option {
|
|
81
|
+
background-color: var(--str-chat__tertiary-surface-color);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.str-chat__poll-option-list--full {
|
|
85
|
+
.str-chat__poll-option-text {
|
|
86
|
+
font-weight: 500;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.str-chat__poll-option--votable:hover {
|
|
90
|
+
background-color: var(--str-chat__secondary-surface-color)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.str-chat__poll-option {
|
|
95
|
+
.str-chat__poll-option__header {
|
|
96
|
+
font: var(--str-chat__subtitle-text);
|
|
97
|
+
|
|
98
|
+
.str-chat__poll-option__option-text {
|
|
99
|
+
font: var(--str-chat__subtitle-medium-text);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.str-chat__poll-option__show-all-votes-button {
|
|
104
|
+
font: var(--str-chat__subtitle-text);
|
|
105
|
+
color: var(--str-chat__primary-color);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.str-chat__poll-vote {
|
|
112
|
+
.str-chat__poll-vote__author__name {
|
|
113
|
+
text-transform: capitalize;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.str-chat__poll-vote__timestamp {
|
|
117
|
+
color: var(--str-chat__text-low-emphasis-color);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
.str-chat__quoted-poll-preview {
|
|
123
|
+
font: var(--str-chat__body-medium-text);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.str-chat__poll-creation-dialog {
|
|
127
|
+
.str-chat__form__input-fieldset {
|
|
128
|
+
border: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.str-chat__form__expandable-field,
|
|
132
|
+
.str-chat__form__input-field:not(.str-chat__form__input-field--with-label),
|
|
133
|
+
.str-chat__form__input-field--with-label .str-chat__form__input-field__value {
|
|
134
|
+
@include field-background;
|
|
135
|
+
|
|
136
|
+
input {
|
|
137
|
+
border: none;
|
|
138
|
+
background: transparent;
|
|
139
|
+
outline: none;
|
|
140
|
+
|
|
141
|
+
&, &::placeholder {
|
|
142
|
+
font: var(--str-chat__subtitle-text);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.str-chat__form__input-field--draggable {
|
|
148
|
+
input {
|
|
149
|
+
pointer-events: auto;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.str-chat__drag-handle {
|
|
153
|
+
background-color: var(--str-chat__text-low-emphasis-color);
|
|
154
|
+
-webkit-mask: var(--str-chat__handle-icon) no-repeat center / contain;
|
|
155
|
+
mask: var(--str-chat__handle-icon) no-repeat center / contain;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.str-chat__form__input-field--has-error {
|
|
160
|
+
border: 1px solid var(--str-chat__message-error-message-color);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.str-chat__form__expandable-field .str-chat__form__input-field--has-error, {
|
|
164
|
+
border: none;
|
|
165
|
+
|
|
166
|
+
.str-chat__form__input-field__value {
|
|
167
|
+
border: none;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.str-chat__form__input-field--with-label.str-chat__form__input-field--has-error {
|
|
172
|
+
border: none;
|
|
173
|
+
|
|
174
|
+
.str-chat__form__input-field__value {
|
|
175
|
+
border: 1px solid var(--str-chat__message-error-message-color);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.str-chat__form__switch-field {
|
|
180
|
+
@include field-background;
|
|
181
|
+
|
|
182
|
+
&, label {
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.str-chat__form__switch-field__switch {
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
background-color: var(--str-chat__text-low-emphasis-color);
|
|
189
|
+
border-radius: 100px;
|
|
190
|
+
|
|
191
|
+
.str-chat__form__switch-field__switch-handle {
|
|
192
|
+
border-radius: var(--str-chat__border-radius-circle);
|
|
193
|
+
background-color: var(--str-chat__disabled-color);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&.str-chat__form__switch-field__switch--on {
|
|
197
|
+
background-color: var(--str-chat__green600);
|
|
198
|
+
|
|
199
|
+
.str-chat__form__switch-field__switch-handle {
|
|
200
|
+
background-color: var(--str-chat__background-color);
|
|
201
|
+
border-radius: var(--str-chat__border-radius-circle);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
package/dist/scss/v2/_base.scss
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
--str-chat__body2-medium-text: 500 0.9375rem/1.2 var(--str-chat__font-family);
|
|
41
41
|
|
|
42
42
|
/* The font used for subtitle texts */
|
|
43
|
-
--str-chat__subtitle-text: 1rem/1.
|
|
43
|
+
--str-chat__subtitle-text: 1rem/1.25 var(--str-chat__font-family);
|
|
44
44
|
|
|
45
45
|
/* The font used for subtitle texts with emphasize */
|
|
46
46
|
--str-chat__subtitle-medium-text: 500 1rem/1.25 var(--str-chat__font-family);
|