cozy-search 2.6.2 → 2.7.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.
- package/dist/components/Assistant/AssistantAvatar.js +3 -1
- package/dist/components/Assistant/AssistantContainer.js +3 -1
- package/dist/components/Assistant/AssistantMenu.d.ts +16 -0
- package/dist/components/Assistant/AssistantMenu.js +160 -0
- package/dist/components/Assistant/AssistantSelection.d.ts +12 -1
- package/dist/components/Assistant/AssistantSelection.js +55 -115
- package/dist/components/Assistant/AssistantSelectionItem.js +3 -1
- package/dist/components/Assistant/AssistantSidebarItem.d.ts +9 -0
- package/dist/components/Assistant/AssistantSidebarItem.js +108 -0
- package/dist/components/Assistant/styles.styl +13 -0
- package/dist/components/Conversations/Conversation.js +74 -14
- package/dist/components/Conversations/ConversationBar.js +13 -5
- package/dist/components/Conversations/ConversationComposer.js +53 -23
- package/dist/components/Conversations/ConversationListItem.js +20 -40
- package/dist/components/Conversations/ConversationListItemWider.js +14 -11
- package/dist/components/Conversations/styles.styl +110 -23
- package/dist/components/CozyAssistantRuntimeProvider.js +15 -8
- package/dist/components/CreateAssistantSteps/BasicInfoStep.js +37 -1
- package/dist/components/CreateAssistantSteps/Provider.js +1 -0
- package/dist/components/CreateAssistantSteps/ProviderSelectionStep.js +1 -0
- package/dist/components/CreateAssistantSteps/styles.styl +14 -0
- package/dist/components/KnowledgeBase/FolderPickerDialog.js +3 -1
- package/dist/components/KnowledgeBase/KnowledgeBaseChip.d.ts +7 -5
- package/dist/components/KnowledgeBase/KnowledgeBaseChip.js +65 -31
- package/dist/components/KnowledgeBase/conversationAssistant.d.ts +2 -1
- package/dist/components/KnowledgeBase/conversationAssistant.js +6 -1
- package/dist/components/KnowledgeBase/conversationAssistant.spec.js +24 -0
- package/dist/components/KnowledgeBase/styles.styl +18 -0
- package/dist/components/Messages/AssistantMessage.js +25 -21
- package/dist/components/Messages/UserMessage.js +4 -1
- package/dist/components/Messages/styles.styl +41 -0
- package/dist/components/Search/SearchBarMobile.js +13 -5
- package/dist/components/Sidebar/index.js +55 -30
- package/dist/components/Sidebar/styles.styl +12 -11
- package/dist/components/TwakeKnowledges/SourceButton.d.ts +14 -0
- package/dist/components/TwakeKnowledges/SourceButton.js +98 -0
- package/dist/components/TwakeKnowledges/TwakeKnowledgeSelector.d.ts +9 -0
- package/dist/components/TwakeKnowledges/TwakeKnowledgeSelector.js +75 -50
- package/dist/components/TwakeKnowledges/styles.styl +29 -2
- package/dist/components/Views/AssistantView.js +9 -1
- package/dist/components/Views/CreateAssistantDialog.js +5 -1
- package/dist/components/Views/DeleteAssistantDialog.js +1 -0
- package/dist/components/Views/EditAssistantDialog.js +5 -1
- package/dist/hooks/useConversation.d.ts +2 -2
- package/dist/hooks/useConversation.js +25 -4
- package/dist/hooks/useConversation.spec.js +14 -2
- package/dist/hooks/useConversation.spec.jsx +21 -3
- package/dist/locales/en.json +5 -1
- package/dist/locales/fr.json +6 -2
- package/dist/locales/index.js +21 -5
- package/dist/locales/ru.json +5 -1
- package/dist/locales/vi.json +5 -1
- package/dist/stylesheet.css +253 -30
- package/package.json +2 -2
- package/dist/components/TwakeKnowledges/TwakeKnowledgeChip.d.ts +0 -13
- package/dist/components/TwakeKnowledges/TwakeKnowledgeChip.js +0 -80
- package/dist/components/TwakeKnowledges/WebSearchChip.d.ts +0 -5
- package/dist/components/TwakeKnowledges/WebSearchChip.js +0 -75
package/dist/locales/ru.json
CHANGED
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
"reorganise_files": "Реорганизовать мои файлы"
|
|
19
19
|
},
|
|
20
20
|
"sidebar": {
|
|
21
|
-
"create_new": "
|
|
21
|
+
"create_new": "Новый чат",
|
|
22
22
|
"toggle_sidebar": "Переключить боковую панель",
|
|
23
23
|
"toggle_search": "Переключить поиск",
|
|
24
24
|
"close_sidebar": "Закрыть боковую панель",
|
|
25
|
+
"assistant": "Ассистент",
|
|
25
26
|
"recent_chats": "Недавние",
|
|
26
27
|
"conversation": {
|
|
27
28
|
"actions": {
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
"yesterday": "Вчера"
|
|
38
39
|
},
|
|
39
40
|
"default_error": "Произошла ошибка, попробуйте снова",
|
|
41
|
+
"disclaimer": "Twake AI может ошибаться. Проверяйте важную информацию.",
|
|
40
42
|
"default_empty_response": "Я не смог найти ответ на ваш запрос. Попробуйте переформулировать вопрос",
|
|
41
43
|
"hide": "Скрыть",
|
|
42
44
|
"show": "Показать",
|
|
@@ -84,6 +86,7 @@
|
|
|
84
86
|
},
|
|
85
87
|
"knowledge_base": {
|
|
86
88
|
"change_folder": "Изменить папку…",
|
|
89
|
+
"folder_hint": "Ассистент имеет доступ ко всем файлам, хранящимся в этой папке Drive",
|
|
87
90
|
"emails": "Письма",
|
|
88
91
|
"open_folder": "Открыть в Drive",
|
|
89
92
|
"picker_error": "Не удалось открыть выбор папки Drive. Пожалуйста, попробуйте ещё раз.",
|
|
@@ -102,6 +105,7 @@
|
|
|
102
105
|
"basic_info": {
|
|
103
106
|
"description": "Настройте вашего агента. Выберите базу знаний, затем модель ИИ.",
|
|
104
107
|
"avatar": "Аватар (необязательно)",
|
|
108
|
+
"upload_photo": "Загрузить фото",
|
|
105
109
|
"name": "Имя",
|
|
106
110
|
"name_placeholder": "Назовите вашего агента",
|
|
107
111
|
"description_label": "Описание",
|
package/dist/locales/vi.json
CHANGED
|
@@ -25,10 +25,11 @@
|
|
|
25
25
|
"edited": "Đã lưu tin nhắn"
|
|
26
26
|
},
|
|
27
27
|
"sidebar": {
|
|
28
|
-
"create_new": "
|
|
28
|
+
"create_new": "Cuộc trò chuyện mới",
|
|
29
29
|
"toggle_sidebar": "Bật/tắt thanh bên",
|
|
30
30
|
"toggle_search": "Bật/tắt tìm kiếm",
|
|
31
31
|
"close_sidebar": "Đóng thanh bên",
|
|
32
|
+
"assistant": "Trợ lý",
|
|
32
33
|
"recent_chats": "Gần đây",
|
|
33
34
|
"conversation": {
|
|
34
35
|
"actions": {
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
"yesterday": "Hôm qua"
|
|
45
46
|
},
|
|
46
47
|
"default_error": "Đã xảy ra lỗi, vui lòng thử lại",
|
|
48
|
+
"disclaimer": "Twake AI có thể mắc lỗi. Hãy kiểm tra lại các thông tin quan trọng.",
|
|
47
49
|
"default_empty_response": "Tôi không tìm thấy câu trả lời cho yêu cầu của bạn. Vui lòng thử diễn đạt lại",
|
|
48
50
|
"hide": "Ẩn",
|
|
49
51
|
"show": "Hiện",
|
|
@@ -84,6 +86,7 @@
|
|
|
84
86
|
},
|
|
85
87
|
"knowledge_base": {
|
|
86
88
|
"change_folder": "Thay đổi thư mục…",
|
|
89
|
+
"folder_hint": "Trợ lý có thể truy cập tất cả các tệp được lưu trong thư mục Drive này",
|
|
87
90
|
"emails": "Email",
|
|
88
91
|
"open_folder": "Mở trong Drive",
|
|
89
92
|
"picker_error": "Không thể mở bộ chọn thư mục Drive. Vui lòng thử lại.",
|
|
@@ -102,6 +105,7 @@
|
|
|
102
105
|
"basic_info": {
|
|
103
106
|
"description": "Tùy chỉnh tác nhân của bạn. Chọn cơ sở tri thức, sau đó là mô hình AI.",
|
|
104
107
|
"avatar": "Ảnh đại diện (tùy chọn)",
|
|
108
|
+
"upload_photo": "Tải ảnh lên",
|
|
105
109
|
"name": "Tên",
|
|
106
110
|
"name_placeholder": "Đặt tên cho tác nhân của bạn",
|
|
107
111
|
"description_label": "Mô tả",
|
package/dist/stylesheet.css
CHANGED
|
@@ -59,6 +59,49 @@
|
|
|
59
59
|
color: var(--white);
|
|
60
60
|
background-color: var(--malachite);
|
|
61
61
|
}
|
|
62
|
+
.styles__sidebar-item___2Kc78 {
|
|
63
|
+
min-height: 36px !important;
|
|
64
|
+
padding-top: 5px !important;
|
|
65
|
+
padding-bottom: 5px !important;
|
|
66
|
+
border-radius: 8px !important;
|
|
67
|
+
gap: 12px !important;
|
|
68
|
+
}
|
|
69
|
+
.styles__sidebar-item-icon___2qKQL {
|
|
70
|
+
min-width: 0 !important;
|
|
71
|
+
color: var(--iconTextColor);
|
|
72
|
+
}
|
|
73
|
+
/* imported from styles.styl */
|
|
74
|
+
|
|
75
|
+
.styles__source-button___9t9wI {
|
|
76
|
+
width: 32px;
|
|
77
|
+
height: 32px;
|
|
78
|
+
padding: 0 !important;
|
|
79
|
+
border-radius: 100px;
|
|
80
|
+
}
|
|
81
|
+
.styles__source-button-image___2batD {
|
|
82
|
+
width: 20px;
|
|
83
|
+
height: 20px;
|
|
84
|
+
}
|
|
85
|
+
.styles__source-button-image--inactive___3hs2C {
|
|
86
|
+
opacity: 0.6;
|
|
87
|
+
}
|
|
88
|
+
.styles__source-chip___1h51w {
|
|
89
|
+
height: 32px !important;
|
|
90
|
+
border-radius: 100px !important;
|
|
91
|
+
padding: 0 12px !important;
|
|
92
|
+
}
|
|
93
|
+
.styles__source-chip-icon___3-N0x {
|
|
94
|
+
width: 16px;
|
|
95
|
+
height: 16px;
|
|
96
|
+
margin: 0 !important;
|
|
97
|
+
}
|
|
98
|
+
.styles__source-chip-label___2mLIx {
|
|
99
|
+
padding: 0 0 0 4px !important;
|
|
100
|
+
font-size: 12px;
|
|
101
|
+
font-weight: 500;
|
|
102
|
+
line-height: 16px;
|
|
103
|
+
letter-spacing: 0.5px;
|
|
104
|
+
}
|
|
62
105
|
/* imported from styles.styl */
|
|
63
106
|
|
|
64
107
|
.styles__searchBarDesktop--result___2bQQy {
|
|
@@ -90,16 +133,57 @@
|
|
|
90
133
|
|
|
91
134
|
.styles__composerContainer___3bNfY {
|
|
92
135
|
position: relative;
|
|
93
|
-
border: 1px solid var(--
|
|
94
|
-
border-radius:
|
|
95
|
-
padding:
|
|
136
|
+
border: 1px solid var(--borderGhostDisabledColor);
|
|
137
|
+
border-radius: 16px;
|
|
138
|
+
padding: 12px 12px 12px 16px;
|
|
96
139
|
background-color: var(--paperBackgroundColor);
|
|
140
|
+
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
|
|
97
141
|
z-index: calc(var(--zIndex-modal) + 15);
|
|
98
142
|
}
|
|
143
|
+
.styles__composerContainer--mobile___nIYa- {
|
|
144
|
+
border-color: transparent;
|
|
145
|
+
border-radius: 28px;
|
|
146
|
+
padding-bottom: 8px;
|
|
147
|
+
box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 2px 8px 0 rgba(0,0,0,0.04), 0 4px 40px 8px rgba(0,0,0,0.02);
|
|
148
|
+
}
|
|
149
|
+
.styles__composerContainer--mobile-dark___12Go9 {
|
|
150
|
+
border-color: var(--borderMainColor);
|
|
151
|
+
}
|
|
152
|
+
.styles__composer-dock___2nPT8 {
|
|
153
|
+
position: relative;
|
|
154
|
+
z-index: calc(var(--zIndex-modal) + 15);
|
|
155
|
+
margin-top: -32px;
|
|
156
|
+
padding-top: 32px;
|
|
157
|
+
background: linear-gradient(to top, var(--paperBackgroundColor) calc(100% - 32px), transparent);
|
|
158
|
+
}
|
|
99
159
|
.styles__composerActions___2xQEH {
|
|
100
|
-
margin-top:
|
|
160
|
+
margin-top: 12px;
|
|
101
161
|
gap: 8px;
|
|
102
162
|
}
|
|
163
|
+
.styles__welcome___ozY_t {
|
|
164
|
+
min-height: 166px;
|
|
165
|
+
}
|
|
166
|
+
.styles__welcome-halo___3jlz_ {
|
|
167
|
+
position: absolute;
|
|
168
|
+
top: 50%;
|
|
169
|
+
left: 50%;
|
|
170
|
+
width: 100%;
|
|
171
|
+
max-width: 629px;
|
|
172
|
+
height: 166px;
|
|
173
|
+
transform: translate(-50%, -50%);
|
|
174
|
+
border-radius: 9999px;
|
|
175
|
+
opacity: 0.5;
|
|
176
|
+
filter: blur(62.5px);
|
|
177
|
+
background: linear-gradient(270deg, #c5ccfd 0%, #f0c7fc 21%, #f7bbe1 39%, #f5c7d2 62%, #fbe3b9 82%, #fcd8a4 100%);
|
|
178
|
+
pointer-events: none;
|
|
179
|
+
}
|
|
180
|
+
.styles__welcome-halo--dark___fV9pN {
|
|
181
|
+
opacity: 0.2;
|
|
182
|
+
}
|
|
183
|
+
.styles__welcome-title___sBOKX {
|
|
184
|
+
font-size: 32px;
|
|
185
|
+
line-height: 40px;
|
|
186
|
+
}
|
|
103
187
|
.styles__conversationBar___2J-Us {
|
|
104
188
|
flex: 1;
|
|
105
189
|
min-width: 0;
|
|
@@ -117,12 +201,35 @@
|
|
|
117
201
|
background-color: transparent !important;
|
|
118
202
|
border-color: transparent !important;
|
|
119
203
|
}
|
|
204
|
+
.styles__viewport-fade-top___3j8Lv {
|
|
205
|
+
position: absolute;
|
|
206
|
+
top: 48px;
|
|
207
|
+
left: 0;
|
|
208
|
+
right: 0;
|
|
209
|
+
height: 24px;
|
|
210
|
+
background: linear-gradient(to bottom, var(--paperBackgroundColor), transparent);
|
|
211
|
+
opacity: 0;
|
|
212
|
+
transition: opacity 150ms;
|
|
213
|
+
pointer-events: none;
|
|
214
|
+
z-index: calc(var(--zIndex-modal) + 15);
|
|
215
|
+
}
|
|
216
|
+
.styles__viewport-fade-top--visible___32uyl {
|
|
217
|
+
opacity: 1;
|
|
218
|
+
}
|
|
120
219
|
@media (max-width: 48rem) {
|
|
121
220
|
.styles__conversationViewport___24jYX {
|
|
122
221
|
padding-left: 8px;
|
|
123
222
|
padding-right: 8px;
|
|
124
223
|
}
|
|
125
224
|
}
|
|
225
|
+
.styles__conversationViewport--filled___T2QFN {
|
|
226
|
+
padding-bottom: 32px;
|
|
227
|
+
}
|
|
228
|
+
@media (max-width: 48rem) {
|
|
229
|
+
.styles__conversationViewport--filled___T2QFN {
|
|
230
|
+
padding-top: 40px;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
126
233
|
.styles__conversationBar-input___2DfdZ {
|
|
127
234
|
max-height: 80px;
|
|
128
235
|
}
|
|
@@ -194,7 +301,10 @@
|
|
|
194
301
|
}
|
|
195
302
|
.styles__conversation-list-item___rQapI {
|
|
196
303
|
border-radius: 8px !important;
|
|
197
|
-
align-items:
|
|
304
|
+
align-items: center !important;
|
|
305
|
+
min-height: 36px !important;
|
|
306
|
+
padding-top: 5px !important;
|
|
307
|
+
padding-bottom: 5px !important;
|
|
198
308
|
gap: 0 !important;
|
|
199
309
|
}
|
|
200
310
|
.styles__conversation-list-item___rQapI:hover .styles__conversation-list-item-action___qiuKm,
|
|
@@ -202,45 +312,49 @@
|
|
|
202
312
|
opacity: 1;
|
|
203
313
|
pointer-events: auto;
|
|
204
314
|
}
|
|
205
|
-
.styles__conversation-list-item--
|
|
206
|
-
background: var(--
|
|
315
|
+
.styles__conversation-list-item--selected___2D5_3 {
|
|
316
|
+
background: var(--actionColorSelected) !important;
|
|
207
317
|
}
|
|
208
|
-
.styles__conversation-list-item--
|
|
209
|
-
|
|
318
|
+
.styles__conversation-list-item--selected___2D5_3 .styles__conversation-list-item-action___qiuKm {
|
|
319
|
+
opacity: 1;
|
|
320
|
+
pointer-events: auto;
|
|
210
321
|
}
|
|
211
322
|
.styles__conversation-list-item--wider___2Tl2c {
|
|
212
323
|
align-items: center !important;
|
|
213
324
|
}
|
|
214
|
-
.styles__conversation-list-item-divider___2LOP1 {
|
|
215
|
-
margin: 8px -16px -8px -16px !important;
|
|
216
|
-
}
|
|
217
325
|
.styles__conversation-list-item-action___qiuKm {
|
|
218
326
|
position: absolute !important;
|
|
219
|
-
top:
|
|
220
|
-
right:
|
|
327
|
+
top: 50%;
|
|
328
|
+
right: 4px;
|
|
329
|
+
transform: translateY(-50%);
|
|
221
330
|
opacity: 0;
|
|
222
331
|
pointer-events: none;
|
|
223
332
|
}
|
|
224
333
|
.styles__conversation-list-item-text___31VBM {
|
|
225
|
-
line-height: 16px;
|
|
226
334
|
overflow: hidden;
|
|
227
|
-
margin-right:
|
|
335
|
+
margin-right: 24px !important;
|
|
228
336
|
}
|
|
229
337
|
.styles__conversation-list-item-title___3je_6 {
|
|
230
338
|
color: var(--primaryTextColor);
|
|
231
339
|
font-size: 14px;
|
|
232
340
|
font-weight: 500;
|
|
341
|
+
line-height: 18px;
|
|
342
|
+
letter-spacing: 0.25px;
|
|
343
|
+
}
|
|
344
|
+
.styles__conversation-list-item-subtitle___3e_h0 {
|
|
345
|
+
color: var(--secondaryTextColor);
|
|
346
|
+
font-size: 12px;
|
|
347
|
+
font-weight: 500;
|
|
233
348
|
line-height: 16px;
|
|
234
349
|
letter-spacing: 0.5px;
|
|
235
350
|
}
|
|
236
351
|
.styles__conversation-list-item-meta___3Zk-r {
|
|
237
352
|
gap: 4px;
|
|
238
|
-
|
|
239
|
-
.styles__conversation-list-item-subtitle___3e_h0 {
|
|
240
|
-
color: var(--secondaryTextColor);
|
|
353
|
+
color: var(--primaryTextColor);
|
|
241
354
|
font-size: 11px;
|
|
242
355
|
font-weight: 400;
|
|
243
356
|
line-height: 16px;
|
|
357
|
+
letter-spacing: 0;
|
|
244
358
|
}
|
|
245
359
|
/* imported from styles.styl */
|
|
246
360
|
|
|
@@ -261,6 +375,17 @@
|
|
|
261
375
|
.styles__BasicInfoStep___2r0eM .styles__file-input___2fB5n {
|
|
262
376
|
display: none;
|
|
263
377
|
}
|
|
378
|
+
.styles__avatar-tooltip___1o6_5.styles__avatar-tooltip___1o6_5 {
|
|
379
|
+
padding: 8px;
|
|
380
|
+
border-radius: 8px;
|
|
381
|
+
background-color: var(--paperBackgroundColor);
|
|
382
|
+
color: var(--primaryTextColor);
|
|
383
|
+
font-size: 12px;
|
|
384
|
+
font-weight: 500;
|
|
385
|
+
line-height: 20px;
|
|
386
|
+
letter-spacing: 0.1px;
|
|
387
|
+
box-shadow: 0 2px 3px rgba(0,0,0,0.15), 0 1px 1px rgba(0,0,0,0.3);
|
|
388
|
+
}
|
|
264
389
|
.styles__ModelSelectionStep___1auXB .styles__grid-container___3wOus {
|
|
265
390
|
display: grid;
|
|
266
391
|
grid-template-columns: 1fr 1fr;
|
|
@@ -327,6 +452,21 @@
|
|
|
327
452
|
height: 100%;
|
|
328
453
|
border: none;
|
|
329
454
|
}
|
|
455
|
+
.styles__folder-tooltip___2lWW_.styles__folder-tooltip___2lWW_ {
|
|
456
|
+
max-width: 258px;
|
|
457
|
+
padding: 8px 12px;
|
|
458
|
+
border-radius: 4px;
|
|
459
|
+
background-color: var(--greyA400);
|
|
460
|
+
color: var(--white);
|
|
461
|
+
font-size: 12px;
|
|
462
|
+
font-weight: 500;
|
|
463
|
+
line-height: 15.8px;
|
|
464
|
+
letter-spacing: 0.5px;
|
|
465
|
+
text-align: center;
|
|
466
|
+
}
|
|
467
|
+
.styles__folder-tooltip-arrow___3MALJ.styles__folder-tooltip-arrow___3MALJ {
|
|
468
|
+
color: var(--greyA400);
|
|
469
|
+
}
|
|
330
470
|
/* imported from styles.styl */
|
|
331
471
|
|
|
332
472
|
.styles__cozyThread-user-messages___3Hfj- {
|
|
@@ -339,6 +479,91 @@
|
|
|
339
479
|
.styles__cozyThread-user-messages--dark___1Om3B {
|
|
340
480
|
background: var(--grey900);
|
|
341
481
|
}
|
|
482
|
+
.styles__thinking-dots___1HwKW {
|
|
483
|
+
display: flex;
|
|
484
|
+
align-items: center;
|
|
485
|
+
gap: 2.28px;
|
|
486
|
+
width: 24px;
|
|
487
|
+
height: 24px;
|
|
488
|
+
padding-left: 4px;
|
|
489
|
+
margin-left: 8px;
|
|
490
|
+
box-sizing: border-box;
|
|
491
|
+
}
|
|
492
|
+
.styles__thinking-dot___1muTY {
|
|
493
|
+
display: block;
|
|
494
|
+
width: 3.8px;
|
|
495
|
+
height: 3.8px;
|
|
496
|
+
border-radius: 50%;
|
|
497
|
+
background-color: #51acf0;
|
|
498
|
+
animation: styles__thinking-bounce___2IfNu 1.2s cubic-bezier(0.33, 0, 0.67, 1) infinite;
|
|
499
|
+
}
|
|
500
|
+
.styles__thinking-dot___1muTY:nth-child(2) {
|
|
501
|
+
animation-delay: 150ms;
|
|
502
|
+
}
|
|
503
|
+
.styles__thinking-dot___1muTY:nth-child(3) {
|
|
504
|
+
animation-delay: 300ms;
|
|
505
|
+
}
|
|
506
|
+
@media (prefers-reduced-motion: reduce) {
|
|
507
|
+
.styles__thinking-dot___1muTY {
|
|
508
|
+
animation: none;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
@-moz-keyframes styles__thinking-bounce___2IfNu {
|
|
512
|
+
0% {
|
|
513
|
+
transform: none;
|
|
514
|
+
}
|
|
515
|
+
20.83% {
|
|
516
|
+
transform: translateY(-2.855px) scale(1.15);
|
|
517
|
+
}
|
|
518
|
+
41.67% {
|
|
519
|
+
transform: none;
|
|
520
|
+
}
|
|
521
|
+
100% {
|
|
522
|
+
transform: none;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
@-webkit-keyframes styles__thinking-bounce___2IfNu {
|
|
526
|
+
0% {
|
|
527
|
+
transform: none;
|
|
528
|
+
}
|
|
529
|
+
20.83% {
|
|
530
|
+
transform: translateY(-2.855px) scale(1.15);
|
|
531
|
+
}
|
|
532
|
+
41.67% {
|
|
533
|
+
transform: none;
|
|
534
|
+
}
|
|
535
|
+
100% {
|
|
536
|
+
transform: none;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
@-o-keyframes styles__thinking-bounce___2IfNu {
|
|
540
|
+
0% {
|
|
541
|
+
transform: none;
|
|
542
|
+
}
|
|
543
|
+
20.83% {
|
|
544
|
+
transform: translateY(-2.855px) scale(1.15);
|
|
545
|
+
}
|
|
546
|
+
41.67% {
|
|
547
|
+
transform: none;
|
|
548
|
+
}
|
|
549
|
+
100% {
|
|
550
|
+
transform: none;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
@keyframes styles__thinking-bounce___2IfNu {
|
|
554
|
+
0% {
|
|
555
|
+
transform: none;
|
|
556
|
+
}
|
|
557
|
+
20.83% {
|
|
558
|
+
transform: translateY(-2.855px) scale(1.15);
|
|
559
|
+
}
|
|
560
|
+
41.67% {
|
|
561
|
+
transform: none;
|
|
562
|
+
}
|
|
563
|
+
100% {
|
|
564
|
+
transform: none;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
342
567
|
/* imported from styles.styl */
|
|
343
568
|
|
|
344
569
|
.styles__resultMenu___o76q- {
|
|
@@ -358,7 +583,7 @@
|
|
|
358
583
|
.styles__sidebar-container___155dK {
|
|
359
584
|
width: 236px;
|
|
360
585
|
min-width: 236px;
|
|
361
|
-
background-color: var(--
|
|
586
|
+
background-color: var(--defaultBackgroundColor);
|
|
362
587
|
z-index: calc(var(--zIndex-modal) + 30);
|
|
363
588
|
}
|
|
364
589
|
@media (max-width: 48rem) {
|
|
@@ -367,6 +592,11 @@
|
|
|
367
592
|
min-width: calc(100vw - 48px);
|
|
368
593
|
}
|
|
369
594
|
}
|
|
595
|
+
.styles__sidebar-rail___3-veF {
|
|
596
|
+
width: 72px;
|
|
597
|
+
min-width: 72px;
|
|
598
|
+
background-color: var(--defaultBackgroundColor);
|
|
599
|
+
}
|
|
370
600
|
.styles__sidebar-overlay--mobile___vvKHu {
|
|
371
601
|
background-color: var(--actionColorActive);
|
|
372
602
|
position: fixed;
|
|
@@ -376,16 +606,9 @@
|
|
|
376
606
|
bottom: 0;
|
|
377
607
|
z-index: calc(var(--zIndex-modal) + 20);
|
|
378
608
|
}
|
|
379
|
-
.
|
|
380
|
-
background-color:
|
|
381
|
-
|
|
382
|
-
}
|
|
383
|
-
/* imported from styles.styl */
|
|
384
|
-
|
|
385
|
-
.styles__knowledge-chips-icon___2AIB6 {
|
|
386
|
-
height: 16px;
|
|
387
|
-
width: 16px;
|
|
388
|
-
margin: 0 !important;
|
|
609
|
+
.styles__sidebar-bar--mobile___lHGA9 {
|
|
610
|
+
background-color: var(--paperBackgroundColor);
|
|
611
|
+
z-index: calc(var(--zIndex-modal) + 15);
|
|
389
612
|
}
|
|
390
613
|
/* imported from styles.styl */
|
|
391
614
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-search",
|
|
3
3
|
"description": "UI components about search bar and IA assistant",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cozy Cloud",
|
|
7
7
|
"url": "https://github.com/cozy"
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"lint": "cd .. && yarn eslint --ext js,jsx,ts packages/cozy-search"
|
|
97
97
|
},
|
|
98
98
|
"types": "dist/index.d.ts",
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "055df680e8b47d9efef96a18a45e2c477f1b3b03"
|
|
100
100
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export default TwakeKnowledgeChip;
|
|
2
|
-
/**
|
|
3
|
-
* Source chip rendered as an all-or-nothing toggle: clicking the chip (or its
|
|
4
|
-
* cross) selects/deselects the whole source. Selection state and persistence
|
|
5
|
-
* are owned by the parent through isSelected/onToggle. Without onToggle the
|
|
6
|
-
* chip is a static indicator (always-on source, no cross, not clickable).
|
|
7
|
-
*/
|
|
8
|
-
declare function TwakeKnowledgeChip({ twakeKnowledge, isLast, isSelected, onToggle }: {
|
|
9
|
-
twakeKnowledge: any;
|
|
10
|
-
isLast: any;
|
|
11
|
-
isSelected: any;
|
|
12
|
-
onToggle: any;
|
|
13
|
-
}): JSX.Element;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _twakeIcons = require("@linagora/twake-icons");
|
|
15
|
-
|
|
16
|
-
var _Chips = _interopRequireDefault(require("cozy-ui/transpiled/react/Chips"));
|
|
17
|
-
|
|
18
|
-
var _Breakpoints = require("cozy-ui/transpiled/react/providers/Breakpoints");
|
|
19
|
-
|
|
20
|
-
var styles = {
|
|
21
|
-
"knowledge-chips-icon": "styles__knowledge-chips-icon___2AIB6"
|
|
22
|
-
};
|
|
23
|
-
var CHIP_CLASSES = {
|
|
24
|
-
label: 'u-p-0',
|
|
25
|
-
icon: 'u-m-0'
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Source chip rendered as an all-or-nothing toggle: clicking the chip (or its
|
|
29
|
-
* cross) selects/deselects the whole source. Selection state and persistence
|
|
30
|
-
* are owned by the parent through isSelected/onToggle. Without onToggle the
|
|
31
|
-
* chip is a static indicator (always-on source, no cross, not clickable).
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
var TwakeKnowledgeChip = function TwakeKnowledgeChip(_ref) {
|
|
35
|
-
var twakeKnowledge = _ref.twakeKnowledge,
|
|
36
|
-
isLast = _ref.isLast,
|
|
37
|
-
isSelected = _ref.isSelected,
|
|
38
|
-
onToggle = _ref.onToggle;
|
|
39
|
-
|
|
40
|
-
var _useBreakpoints = (0, _Breakpoints.useBreakpoints)(),
|
|
41
|
-
isMobile = _useBreakpoints.isMobile;
|
|
42
|
-
|
|
43
|
-
var isPill = !isMobile || isSelected;
|
|
44
|
-
return /*#__PURE__*/_react.default.createElement(_Chips.default, {
|
|
45
|
-
"aria-label": twakeKnowledge.label,
|
|
46
|
-
icon: /*#__PURE__*/_react.default.createElement("img", {
|
|
47
|
-
alt: "",
|
|
48
|
-
"aria-hidden": "true",
|
|
49
|
-
src: twakeKnowledge.icon,
|
|
50
|
-
className: styles['knowledge-chips-icon']
|
|
51
|
-
}),
|
|
52
|
-
deleteIcon: isSelected && onToggle ? /*#__PURE__*/_react.default.createElement(_twakeIcons.Icon, {
|
|
53
|
-
icon: _twakeIcons.Cross,
|
|
54
|
-
size: 10,
|
|
55
|
-
style: {
|
|
56
|
-
height: 10,
|
|
57
|
-
width: 10,
|
|
58
|
-
marginLeft: 6,
|
|
59
|
-
marginRight: 0
|
|
60
|
-
},
|
|
61
|
-
color: "var(--primaryColor)"
|
|
62
|
-
}) : undefined,
|
|
63
|
-
onDelete: isSelected ? onToggle : undefined,
|
|
64
|
-
label: isMobile ? '' : twakeKnowledge.label,
|
|
65
|
-
clickable: !!onToggle,
|
|
66
|
-
variant: isSelected ? 'ghost' : 'default',
|
|
67
|
-
classes: isMobile ? CHIP_CLASSES : {
|
|
68
|
-
label: 'u-pl-half u-fz-tiny',
|
|
69
|
-
icon: 'u-m-0'
|
|
70
|
-
},
|
|
71
|
-
className: (0, _classnames.default)('u-mr-0', {
|
|
72
|
-
'u-w-auto u-ph-half': isPill,
|
|
73
|
-
'u-mr-half': !isLast
|
|
74
|
-
}),
|
|
75
|
-
onClick: onToggle
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
var _default = TwakeKnowledgeChip;
|
|
80
|
-
exports.default = _default;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _twakeIcons = require("@linagora/twake-icons");
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _Chips = _interopRequireDefault(require("cozy-ui/transpiled/react/Chips"));
|
|
15
|
-
|
|
16
|
-
var _Breakpoints = require("cozy-ui/transpiled/react/providers/Breakpoints");
|
|
17
|
-
|
|
18
|
-
var _twakeI18n = require("twake-i18n");
|
|
19
|
-
|
|
20
|
-
var CHIP_CLASSES = {
|
|
21
|
-
label: 'u-p-0',
|
|
22
|
-
icon: 'u-m-0'
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
var WebSearchChip = function WebSearchChip(_ref) {
|
|
26
|
-
var websearchEnabled = _ref.websearchEnabled,
|
|
27
|
-
onToggleWebsearch = _ref.onToggleWebsearch;
|
|
28
|
-
|
|
29
|
-
var _useI18n = (0, _twakeI18n.useI18n)(),
|
|
30
|
-
t = _useI18n.t;
|
|
31
|
-
|
|
32
|
-
var _useBreakpoints = (0, _Breakpoints.useBreakpoints)(),
|
|
33
|
-
isMobile = _useBreakpoints.isMobile; // Pointer activation leaves the DOM focus on the chip, and the `:focus`
|
|
34
|
-
// background is darker than the plain ghost one: the toggled chip then looks
|
|
35
|
-
// different from the sibling source chips (which are not clickable) until
|
|
36
|
-
// something else takes the focus. Drop it for pointer activation only
|
|
37
|
-
// (`detail > 0`), so keyboard users keep their focus ring.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var handleClick = function handleClick(event) {
|
|
41
|
-
if (event.detail > 0) {
|
|
42
|
-
event.currentTarget.blur();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
onToggleWebsearch(event);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
return /*#__PURE__*/_react.default.createElement(_Chips.default, {
|
|
49
|
-
"aria-pressed": websearchEnabled,
|
|
50
|
-
"aria-label": t('assistant.websearch.label'),
|
|
51
|
-
title: t('assistant.websearch.label'),
|
|
52
|
-
icon: /*#__PURE__*/_react.default.createElement(_twakeIcons.Icon, {
|
|
53
|
-
icon: _twakeIcons.Planet,
|
|
54
|
-
size: 16,
|
|
55
|
-
style: {
|
|
56
|
-
height: 16,
|
|
57
|
-
width: 16,
|
|
58
|
-
marginLeft: isMobile ? 0 : 8,
|
|
59
|
-
marginRight: isMobile ? 0 : 6
|
|
60
|
-
},
|
|
61
|
-
color: websearchEnabled ? undefined : 'var(--secondaryTextColor)'
|
|
62
|
-
}),
|
|
63
|
-
label: isMobile ? '' : t('assistant.websearch.label'),
|
|
64
|
-
clickable: true,
|
|
65
|
-
variant: websearchEnabled ? 'ghost' : 'default',
|
|
66
|
-
classes: isMobile ? CHIP_CLASSES : {
|
|
67
|
-
label: 'u-pl-0 u-fz-tiny'
|
|
68
|
-
},
|
|
69
|
-
className: "u-mr-half",
|
|
70
|
-
onClick: handleClick
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
var _default = WebSearchChip;
|
|
75
|
-
exports.default = _default;
|