@hh.ru/magritte-ui-chat-input 1.3.3 → 1.3.4
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/index.css +69 -69
- package/index.js +3 -3
- package/internal/ModeTransition.js +1 -1
- package/internal/TextInput.js +1 -1
- package/internal/VoiceRecord.js +12 -6
- package/internal/VoiceRecord.js.map +1 -1
- package/internal/VoiceRecordIndicator.js +1 -1
- package/package.json +2 -2
- package/public/ChatInput.js +1 -1
- package/public/ChatInputChips.js +1 -1
- package/public/ChatInputFile.js +1 -1
- package/public/ChatInputFiles.js +1 -1
- package/public/ChatInputPreview.js +1 -1
- package/styles-DvciMezl.js +5 -0
- package/styles-DvciMezl.js.map +1 -0
- package/styles-DZyb59nH.js +0 -5
- package/styles-DZyb59nH.js.map +0 -1
package/index.css
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
--magritte-gradient-component-chat-input-background-fade-v26-0-2:#1b1b1b00 0%, #1b1b1b 100%;
|
|
36
36
|
--magritte-shadow-level-1-color-v26-0-2:#00000029;
|
|
37
37
|
}
|
|
38
|
-
.magritte-chat-input___P69oN_1-3-
|
|
38
|
+
.magritte-chat-input___P69oN_1-3-4{
|
|
39
39
|
--chat-input-stroke-color:var(--magritte-color-stroke-neutral-v26-0-2);
|
|
40
40
|
--chat-input-focus-shadow:0 0 0 transparent;
|
|
41
41
|
position:relative;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
background-color:var(--magritte-color-background-primary-v26-0-2);
|
|
48
48
|
--magritte-ui-scrollbar-offset-right:-12px;
|
|
49
49
|
}
|
|
50
|
-
.magritte-chat-input___P69oN_1-3-
|
|
50
|
+
.magritte-chat-input___P69oN_1-3-4::after{
|
|
51
51
|
content:'';
|
|
52
52
|
position:absolute;
|
|
53
53
|
z-index:1;
|
|
@@ -56,106 +56,106 @@
|
|
|
56
56
|
box-shadow:inset 0 0 0 1px var(--chat-input-stroke-color);
|
|
57
57
|
pointer-events:none;
|
|
58
58
|
}
|
|
59
|
-
.magritte-chat-input___P69oN_1-3-
|
|
59
|
+
.magritte-chat-input___P69oN_1-3-4.magritte-no-background___eiIY1_1-3-4{
|
|
60
60
|
background:none;
|
|
61
61
|
--chat-input-stroke-color:transparent !important;
|
|
62
62
|
}
|
|
63
|
-
.magritte-chat-input___P69oN_1-3-
|
|
63
|
+
.magritte-chat-input___P69oN_1-3-4:has(*:focus){
|
|
64
64
|
--chat-input-focus-shadow:var(--magritte-shadow-level-1-x-v26-0-2) var(--magritte-shadow-level-1-y-v26-0-2) var(--magritte-shadow-level-1-blur-v26-0-2) var(--magritte-shadow-level-1-spread-v26-0-2) var(--magritte-shadow-level-1-color-v26-0-2);
|
|
65
65
|
}
|
|
66
|
-
.magritte-chat-input___P69oN_1-3-
|
|
66
|
+
.magritte-chat-input___P69oN_1-3-4:has(.magritte-text-input-focused___TfyLu_1-3-4){
|
|
67
67
|
outline:4px solid var(--magritte-color-stroke-state-focused-accessible-v26-0-2);
|
|
68
68
|
}
|
|
69
69
|
@media (min-width: 1020px){
|
|
70
|
-
body.magritte-old-layout .magritte-chat-input___P69oN_1-3-
|
|
70
|
+
body.magritte-old-layout .magritte-chat-input___P69oN_1-3-4:hover{
|
|
71
71
|
--chat-input-stroke-color:var(--magritte-color-stroke-state-neutral-hovered-v26-0-2);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
@media (min-width: 1024px){
|
|
75
|
-
body:not(.magritte-old-layout) .magritte-chat-input___P69oN_1-3-
|
|
75
|
+
body:not(.magritte-old-layout) .magritte-chat-input___P69oN_1-3-4:hover{
|
|
76
76
|
--chat-input-stroke-color:var(--magritte-color-stroke-state-neutral-hovered-v26-0-2);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
.magritte-content-grid___g03sT_1-3-
|
|
79
|
+
.magritte-content-grid___g03sT_1-3-4{
|
|
80
80
|
display:grid;
|
|
81
81
|
grid-template-columns:auto minmax(0, 1fr) auto;
|
|
82
82
|
}
|
|
83
|
-
.magritte-content-grid___g03sT_1-3-
|
|
83
|
+
.magritte-content-grid___g03sT_1-3-4 .magritte-preview___baXKi_1-3-4{
|
|
84
84
|
grid-area:1 / 1 / 2 / -1;
|
|
85
85
|
}
|
|
86
|
-
.magritte-content-grid___g03sT_1-3-
|
|
86
|
+
.magritte-content-grid___g03sT_1-3-4 .magritte-left___7JZYp_1-3-4{
|
|
87
87
|
grid-area:3 / 1;
|
|
88
88
|
align-self:end;
|
|
89
89
|
}
|
|
90
|
-
.magritte-content-grid___g03sT_1-3-
|
|
90
|
+
.magritte-content-grid___g03sT_1-3-4 .magritte-central___zkguj_1-3-4{
|
|
91
91
|
grid-area:3 / 2;
|
|
92
92
|
align-self:center;
|
|
93
93
|
}
|
|
94
|
-
.magritte-content-grid___g03sT_1-3-
|
|
94
|
+
.magritte-content-grid___g03sT_1-3-4 .magritte-right___-tGcO_1-3-4{
|
|
95
95
|
grid-area:3 / 3;
|
|
96
96
|
align-self:end;
|
|
97
97
|
}
|
|
98
|
-
.magritte-content-grid___g03sT_1-3-
|
|
98
|
+
.magritte-content-grid___g03sT_1-3-4 .magritte-scrollbar-cell___--M2x_1-3-4{
|
|
99
99
|
grid-area:2 / 1 / 3 / -1;
|
|
100
100
|
position:relative;
|
|
101
101
|
pointer-events:none;
|
|
102
102
|
}
|
|
103
|
-
.magritte-content-grid___g03sT_1-3-
|
|
103
|
+
.magritte-content-grid___g03sT_1-3-4 .magritte-scrollbar-cell___--M2x_1-3-4 > div{
|
|
104
104
|
pointer-events:auto;
|
|
105
105
|
}
|
|
106
|
-
.magritte-content-grid___g03sT_1-3-
|
|
106
|
+
.magritte-content-grid___g03sT_1-3-4 .magritte-text-input___3AFO4_1-3-4{
|
|
107
107
|
grid-area:3 / 2;
|
|
108
108
|
}
|
|
109
|
-
.magritte-content-grid___g03sT_1-3-
|
|
110
|
-
.magritte-content-grid___g03sT_1-3-
|
|
109
|
+
.magritte-content-grid___g03sT_1-3-4 .magritte-text-input___3AFO4_1-3-4.magritte-layout-vertical___mVTr-_1-3-4,
|
|
110
|
+
.magritte-content-grid___g03sT_1-3-4.magritte-has-central___VRZik_1-3-4 .magritte-text-input___3AFO4_1-3-4{
|
|
111
111
|
grid-area:2 / 1 / 3 / -1;
|
|
112
112
|
}
|
|
113
|
-
.magritte-content-grid___g03sT_1-3-
|
|
113
|
+
.magritte-content-grid___g03sT_1-3-4.magritte-no-left-controls___7r6yy_1-3-4:not(.magritte-has-central___VRZik_1-3-4) .magritte-text-input___3AFO4_1-3-4{
|
|
114
114
|
grid-area:2 / 1 / 4 / 3;
|
|
115
115
|
}
|
|
116
|
-
.magritte-content-grid___g03sT_1-3-
|
|
116
|
+
.magritte-content-grid___g03sT_1-3-4.magritte-no-right-controls___HBSag_1-3-4:not(.magritte-has-central___VRZik_1-3-4) .magritte-text-input___3AFO4_1-3-4{
|
|
117
117
|
grid-area:2 / 2 / 4 / -1;
|
|
118
118
|
}
|
|
119
|
-
.magritte-content-grid___g03sT_1-3-
|
|
119
|
+
.magritte-content-grid___g03sT_1-3-4.magritte-no-left-controls___7r6yy_1-3-4:not(.magritte-has-central___VRZik_1-3-4){
|
|
120
120
|
grid-template-rows:auto minmax(0, 1fr) auto;
|
|
121
121
|
}
|
|
122
|
-
.magritte-right___-tGcO_1-3-
|
|
123
|
-
.magritte-left___7JZYp_1-3-
|
|
122
|
+
.magritte-right___-tGcO_1-3-4,
|
|
123
|
+
.magritte-left___7JZYp_1-3-4{
|
|
124
124
|
display:flex;
|
|
125
125
|
gap:8px;
|
|
126
126
|
}
|
|
127
|
-
.magritte-chips___gLao5_1-3-
|
|
127
|
+
.magritte-chips___gLao5_1-3-4{
|
|
128
128
|
display:flex;
|
|
129
129
|
flex-wrap:nowrap;
|
|
130
130
|
width:max-content;
|
|
131
131
|
gap:8px;
|
|
132
132
|
}
|
|
133
|
-
.magritte-chips-container___-bS5O_1-3-
|
|
133
|
+
.magritte-chips-container___-bS5O_1-3-4{
|
|
134
134
|
padding:0 12px;
|
|
135
135
|
}
|
|
136
|
-
.magritte-no-left-controls___7r6yy_1-3-
|
|
136
|
+
.magritte-no-left-controls___7r6yy_1-3-4 .magritte-chips-container___-bS5O_1-3-4{
|
|
137
137
|
padding-left:0;
|
|
138
138
|
}
|
|
139
|
-
.magritte-no-right-controls___HBSag_1-3-
|
|
139
|
+
.magritte-no-right-controls___HBSag_1-3-4 .magritte-chips-container___-bS5O_1-3-4{
|
|
140
140
|
padding-right:0;
|
|
141
141
|
}
|
|
142
|
-
.magritte-preview-block___iiPdS_1-3-
|
|
142
|
+
.magritte-preview-block___iiPdS_1-3-4{
|
|
143
143
|
display:flex;
|
|
144
144
|
align-items:center;
|
|
145
145
|
gap:12px;
|
|
146
146
|
padding-bottom:8px;
|
|
147
147
|
}
|
|
148
|
-
.magritte-preview-side___ymR-u_1-3-
|
|
148
|
+
.magritte-preview-side___ymR-u_1-3-4{
|
|
149
149
|
display:flex;
|
|
150
150
|
flex-shrink:0;
|
|
151
151
|
}
|
|
152
|
-
.magritte-preview-content___ZgyBD_1-3-
|
|
152
|
+
.magritte-preview-content___ZgyBD_1-3-4{
|
|
153
153
|
display:flex;
|
|
154
154
|
flex:1;
|
|
155
155
|
flex-direction:column;
|
|
156
156
|
min-width:0;
|
|
157
157
|
}
|
|
158
|
-
.magritte-preview-title___SkFeZ_1-3-
|
|
158
|
+
.magritte-preview-title___SkFeZ_1-3-4{
|
|
159
159
|
font-family:"hh sans";
|
|
160
160
|
font-weight:500;
|
|
161
161
|
line-height:18px;
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
text-decoration:none;
|
|
167
167
|
color:var(--magritte-color-text-primary-v26-0-2);
|
|
168
168
|
}
|
|
169
|
-
.magritte-preview-subtitle___58qfR_1-3-
|
|
169
|
+
.magritte-preview-subtitle___58qfR_1-3-4{
|
|
170
170
|
font-family:"hh sans";
|
|
171
171
|
font-weight:400;
|
|
172
172
|
line-height:20px;
|
|
@@ -180,21 +180,21 @@
|
|
|
180
180
|
white-space:nowrap;
|
|
181
181
|
text-overflow:ellipsis;
|
|
182
182
|
}
|
|
183
|
-
.magritte-files-container___zOkRK_1-3-
|
|
183
|
+
.magritte-files-container___zOkRK_1-3-4{
|
|
184
184
|
padding-bottom:8px;
|
|
185
185
|
}
|
|
186
|
-
.magritte-files___j2q5K_1-3-
|
|
186
|
+
.magritte-files___j2q5K_1-3-4{
|
|
187
187
|
display:flex;
|
|
188
188
|
flex-wrap:nowrap;
|
|
189
189
|
align-items:flex-start;
|
|
190
190
|
width:max-content;
|
|
191
191
|
gap:8px;
|
|
192
192
|
}
|
|
193
|
-
.magritte-file___lz9Ll_1-3-
|
|
193
|
+
.magritte-file___lz9Ll_1-3-4{
|
|
194
194
|
position:relative;
|
|
195
195
|
}
|
|
196
|
-
.magritte-file-card___hn5C9_1-3-
|
|
197
|
-
.magritte-file-tile___OVlh3_1-3-
|
|
196
|
+
.magritte-file-card___hn5C9_1-3-4::after,
|
|
197
|
+
.magritte-file-tile___OVlh3_1-3-4::after{
|
|
198
198
|
content:'';
|
|
199
199
|
position:absolute;
|
|
200
200
|
inset:0;
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
border-radius:inherit;
|
|
203
203
|
pointer-events:none;
|
|
204
204
|
}
|
|
205
|
-
.magritte-file-card___hn5C9_1-3-
|
|
205
|
+
.magritte-file-card___hn5C9_1-3-4{
|
|
206
206
|
position:relative;
|
|
207
207
|
box-sizing:border-box;
|
|
208
208
|
width:280px;
|
|
@@ -210,13 +210,13 @@
|
|
|
210
210
|
border-radius:12px;
|
|
211
211
|
background-color:var(--magritte-color-background-primary-v26-0-2);
|
|
212
212
|
}
|
|
213
|
-
.magritte-file-card___hn5C9_1-3-
|
|
213
|
+
.magritte-file-card___hn5C9_1-3-4::after{
|
|
214
214
|
border-color:var(--magritte-color-stroke-neutral-v26-0-2);
|
|
215
215
|
}
|
|
216
|
-
.magritte-file-card-removable___GkxUe_1-3-
|
|
216
|
+
.magritte-file-card-removable___GkxUe_1-3-4{
|
|
217
217
|
padding-right:32px;
|
|
218
218
|
}
|
|
219
|
-
.magritte-file-tile___OVlh3_1-3-
|
|
219
|
+
.magritte-file-tile___OVlh3_1-3-4{
|
|
220
220
|
position:relative;
|
|
221
221
|
display:flex;
|
|
222
222
|
align-items:center;
|
|
@@ -226,41 +226,41 @@
|
|
|
226
226
|
overflow:hidden;
|
|
227
227
|
border-radius:12px;
|
|
228
228
|
}
|
|
229
|
-
.magritte-file-tile___OVlh3_1-3-
|
|
229
|
+
.magritte-file-tile___OVlh3_1-3-4::after{
|
|
230
230
|
border-color:var(--magritte-color-stroke-phantom-v26-0-2);
|
|
231
231
|
}
|
|
232
|
-
.magritte-file-tile-placeholder___yxLuR_1-3-
|
|
232
|
+
.magritte-file-tile-placeholder___yxLuR_1-3-4{
|
|
233
233
|
background-color:var(--magritte-color-background-secondary-v26-0-2);
|
|
234
234
|
}
|
|
235
|
-
.magritte-file-tile-image___cZFgL_1-3-
|
|
235
|
+
.magritte-file-tile-image___cZFgL_1-3-4{
|
|
236
236
|
display:block;
|
|
237
237
|
width:100%;
|
|
238
238
|
height:100%;
|
|
239
239
|
object-fit:cover;
|
|
240
240
|
}
|
|
241
|
-
.magritte-file-remove___S0WB9_1-3-
|
|
241
|
+
.magritte-file-remove___S0WB9_1-3-4{
|
|
242
242
|
position:absolute;
|
|
243
243
|
top:4px;
|
|
244
244
|
right:4px;
|
|
245
245
|
display:flex;
|
|
246
246
|
}
|
|
247
|
-
.magritte-file-name___L03-O_1-3-
|
|
247
|
+
.magritte-file-name___L03-O_1-3-4{
|
|
248
248
|
display:flex;
|
|
249
249
|
min-width:0;
|
|
250
250
|
}
|
|
251
|
-
.magritte-file-name-base___ojdp6_1-3-
|
|
251
|
+
.magritte-file-name-base___ojdp6_1-3-4{
|
|
252
252
|
overflow:hidden;
|
|
253
253
|
white-space:nowrap;
|
|
254
254
|
text-overflow:ellipsis;
|
|
255
255
|
}
|
|
256
|
-
.magritte-file-name-extension___3QZtS_1-3-
|
|
256
|
+
.magritte-file-name-extension___3QZtS_1-3-4{
|
|
257
257
|
flex-shrink:0;
|
|
258
258
|
white-space:nowrap;
|
|
259
259
|
}
|
|
260
|
-
.magritte-text-input-wrapper___TPbwC_1-3-
|
|
260
|
+
.magritte-text-input-wrapper___TPbwC_1-3-4{
|
|
261
261
|
display:contents;
|
|
262
262
|
}
|
|
263
|
-
.magritte-text-input___3AFO4_1-3-
|
|
263
|
+
.magritte-text-input___3AFO4_1-3-4{
|
|
264
264
|
box-sizing:content-box;
|
|
265
265
|
padding:0 12px;
|
|
266
266
|
border:none;
|
|
@@ -284,32 +284,32 @@
|
|
|
284
284
|
text-decoration:none;
|
|
285
285
|
color:var(--magritte-color-text-primary-v26-0-2);
|
|
286
286
|
}
|
|
287
|
-
.magritte-text-input___3AFO4_1-3-
|
|
287
|
+
.magritte-text-input___3AFO4_1-3-4::placeholder{
|
|
288
288
|
color:var(--magritte-color-text-tertiary-v26-0-2);
|
|
289
289
|
opacity:1;
|
|
290
290
|
}
|
|
291
|
-
.magritte-text-input___3AFO4_1-3-
|
|
292
|
-
.magritte-text-input___3AFO4_1-3-
|
|
291
|
+
.magritte-text-input___3AFO4_1-3-4:focus,
|
|
292
|
+
.magritte-text-input___3AFO4_1-3-4:focus-visible{
|
|
293
293
|
border:none;
|
|
294
294
|
outline:none;
|
|
295
295
|
}
|
|
296
|
-
.magritte-text-input___3AFO4_1-3-
|
|
297
|
-
.magritte-text-input___3AFO4_1-3-
|
|
296
|
+
.magritte-text-input___3AFO4_1-3-4.magritte-with-top-fade___okgqo_1-3-4,
|
|
297
|
+
.magritte-text-input___3AFO4_1-3-4.magritte-with-bottom-fade___82gr8_1-3-4{
|
|
298
298
|
-webkit-mask:var(--fade-top) top / 100% 16px no-repeat, linear-gradient(#000, #000) center / 100% calc(100% - 32px) no-repeat, var(--fade-bottom) bottom / 100% 16px no-repeat;
|
|
299
299
|
mask:var(--fade-top) top / 100% 16px no-repeat, linear-gradient(#000, #000) center / 100% calc(100% - 32px) no-repeat, var(--fade-bottom) bottom / 100% 16px no-repeat;
|
|
300
300
|
}
|
|
301
|
-
.magritte-text-input___3AFO4_1-3-
|
|
301
|
+
.magritte-text-input___3AFO4_1-3-4.magritte-with-top-fade___okgqo_1-3-4{
|
|
302
302
|
--fade-top:linear-gradient(180deg, var(--magritte-gradient-component-chat-input-background-fade-v26-0-2));
|
|
303
303
|
}
|
|
304
|
-
.magritte-text-input___3AFO4_1-3-
|
|
304
|
+
.magritte-text-input___3AFO4_1-3-4.magritte-with-bottom-fade___82gr8_1-3-4{
|
|
305
305
|
--fade-bottom:linear-gradient(0deg, var(--magritte-gradient-component-chat-input-background-fade-v26-0-2));
|
|
306
306
|
}
|
|
307
|
-
.magritte-text-input___3AFO4_1-3-
|
|
307
|
+
.magritte-text-input___3AFO4_1-3-4.magritte-measure___xNKc0_1-3-4{
|
|
308
308
|
height:20px !important;
|
|
309
309
|
padding:0 !important;
|
|
310
310
|
margin:0 !important;
|
|
311
311
|
}
|
|
312
|
-
.magritte-voice-record___p64PV_1-3-
|
|
312
|
+
.magritte-voice-record___p64PV_1-3-4{
|
|
313
313
|
display:flex;
|
|
314
314
|
align-items:center;
|
|
315
315
|
justify-content:space-between;
|
|
@@ -319,45 +319,45 @@
|
|
|
319
319
|
min-height:40px;
|
|
320
320
|
gap:8px;
|
|
321
321
|
}
|
|
322
|
-
.magritte-voice-record-left___njEt-_1-3-
|
|
322
|
+
.magritte-voice-record-left___njEt-_1-3-4{
|
|
323
323
|
display:flex;
|
|
324
324
|
align-items:center;
|
|
325
325
|
gap:8px;
|
|
326
326
|
min-width:0;
|
|
327
327
|
}
|
|
328
|
-
.magritte-voice-record-right___UTv-U_1-3-
|
|
328
|
+
.magritte-voice-record-right___UTv-U_1-3-4{
|
|
329
329
|
display:flex;
|
|
330
330
|
align-items:center;
|
|
331
331
|
gap:8px;
|
|
332
332
|
}
|
|
333
|
-
.magritte-voice-record-right___UTv-U_1-3-
|
|
333
|
+
.magritte-voice-record-right___UTv-U_1-3-4.magritte-voice-processing___C0xnX_1-3-4{
|
|
334
334
|
padding:8px;
|
|
335
335
|
}
|
|
336
|
-
.magritte-voice-record-indicator___V8ybb_1-3-
|
|
336
|
+
.magritte-voice-record-indicator___V8ybb_1-3-4{
|
|
337
337
|
display:flex;
|
|
338
338
|
flex-shrink:0;
|
|
339
339
|
align-items:center;
|
|
340
340
|
gap:2px;
|
|
341
341
|
}
|
|
342
|
-
.magritte-voice-record-indicator-bar___jgyqz_1-3-
|
|
342
|
+
.magritte-voice-record-indicator-bar___jgyqz_1-3-4{
|
|
343
343
|
width:2px;
|
|
344
344
|
min-height:2px;
|
|
345
345
|
max-height:2px;
|
|
346
346
|
border-radius:1000px;
|
|
347
347
|
background-color:var(--magritte-color-icon-tertiary-v26-0-2);
|
|
348
348
|
transition:max-height var(--magritte-semantic-animation-time-s-duration-v26-0-2) var(--magritte-semantic-animation-ease-base-timing-function-v26-0-2);
|
|
349
|
-
animation:magritte-voice-record-indicator-wave___4VsyE_1-3-
|
|
349
|
+
animation:magritte-voice-record-indicator-wave___4VsyE_1-3-4 400ms linear infinite alternate paused;
|
|
350
350
|
}
|
|
351
|
-
.magritte-voice-record-indicator-has-sound___67t5g_1-3-
|
|
351
|
+
.magritte-voice-record-indicator-has-sound___67t5g_1-3-4 .magritte-voice-record-indicator-bar___jgyqz_1-3-4{
|
|
352
352
|
max-height:27px;
|
|
353
353
|
animation-play-state:running;
|
|
354
354
|
}
|
|
355
355
|
@media (prefers-reduced-motion: reduce){
|
|
356
|
-
.magritte-voice-record-indicator-has-sound___67t5g_1-3-
|
|
356
|
+
.magritte-voice-record-indicator-has-sound___67t5g_1-3-4 .magritte-voice-record-indicator-bar___jgyqz_1-3-4{
|
|
357
357
|
animation-play-state:paused;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
@keyframes magritte-voice-record-indicator-wave___4VsyE_1-3-
|
|
360
|
+
@keyframes magritte-voice-record-indicator-wave___4VsyE_1-3-4{
|
|
361
361
|
from{
|
|
362
362
|
height:calc(var(--target-height) * 0.62px);
|
|
363
363
|
}
|
|
@@ -365,12 +365,12 @@
|
|
|
365
365
|
height:calc(var(--target-height) * 1.22px);
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
.magritte-mode-container___nATVD_1-3-
|
|
368
|
+
.magritte-mode-container___nATVD_1-3-4{
|
|
369
369
|
position:relative;
|
|
370
370
|
display:grid;
|
|
371
371
|
align-content:end;
|
|
372
372
|
}
|
|
373
|
-
.magritte-voice-overlay___LbxAI_1-3-
|
|
373
|
+
.magritte-voice-overlay___LbxAI_1-3-4{
|
|
374
374
|
position:absolute;
|
|
375
375
|
right:0;
|
|
376
376
|
bottom:0;
|
package/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import './internal/ChatInputContext.js';
|
|
|
10
10
|
import './internal/ModeTransition.js';
|
|
11
11
|
import 'motion/react';
|
|
12
12
|
import '@hh.ru/magritte-design-tokens/core-tokens';
|
|
13
|
-
import './styles-
|
|
13
|
+
import './styles-DvciMezl.js';
|
|
14
14
|
import './internal/TextInput.js';
|
|
15
15
|
import './internal/useSendOnEnter.js';
|
|
16
16
|
import '@hh.ru/magritte-common-keyboard';
|
|
@@ -21,13 +21,13 @@ import './internal/FocusTarget.js';
|
|
|
21
21
|
import './internal/focusGroup.js';
|
|
22
22
|
import './internal/VoiceRecordIndicator.js';
|
|
23
23
|
import './internal/useHasSound.js';
|
|
24
|
+
import './internal/voiceSlotRegistry.js';
|
|
25
|
+
import '@hh.ru/magritte-internal-slot-registry';
|
|
24
26
|
import '@hh.ru/magritte-ui-icon/icon';
|
|
25
27
|
import '@hh.ru/magritte-ui-loader';
|
|
26
28
|
import '@hh.ru/magritte-ui-typography';
|
|
27
29
|
import './internal/useRovingFocusGroup.js';
|
|
28
30
|
import './internal/useVoiceRecordSession.js';
|
|
29
|
-
import './internal/voiceSlotRegistry.js';
|
|
30
|
-
import '@hh.ru/magritte-internal-slot-registry';
|
|
31
31
|
import './public/ChatInputChips.js';
|
|
32
32
|
import './internal/flattenFragments.js';
|
|
33
33
|
import './slotDefaults.js';
|
|
@@ -2,7 +2,7 @@ import './../index.css';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useReducedMotion, motion } from 'motion/react';
|
|
4
4
|
import CoreTokens from '@hh.ru/magritte-design-tokens/core-tokens';
|
|
5
|
-
import { s as styles } from '../styles-
|
|
5
|
+
import { s as styles } from '../styles-DvciMezl.js';
|
|
6
6
|
|
|
7
7
|
const EASE_BASE = CoreTokens["magritte-semantic-animation-ease-base"];
|
|
8
8
|
const MODE_TRANSITION_DURATION_MS = CoreTokens["magritte-semantic-animation-time-s"].duration;
|
package/internal/TextInput.js
CHANGED
|
@@ -5,7 +5,7 @@ import classNames from 'classnames';
|
|
|
5
5
|
import { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';
|
|
6
6
|
import { useSendOnEnter } from './useSendOnEnter.js';
|
|
7
7
|
import { useScrollbar, Scrollbar } from '@hh.ru/magritte-ui-scrollbar';
|
|
8
|
-
import { s as styles } from '../styles-
|
|
8
|
+
import { s as styles } from '../styles-DvciMezl.js';
|
|
9
9
|
import '@hh.ru/magritte-common-keyboard';
|
|
10
10
|
|
|
11
11
|
const MIN_HEIGHT = 20;
|
package/internal/VoiceRecord.js
CHANGED
|
@@ -6,16 +6,20 @@ import { useTranslation } from '@hh.ru/magritte-common-use-translation';
|
|
|
6
6
|
import { FocusTarget } from './FocusTarget.js';
|
|
7
7
|
import { VoiceRecordIndicator } from './VoiceRecordIndicator.js';
|
|
8
8
|
import { FOCUS_PRIORITY } from './focusGroup.js';
|
|
9
|
+
import { useVoiceConfig } from './voiceSlotRegistry.js';
|
|
9
10
|
import { CrossOutlinedSize24, CheckOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';
|
|
10
11
|
import { Loader } from '@hh.ru/magritte-ui-loader';
|
|
11
12
|
import { Text } from '@hh.ru/magritte-ui-typography';
|
|
12
|
-
import { s as styles } from '../styles-
|
|
13
|
+
import { s as styles } from '../styles-DvciMezl.js';
|
|
13
14
|
import './useHasSound.js';
|
|
15
|
+
import '@hh.ru/magritte-internal-slot-registry';
|
|
14
16
|
|
|
15
|
-
const formatDuration = (
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
const formatDuration = (elapsedSeconds, maxDuration) => {
|
|
18
|
+
const isCountdown = maxDuration !== void 0;
|
|
19
|
+
const totalTime = isCountdown ? Math.max(0, maxDuration - elapsedSeconds) : elapsedSeconds;
|
|
20
|
+
const minutes = Math.floor(totalTime / 60);
|
|
21
|
+
const seconds = totalTime % 60;
|
|
22
|
+
return `${isCountdown ? "-" : ""}${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}`;
|
|
19
23
|
};
|
|
20
24
|
const useElapsedSeconds = (startedAt, active) => {
|
|
21
25
|
const [elapsedSeconds, setElapsedSeconds] = useState(0);
|
|
@@ -47,10 +51,12 @@ const VoiceRecord = ({
|
|
|
47
51
|
const completeLabel = useTranslation("ChatInput", "completeRecord");
|
|
48
52
|
const cancelLabel = useTranslation("ChatInput", "cancelRecord");
|
|
49
53
|
const processingTrl = useTranslation("ChatInput", "processingLabel");
|
|
54
|
+
const voiceConfig = useVoiceConfig();
|
|
55
|
+
const maxDuration = voiceConfig?.maxDuration;
|
|
50
56
|
return /* @__PURE__ */ jsxs("div", { className: styles.voiceRecord, "data-qa": dataQa, children: [
|
|
51
57
|
/* @__PURE__ */ jsxs("div", { className: styles.voiceRecordLeft, children: [
|
|
52
58
|
/* @__PURE__ */ jsx(VoiceRecordIndicator, { stream }),
|
|
53
|
-
/* @__PURE__ */ jsx(Text, { typography: "label-3-regular", style: "tertiary", ellipsis: true, children: isProcessing ? processingLabel ?? processingTrl : formatDuration(elapsedSeconds) })
|
|
59
|
+
/* @__PURE__ */ jsx(Text, { typography: "label-3-regular", style: "tertiary", ellipsis: true, children: isProcessing ? processingLabel ?? processingTrl : formatDuration(elapsedSeconds, maxDuration) })
|
|
54
60
|
] }),
|
|
55
61
|
/* @__PURE__ */ jsx("div", { className: classNames(styles.voiceRecordRight, { [styles.voiceProcessing]: isProcessing }), children: isProcessing ? /* @__PURE__ */ jsx(Loader, { size: 24, color: "secondary" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56
62
|
/* @__PURE__ */ jsx(FocusTarget, { priority: FOCUS_PRIORITY.voiceCancel, children: /* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceRecord.js","sources":["src/internal/VoiceRecord.tsx"],"sourcesContent":["import { type FC, useEffect, useState } from 'react';\nimport classNames from 'classnames';\n\nimport { useTranslation } from '@hh.ru/magritte-common-use-translation';\nimport { FocusTarget } from '@hh.ru/magritte-ui-chat-input/internal/FocusTarget';\nimport { VoiceRecordIndicator } from '@hh.ru/magritte-ui-chat-input/internal/VoiceRecordIndicator';\nimport { FOCUS_PRIORITY } from '@hh.ru/magritte-ui-chat-input/internal/focusGroup';\nimport { type ChatInputButtonAria } from '@hh.ru/magritte-ui-chat-input/types';\nimport { CheckOutlinedSize24, CrossOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';\nimport { Loader } from '@hh.ru/magritte-ui-loader';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from '../styles.less';\n\nexport type VoiceRecordMode = 'recording' | 'processing';\n\n// чисто презентационный блок: всё состояние (режим, таймер) приходит пропсами\n// из сессии записи (useVoiceRecordSession), кнопки только дёргают колбэки\nexport interface VoiceRecordProps {\n mode: VoiceRecordMode;\n /** Живой стрим микрофона во время записи (null в обработке) — индикатор по нему определяет,\n * есть ли сейчас звук */\n stream: MediaStream | null;\n /** Метка старта записи (`Date.now()`); `null` вне записи. Таймер `mm:ss` тикаем локально,\n * чтобы посекундное обновление не ререндерило корень ChatInput */\n startedAt: number | null;\n /** Текст в состоянии обработки (вместо таймера), например «Обрабатываю запись» */\n processingLabel?: string;\n /** Нажата кнопка подтверждения (check) */\n onComplete: VoidFunction;\n /** Нажата кнопка отмены (cross) */\n onCancel: VoidFunction;\n /** aria/data-qa пропсы кнопки подтверждения (галочка) */\n completeButtonProps?: ChatInputButtonAria;\n /** aria/data-qa пропсы кнопки отмены (крестик) */\n cancelButtonProps?: ChatInputButtonAria;\n 'data-qa'?: string;\n}\n\nconst formatDuration = (
|
|
1
|
+
{"version":3,"file":"VoiceRecord.js","sources":["src/internal/VoiceRecord.tsx"],"sourcesContent":["import { type FC, useEffect, useState } from 'react';\nimport classNames from 'classnames';\n\nimport { useTranslation } from '@hh.ru/magritte-common-use-translation';\nimport { FocusTarget } from '@hh.ru/magritte-ui-chat-input/internal/FocusTarget';\nimport { VoiceRecordIndicator } from '@hh.ru/magritte-ui-chat-input/internal/VoiceRecordIndicator';\nimport { FOCUS_PRIORITY } from '@hh.ru/magritte-ui-chat-input/internal/focusGroup';\nimport { useVoiceConfig } from '@hh.ru/magritte-ui-chat-input/internal/voiceSlotRegistry';\nimport { type ChatInputButtonAria } from '@hh.ru/magritte-ui-chat-input/types';\nimport { CheckOutlinedSize24, CrossOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';\nimport { Loader } from '@hh.ru/magritte-ui-loader';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from '../styles.less';\n\nexport type VoiceRecordMode = 'recording' | 'processing';\n\n// чисто презентационный блок: всё состояние (режим, таймер) приходит пропсами\n// из сессии записи (useVoiceRecordSession), кнопки только дёргают колбэки\nexport interface VoiceRecordProps {\n mode: VoiceRecordMode;\n /** Живой стрим микрофона во время записи (null в обработке) — индикатор по нему определяет,\n * есть ли сейчас звук */\n stream: MediaStream | null;\n /** Метка старта записи (`Date.now()`); `null` вне записи. Таймер `mm:ss` тикаем локально,\n * чтобы посекундное обновление не ререндерило корень ChatInput */\n startedAt: number | null;\n /** Текст в состоянии обработки (вместо таймера), например «Обрабатываю запись» */\n processingLabel?: string;\n /** Нажата кнопка подтверждения (check) */\n onComplete: VoidFunction;\n /** Нажата кнопка отмены (cross) */\n onCancel: VoidFunction;\n /** aria/data-qa пропсы кнопки подтверждения (галочка) */\n completeButtonProps?: ChatInputButtonAria;\n /** aria/data-qa пропсы кнопки отмены (крестик) */\n cancelButtonProps?: ChatInputButtonAria;\n 'data-qa'?: string;\n}\n\nconst formatDuration = (elapsedSeconds: number, maxDuration?: number): string => {\n const isCountdown = maxDuration !== undefined;\n const totalTime = isCountdown ? Math.max(0, maxDuration - elapsedSeconds) : elapsedSeconds;\n const minutes = Math.floor(totalTime / 60);\n const seconds = totalTime % 60;\n return `${isCountdown ? '-' : ''}${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;\n};\n\nconst useElapsedSeconds = (startedAt: number | null, active: boolean): number => {\n const [elapsedSeconds, setElapsedSeconds] = useState(0);\n\n useEffect(() => {\n if (!active || startedAt === null) {\n setElapsedSeconds(0);\n return undefined;\n }\n const update = () => setElapsedSeconds(Math.max(0, Math.floor((Date.now() - startedAt) / 1000)));\n update();\n const intervalId = setInterval(update, 1000);\n return () => clearInterval(intervalId);\n }, [startedAt, active]);\n\n return elapsedSeconds;\n};\n\nexport const VoiceRecord: FC<VoiceRecordProps> = ({\n mode,\n stream,\n startedAt,\n processingLabel,\n onComplete,\n onCancel,\n completeButtonProps,\n cancelButtonProps,\n 'data-qa': dataQa,\n}) => {\n const isProcessing = mode === 'processing';\n const elapsedSeconds = useElapsedSeconds(startedAt, !isProcessing);\n const completeLabel = useTranslation('ChatInput', 'completeRecord');\n const cancelLabel = useTranslation('ChatInput', 'cancelRecord');\n const processingTrl = useTranslation('ChatInput', 'processingLabel');\n const voiceConfig = useVoiceConfig();\n const maxDuration = voiceConfig?.maxDuration;\n\n return (\n <div className={styles.voiceRecord} data-qa={dataQa}>\n <div className={styles.voiceRecordLeft}>\n <VoiceRecordIndicator stream={stream} />\n <Text typography=\"label-3-regular\" style=\"tertiary\" ellipsis>\n {isProcessing ? (processingLabel ?? processingTrl) : formatDuration(elapsedSeconds, maxDuration)}\n </Text>\n </div>\n <div className={classNames(styles.voiceRecordRight, { [styles.voiceProcessing]: isProcessing })}>\n {isProcessing ? (\n <Loader size={24} color=\"secondary\" />\n ) : (\n <>\n <FocusTarget priority={FOCUS_PRIORITY.voiceCancel}>\n <CrossOutlinedSize24\n aria-label={cancelLabel}\n data-qa=\"record-cancel\"\n {...cancelButtonProps}\n borderRadius={12}\n padding={8}\n initialColor=\"secondary\"\n onClick={onCancel}\n />\n </FocusTarget>\n <FocusTarget priority={FOCUS_PRIORITY.voiceComplete}>\n <CheckOutlinedSize24\n aria-label={completeLabel}\n data-qa=\"record-complete\"\n {...completeButtonProps}\n borderRadius={12}\n padding={8}\n initialColor=\"inverse\"\n backgroundStyle=\"constant\"\n onClick={onComplete}\n />\n </FocusTarget>\n </>\n )}\n </div>\n </div>\n );\n};\n\nVoiceRecord.displayName = 'ChatInput.VoiceRecord';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAwCA,MAAM,cAAA,GAAiB,CAAC,cAAA,EAAwB,WAAiC,KAAA;AAC7E,EAAA,MAAM,cAAc,WAAgB,KAAA,KAAA,CAAA,CAAA;AACpC,EAAA,MAAM,YAAY,WAAc,GAAA,IAAA,CAAK,IAAI,CAAG,EAAA,WAAA,GAAc,cAAc,CAAI,GAAA,cAAA,CAAA;AAC5E,EAAA,MAAM,OAAU,GAAA,IAAA,CAAK,KAAM,CAAA,SAAA,GAAY,EAAE,CAAA,CAAA;AACzC,EAAA,MAAM,UAAU,SAAY,GAAA,EAAA,CAAA;AAC5B,EAAA,OAAO,GAAG,WAAc,GAAA,GAAA,GAAM,EAAE,CAAG,EAAA,MAAA,CAAO,OAAO,CAAE,CAAA,QAAA,CAAS,GAAG,GAAG,CAAC,IAAI,MAAO,CAAA,OAAO,EAAE,QAAS,CAAA,CAAA,EAAG,GAAG,CAAC,CAAA,CAAA,CAAA;AAC3G,CAAA,CAAA;AAEA,MAAM,iBAAA,GAAoB,CAAC,SAAA,EAA0B,MAA4B,KAAA;AAC7E,EAAA,MAAM,CAAC,cAAA,EAAgB,iBAAiB,CAAA,GAAI,SAAS,CAAC,CAAA,CAAA;AAEtD,EAAA,SAAA,CAAU,MAAM;AACZ,IAAI,IAAA,CAAC,MAAU,IAAA,SAAA,KAAc,IAAM,EAAA;AAC/B,MAAA,iBAAA,CAAkB,CAAC,CAAA,CAAA;AACnB,MAAO,OAAA,KAAA,CAAA,CAAA;AAAA,KACX;AACA,IAAA,MAAM,MAAS,GAAA,MAAM,iBAAkB,CAAA,IAAA,CAAK,IAAI,CAAG,EAAA,IAAA,CAAK,KAAO,CAAA,CAAA,IAAA,CAAK,GAAI,EAAA,GAAI,SAAa,IAAA,GAAI,CAAC,CAAC,CAAA,CAAA;AAC/F,IAAO,MAAA,EAAA,CAAA;AACP,IAAM,MAAA,UAAA,GAAa,WAAY,CAAA,MAAA,EAAQ,GAAI,CAAA,CAAA;AAC3C,IAAO,OAAA,MAAM,cAAc,UAAU,CAAA,CAAA;AAAA,GACtC,EAAA,CAAC,SAAW,EAAA,MAAM,CAAC,CAAA,CAAA;AAEtB,EAAO,OAAA,cAAA,CAAA;AACX,CAAA,CAAA;AAEO,MAAM,cAAoC,CAAC;AAAA,EAC9C,IAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,eAAA;AAAA,EACA,UAAA;AAAA,EACA,QAAA;AAAA,EACA,mBAAA;AAAA,EACA,iBAAA;AAAA,EACA,SAAW,EAAA,MAAA;AACf,CAAM,KAAA;AACF,EAAA,MAAM,eAAe,IAAS,KAAA,YAAA,CAAA;AAC9B,EAAA,MAAM,cAAiB,GAAA,iBAAA,CAAkB,SAAW,EAAA,CAAC,YAAY,CAAA,CAAA;AACjE,EAAM,MAAA,aAAA,GAAgB,cAAe,CAAA,WAAA,EAAa,gBAAgB,CAAA,CAAA;AAClE,EAAM,MAAA,WAAA,GAAc,cAAe,CAAA,WAAA,EAAa,cAAc,CAAA,CAAA;AAC9D,EAAM,MAAA,aAAA,GAAgB,cAAe,CAAA,WAAA,EAAa,iBAAiB,CAAA,CAAA;AACnE,EAAA,MAAM,cAAc,cAAe,EAAA,CAAA;AACnC,EAAA,MAAM,cAAc,WAAa,EAAA,WAAA,CAAA;AAEjC,EAAA,4BACK,KAAI,EAAA,EAAA,SAAA,EAAW,MAAO,CAAA,WAAA,EAAa,WAAS,MACzC,EAAA,QAAA,EAAA;AAAA,oBAAC,IAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,MAAA,CAAO,eACnB,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,wBAAqB,MAAgB,EAAA,CAAA;AAAA,sBACrC,GAAA,CAAA,IAAA,EAAA,EAAK,UAAW,EAAA,iBAAA,EAAkB,OAAM,UAAW,EAAA,QAAA,EAAQ,IACvD,EAAA,QAAA,EAAA,YAAA,GAAgB,eAAmB,IAAA,aAAA,GAAiB,cAAe,CAAA,cAAA,EAAgB,WAAW,CACnG,EAAA,CAAA;AAAA,KACJ,EAAA,CAAA;AAAA,oBACA,GAAA,CAAC,SAAI,SAAW,EAAA,UAAA,CAAW,OAAO,gBAAkB,EAAA,EAAE,CAAC,MAAA,CAAO,eAAe,GAAG,cAAc,CAAA,EACzF,yCACI,GAAA,CAAA,MAAA,EAAA,EAAO,MAAM,EAAI,EAAA,KAAA,EAAM,WAAY,EAAA,CAAA,mBAGhC,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAC,GAAA,CAAA,WAAA,EAAA,EAAY,QAAU,EAAA,cAAA,CAAe,WAClC,EAAA,QAAA,kBAAA,GAAA;AAAA,QAAC,mBAAA;AAAA,QAAA;AAAA,UACG,YAAY,EAAA,WAAA;AAAA,UACZ,SAAQ,EAAA,eAAA;AAAA,UACP,GAAG,iBAAA;AAAA,UACJ,YAAc,EAAA,EAAA;AAAA,UACd,OAAS,EAAA,CAAA;AAAA,UACT,YAAa,EAAA,WAAA;AAAA,UACb,OAAS,EAAA,QAAA;AAAA,SAAA;AAAA,OAEjB,EAAA,CAAA;AAAA,sBACC,GAAA,CAAA,WAAA,EAAA,EAAY,QAAU,EAAA,cAAA,CAAe,aAClC,EAAA,QAAA,kBAAA,GAAA;AAAA,QAAC,mBAAA;AAAA,QAAA;AAAA,UACG,YAAY,EAAA,aAAA;AAAA,UACZ,SAAQ,EAAA,iBAAA;AAAA,UACP,GAAG,mBAAA;AAAA,UACJ,YAAc,EAAA,EAAA;AAAA,UACd,OAAS,EAAA,CAAA;AAAA,UACT,YAAa,EAAA,SAAA;AAAA,UACb,eAAgB,EAAA,UAAA;AAAA,UAChB,OAAS,EAAA,UAAA;AAAA,SAAA;AAAA,OAEjB,EAAA,CAAA;AAAA,KAAA,EACJ,CAER,EAAA,CAAA;AAAA,GACJ,EAAA,CAAA,CAAA;AAER,EAAA;AAEA,WAAA,CAAY,WAAc,GAAA,uBAAA;;;;"}
|
|
@@ -2,7 +2,7 @@ import './../index.css';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { useHasSound } from './useHasSound.js';
|
|
5
|
-
import { s as styles } from '../styles-
|
|
5
|
+
import { s as styles } from '../styles-DvciMezl.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
|
|
8
8
|
const TARGET_HEIGHT = [2, 11, 22, 22, 22, 11, 22, 11, 6, 2];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-chat-input",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"@hh.ru/magritte-ui-scrollbar": "1.1.0",
|
|
48
48
|
"@hh.ru/magritte-ui-typography": "5.3.17"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "166721ca95f9769ba0ef8a3a8fd0faa151e497f4"
|
|
51
51
|
}
|
package/public/ChatInput.js
CHANGED
|
@@ -20,7 +20,7 @@ import { ChatInputSendButton } from './ChatInputSendButton.js';
|
|
|
20
20
|
import { ChatInputVoiceButton } from './ChatInputVoiceButton.js';
|
|
21
21
|
import { CHAT_INPUT_SLOT_ICON_DEFAULTS } from '../slotDefaults.js';
|
|
22
22
|
import { IconDefaultPropsContext } from '@hh.ru/magritte-ui-icon';
|
|
23
|
-
import { s as styles } from '../styles-
|
|
23
|
+
import { s as styles } from '../styles-DvciMezl.js';
|
|
24
24
|
import 'motion/react';
|
|
25
25
|
import '@hh.ru/magritte-design-tokens/core-tokens';
|
|
26
26
|
import '../internal/useSendOnEnter.js';
|
package/public/ChatInputChips.js
CHANGED
|
@@ -5,7 +5,7 @@ import { flattenFragments } from '../internal/flattenFragments.js';
|
|
|
5
5
|
import { CHAT_INPUT_CHIP_DEFAULTS } from '../slotDefaults.js';
|
|
6
6
|
import { ChipDefaultPropsContext } from '@hh.ru/magritte-ui-chips';
|
|
7
7
|
import { ScrollableContainer } from '@hh.ru/magritte-ui-scrollable-container';
|
|
8
|
-
import { s as styles } from '../styles-
|
|
8
|
+
import { s as styles } from '../styles-DvciMezl.js';
|
|
9
9
|
|
|
10
10
|
const ChatInputChips = ({ children }) => /* @__PURE__ */ jsx("div", { className: styles.chipsContainer, children: /* @__PURE__ */ jsx(ChipDefaultPropsContext, { props: CHAT_INPUT_CHIP_DEFAULTS, children: /* @__PURE__ */ jsx(ScrollableContainer, { children: /* @__PURE__ */ jsx(ScrollableContainer.DefaultLayout, { size: "small", fadeOnMobile: true, children: /* @__PURE__ */ jsx(ScrollableContainer.Gallery, { children: /* @__PURE__ */ jsx("div", { className: styles.chips, children: flattenFragments(children).map((child, index) => /* @__PURE__ */ jsx(ScrollableContainer.Item, { children: child }, isValidElement(child) && child.key || index)) }) }) }) }) }) });
|
|
11
11
|
ChatInputChips.displayName = "ChatInputChips";
|
package/public/ChatInputFile.js
CHANGED
|
@@ -9,7 +9,7 @@ import { CrossOutlinedSize16, CheckCircleOutlinedSize16, ExclamationTriangleOutl
|
|
|
9
9
|
import { LinkDefaultPropsContext } from '@hh.ru/magritte-ui-link';
|
|
10
10
|
import { Loader } from '@hh.ru/magritte-ui-loader';
|
|
11
11
|
import { TextDefaultPropsContext } from '@hh.ru/magritte-ui-typography';
|
|
12
|
-
import { s as styles } from '../styles-
|
|
12
|
+
import { s as styles } from '../styles-DvciMezl.js';
|
|
13
13
|
|
|
14
14
|
const splitFileName = (name) => {
|
|
15
15
|
const dotIndex = name.lastIndexOf(".");
|
package/public/ChatInputFiles.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { isValidElement } from 'react';
|
|
4
4
|
import { flattenFragments } from '../internal/flattenFragments.js';
|
|
5
5
|
import { ScrollableContainer } from '@hh.ru/magritte-ui-scrollable-container';
|
|
6
|
-
import { s as styles } from '../styles-
|
|
6
|
+
import { s as styles } from '../styles-DvciMezl.js';
|
|
7
7
|
|
|
8
8
|
const ChatInputFiles = ({ children }) => /* @__PURE__ */ jsx("div", { className: styles.filesContainer, "data-qa": "chat-input-files", children: /* @__PURE__ */ jsx(ScrollableContainer, { correction: 11, children: /* @__PURE__ */ jsx(ScrollableContainer.DefaultLayout, { size: "small", noFadeOnDesktop: true, buttonsOffset: 8, buttonsOnHover: true, children: /* @__PURE__ */ jsx(ScrollableContainer.Gallery, { children: /* @__PURE__ */ jsx("div", { className: styles.files, children: flattenFragments(children).map((child, index) => /* @__PURE__ */ jsx(
|
|
9
9
|
ScrollableContainer.Item,
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { CHAT_INPUT_PREVIEW_ICON_DEFAULTS } from '../slotDefaults.js';
|
|
4
4
|
import { IconDefaultPropsContext } from '@hh.ru/magritte-ui-icon';
|
|
5
5
|
import { TextDefaultPropsContext } from '@hh.ru/magritte-ui-typography';
|
|
6
|
-
import { s as styles } from '../styles-
|
|
6
|
+
import { s as styles } from '../styles-DvciMezl.js';
|
|
7
7
|
|
|
8
8
|
const TITLE_TEXT_PROPS = { typography: "subtitle-3-semibold", style: "primary" };
|
|
9
9
|
const SUBTITLE_TEXT_PROPS = { typography: "label-3-regular", style: "secondary", ellipsis: true };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var styles = {"chat-input":"magritte-chat-input___P69oN_1-3-4","chatInput":"magritte-chat-input___P69oN_1-3-4","no-background":"magritte-no-background___eiIY1_1-3-4","noBackground":"magritte-no-background___eiIY1_1-3-4","text-input-focused":"magritte-text-input-focused___TfyLu_1-3-4","textInputFocused":"magritte-text-input-focused___TfyLu_1-3-4","content-grid":"magritte-content-grid___g03sT_1-3-4","contentGrid":"magritte-content-grid___g03sT_1-3-4","preview":"magritte-preview___baXKi_1-3-4","left":"magritte-left___7JZYp_1-3-4","central":"magritte-central___zkguj_1-3-4","right":"magritte-right___-tGcO_1-3-4","scrollbar-cell":"magritte-scrollbar-cell___--M2x_1-3-4","scrollbarCell":"magritte-scrollbar-cell___--M2x_1-3-4","text-input":"magritte-text-input___3AFO4_1-3-4","textInput":"magritte-text-input___3AFO4_1-3-4","layout-vertical":"magritte-layout-vertical___mVTr-_1-3-4","layoutVertical":"magritte-layout-vertical___mVTr-_1-3-4","has-central":"magritte-has-central___VRZik_1-3-4","hasCentral":"magritte-has-central___VRZik_1-3-4","no-left-controls":"magritte-no-left-controls___7r6yy_1-3-4","noLeftControls":"magritte-no-left-controls___7r6yy_1-3-4","no-right-controls":"magritte-no-right-controls___HBSag_1-3-4","noRightControls":"magritte-no-right-controls___HBSag_1-3-4","chips":"magritte-chips___gLao5_1-3-4","chips-container":"magritte-chips-container___-bS5O_1-3-4","chipsContainer":"magritte-chips-container___-bS5O_1-3-4","preview-block":"magritte-preview-block___iiPdS_1-3-4","previewBlock":"magritte-preview-block___iiPdS_1-3-4","preview-side":"magritte-preview-side___ymR-u_1-3-4","previewSide":"magritte-preview-side___ymR-u_1-3-4","preview-content":"magritte-preview-content___ZgyBD_1-3-4","previewContent":"magritte-preview-content___ZgyBD_1-3-4","preview-title":"magritte-preview-title___SkFeZ_1-3-4","previewTitle":"magritte-preview-title___SkFeZ_1-3-4","preview-subtitle":"magritte-preview-subtitle___58qfR_1-3-4","previewSubtitle":"magritte-preview-subtitle___58qfR_1-3-4","files-container":"magritte-files-container___zOkRK_1-3-4","filesContainer":"magritte-files-container___zOkRK_1-3-4","files":"magritte-files___j2q5K_1-3-4","file":"magritte-file___lz9Ll_1-3-4","file-card":"magritte-file-card___hn5C9_1-3-4","fileCard":"magritte-file-card___hn5C9_1-3-4","file-tile":"magritte-file-tile___OVlh3_1-3-4","fileTile":"magritte-file-tile___OVlh3_1-3-4","file-card-removable":"magritte-file-card-removable___GkxUe_1-3-4","fileCardRemovable":"magritte-file-card-removable___GkxUe_1-3-4","file-tile-placeholder":"magritte-file-tile-placeholder___yxLuR_1-3-4","fileTilePlaceholder":"magritte-file-tile-placeholder___yxLuR_1-3-4","file-tile-image":"magritte-file-tile-image___cZFgL_1-3-4","fileTileImage":"magritte-file-tile-image___cZFgL_1-3-4","file-remove":"magritte-file-remove___S0WB9_1-3-4","fileRemove":"magritte-file-remove___S0WB9_1-3-4","file-name":"magritte-file-name___L03-O_1-3-4","fileName":"magritte-file-name___L03-O_1-3-4","file-name-base":"magritte-file-name-base___ojdp6_1-3-4","fileNameBase":"magritte-file-name-base___ojdp6_1-3-4","file-name-extension":"magritte-file-name-extension___3QZtS_1-3-4","fileNameExtension":"magritte-file-name-extension___3QZtS_1-3-4","text-input-wrapper":"magritte-text-input-wrapper___TPbwC_1-3-4","textInputWrapper":"magritte-text-input-wrapper___TPbwC_1-3-4","with-top-fade":"magritte-with-top-fade___okgqo_1-3-4","withTopFade":"magritte-with-top-fade___okgqo_1-3-4","with-bottom-fade":"magritte-with-bottom-fade___82gr8_1-3-4","withBottomFade":"magritte-with-bottom-fade___82gr8_1-3-4","measure":"magritte-measure___xNKc0_1-3-4","voice-record":"magritte-voice-record___p64PV_1-3-4","voiceRecord":"magritte-voice-record___p64PV_1-3-4","voice-record-left":"magritte-voice-record-left___njEt-_1-3-4","voiceRecordLeft":"magritte-voice-record-left___njEt-_1-3-4","voice-record-right":"magritte-voice-record-right___UTv-U_1-3-4","voiceRecordRight":"magritte-voice-record-right___UTv-U_1-3-4","voice-processing":"magritte-voice-processing___C0xnX_1-3-4","voiceProcessing":"magritte-voice-processing___C0xnX_1-3-4","voice-record-indicator":"magritte-voice-record-indicator___V8ybb_1-3-4","voiceRecordIndicator":"magritte-voice-record-indicator___V8ybb_1-3-4","voice-record-indicator-bar":"magritte-voice-record-indicator-bar___jgyqz_1-3-4","voiceRecordIndicatorBar":"magritte-voice-record-indicator-bar___jgyqz_1-3-4","voice-record-indicator-wave":"magritte-voice-record-indicator-wave___4VsyE_1-3-4","voiceRecordIndicatorWave":"magritte-voice-record-indicator-wave___4VsyE_1-3-4","voice-record-indicator-has-sound":"magritte-voice-record-indicator-has-sound___67t5g_1-3-4","voiceRecordIndicatorHasSound":"magritte-voice-record-indicator-has-sound___67t5g_1-3-4","mode-container":"magritte-mode-container___nATVD_1-3-4","modeContainer":"magritte-mode-container___nATVD_1-3-4","voice-overlay":"magritte-voice-overlay___LbxAI_1-3-4","voiceOverlay":"magritte-voice-overlay___LbxAI_1-3-4"};
|
|
3
|
+
|
|
4
|
+
export { styles as s };
|
|
5
|
+
//# sourceMappingURL=styles-DvciMezl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles-DvciMezl.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/styles-DZyb59nH.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
var styles = {"chat-input":"magritte-chat-input___P69oN_1-3-3","chatInput":"magritte-chat-input___P69oN_1-3-3","no-background":"magritte-no-background___eiIY1_1-3-3","noBackground":"magritte-no-background___eiIY1_1-3-3","text-input-focused":"magritte-text-input-focused___TfyLu_1-3-3","textInputFocused":"magritte-text-input-focused___TfyLu_1-3-3","content-grid":"magritte-content-grid___g03sT_1-3-3","contentGrid":"magritte-content-grid___g03sT_1-3-3","preview":"magritte-preview___baXKi_1-3-3","left":"magritte-left___7JZYp_1-3-3","central":"magritte-central___zkguj_1-3-3","right":"magritte-right___-tGcO_1-3-3","scrollbar-cell":"magritte-scrollbar-cell___--M2x_1-3-3","scrollbarCell":"magritte-scrollbar-cell___--M2x_1-3-3","text-input":"magritte-text-input___3AFO4_1-3-3","textInput":"magritte-text-input___3AFO4_1-3-3","layout-vertical":"magritte-layout-vertical___mVTr-_1-3-3","layoutVertical":"magritte-layout-vertical___mVTr-_1-3-3","has-central":"magritte-has-central___VRZik_1-3-3","hasCentral":"magritte-has-central___VRZik_1-3-3","no-left-controls":"magritte-no-left-controls___7r6yy_1-3-3","noLeftControls":"magritte-no-left-controls___7r6yy_1-3-3","no-right-controls":"magritte-no-right-controls___HBSag_1-3-3","noRightControls":"magritte-no-right-controls___HBSag_1-3-3","chips":"magritte-chips___gLao5_1-3-3","chips-container":"magritte-chips-container___-bS5O_1-3-3","chipsContainer":"magritte-chips-container___-bS5O_1-3-3","preview-block":"magritte-preview-block___iiPdS_1-3-3","previewBlock":"magritte-preview-block___iiPdS_1-3-3","preview-side":"magritte-preview-side___ymR-u_1-3-3","previewSide":"magritte-preview-side___ymR-u_1-3-3","preview-content":"magritte-preview-content___ZgyBD_1-3-3","previewContent":"magritte-preview-content___ZgyBD_1-3-3","preview-title":"magritte-preview-title___SkFeZ_1-3-3","previewTitle":"magritte-preview-title___SkFeZ_1-3-3","preview-subtitle":"magritte-preview-subtitle___58qfR_1-3-3","previewSubtitle":"magritte-preview-subtitle___58qfR_1-3-3","files-container":"magritte-files-container___zOkRK_1-3-3","filesContainer":"magritte-files-container___zOkRK_1-3-3","files":"magritte-files___j2q5K_1-3-3","file":"magritte-file___lz9Ll_1-3-3","file-card":"magritte-file-card___hn5C9_1-3-3","fileCard":"magritte-file-card___hn5C9_1-3-3","file-tile":"magritte-file-tile___OVlh3_1-3-3","fileTile":"magritte-file-tile___OVlh3_1-3-3","file-card-removable":"magritte-file-card-removable___GkxUe_1-3-3","fileCardRemovable":"magritte-file-card-removable___GkxUe_1-3-3","file-tile-placeholder":"magritte-file-tile-placeholder___yxLuR_1-3-3","fileTilePlaceholder":"magritte-file-tile-placeholder___yxLuR_1-3-3","file-tile-image":"magritte-file-tile-image___cZFgL_1-3-3","fileTileImage":"magritte-file-tile-image___cZFgL_1-3-3","file-remove":"magritte-file-remove___S0WB9_1-3-3","fileRemove":"magritte-file-remove___S0WB9_1-3-3","file-name":"magritte-file-name___L03-O_1-3-3","fileName":"magritte-file-name___L03-O_1-3-3","file-name-base":"magritte-file-name-base___ojdp6_1-3-3","fileNameBase":"magritte-file-name-base___ojdp6_1-3-3","file-name-extension":"magritte-file-name-extension___3QZtS_1-3-3","fileNameExtension":"magritte-file-name-extension___3QZtS_1-3-3","text-input-wrapper":"magritte-text-input-wrapper___TPbwC_1-3-3","textInputWrapper":"magritte-text-input-wrapper___TPbwC_1-3-3","with-top-fade":"magritte-with-top-fade___okgqo_1-3-3","withTopFade":"magritte-with-top-fade___okgqo_1-3-3","with-bottom-fade":"magritte-with-bottom-fade___82gr8_1-3-3","withBottomFade":"magritte-with-bottom-fade___82gr8_1-3-3","measure":"magritte-measure___xNKc0_1-3-3","voice-record":"magritte-voice-record___p64PV_1-3-3","voiceRecord":"magritte-voice-record___p64PV_1-3-3","voice-record-left":"magritte-voice-record-left___njEt-_1-3-3","voiceRecordLeft":"magritte-voice-record-left___njEt-_1-3-3","voice-record-right":"magritte-voice-record-right___UTv-U_1-3-3","voiceRecordRight":"magritte-voice-record-right___UTv-U_1-3-3","voice-processing":"magritte-voice-processing___C0xnX_1-3-3","voiceProcessing":"magritte-voice-processing___C0xnX_1-3-3","voice-record-indicator":"magritte-voice-record-indicator___V8ybb_1-3-3","voiceRecordIndicator":"magritte-voice-record-indicator___V8ybb_1-3-3","voice-record-indicator-bar":"magritte-voice-record-indicator-bar___jgyqz_1-3-3","voiceRecordIndicatorBar":"magritte-voice-record-indicator-bar___jgyqz_1-3-3","voice-record-indicator-wave":"magritte-voice-record-indicator-wave___4VsyE_1-3-3","voiceRecordIndicatorWave":"magritte-voice-record-indicator-wave___4VsyE_1-3-3","voice-record-indicator-has-sound":"magritte-voice-record-indicator-has-sound___67t5g_1-3-3","voiceRecordIndicatorHasSound":"magritte-voice-record-indicator-has-sound___67t5g_1-3-3","mode-container":"magritte-mode-container___nATVD_1-3-3","modeContainer":"magritte-mode-container___nATVD_1-3-3","voice-overlay":"magritte-voice-overlay___LbxAI_1-3-3","voiceOverlay":"magritte-voice-overlay___LbxAI_1-3-3"};
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
5
|
-
//# sourceMappingURL=styles-DZyb59nH.js.map
|
package/styles-DZyb59nH.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles-DZyb59nH.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|