File tree Expand file tree Collapse file tree 14 files changed +444
-362
lines changed
apps/site/components/Common/Searchbox
packages/ui-components/src/Common/Search Expand file tree Collapse file tree 14 files changed +444
-362
lines changed Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
3+ import Input from '@node-core/ui-components/Common/Search/Chat/Input' ;
4+ import { useChat } from '@orama/ui/hooks' ;
5+ import { useTranslations } from 'next-intl' ;
6+ import type { FC } from 'react' ;
7+
8+ export const ChatInput : FC = ( ) => {
9+ const t = useTranslations ( ) ;
10+ const {
11+ context : { interactions } ,
12+ } = useChat ( ) ;
13+
14+ return (
15+ < Input
16+ suggestions = { [
17+ t ( 'components.search.suggestionOne' ) ,
18+ t ( 'components.search.suggestionTwo' ) ,
19+ t ( 'components.search.suggestionThree' ) ,
20+ ] }
21+ showSuggestions = { ! ! interactions ?. length }
22+ placeholder = { t ( 'components.search.chatPlaceholder' ) }
23+ >
24+ < small > { t ( 'components.search.disclaimer' ) } </ small >
25+ </ Input >
26+ ) ;
27+ } ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11@reference "../../../../styles/index.css" ;
22
3- .searchResultsContainer {
4- @apply flex
5- grow
6- flex-col
7- overflow-y-auto;
8- }
9-
10- .chatButtonWrapper {
11- @apply hidden
12- border-b
13- border-neutral-200
14- p-2
15- lg:block
16- dark:border-neutral-900;
17-
18- svg {
19- @apply size-4;
20- }
21- }
22-
23- .chatButton {
24- @apply flex
25- w-full
26- cursor-pointer
27- items-center
28- gap-2
29- rounded-lg
30- border
31- border-transparent
32- bg-transparent
33- p-3
34- text-sm
35- duration-300
36- hover:bg-neutral-300
37- focus-visible:border-green-600
38- focus-visible:outline-none
39- motion-safe:transition-colors
40- dark:hover:bg-neutral-900
41- dark:focus-visible:border-green-400;
42- }
43-
44- .chatButtonWithSearch {
45- @apply bg-neutral-300
46- dark:bg-neutral-900;
47- }
48-
49- .searchResultsWrapper {
50- @apply grow
51- overflow-y-auto
52- px-5
53- pt-3
54- text-neutral-900
55- lg:grow-0
56- dark:text-neutral-200;
57-
58- & ::-webkit-scrollbar {
59- @apply size-1.5;
60- }
61-
62- & ::-webkit-scrollbar-track {
63- @apply bg-transparent;
64- }
65-
66- & ::-webkit-scrollbar-thumb {
67- @apply rounded-md
68- bg-neutral-900;
69- }
70- }
71-
72- .facetTabsWrapper {
73- @apply mb-2
74- overflow-x-auto;
75-
76- & ::-webkit-scrollbar {
77- @apply hidden;
78- }
79- }
80-
81- .facetTabItem {
82- @apply flex
83- cursor-pointer
84- items-center
85- gap-2
86- rounded-3xl
87- border
88- border-neutral-200
89- px-3
90- py-1
91- text-sm
92- duration-300
93- focus:outline-none
94- focus-visible:bg-neutral-300
95- motion-safe:transition-colors
96- dark:border-neutral-900
97- dark:focus-visible:bg-neutral-900;
98- }
99-
100- .facetTabItemSelected {
101- @apply border-2
102- border-green-600
103- dark:border-green-400;
104- }
105-
106- .facetTabsList {
107- @apply flex
108- items-center
109- gap-2
110- overflow-x-auto;
111-
112- & ::-webkit-scrollbar {
113- @apply hidden;
114- }
115- }
116-
117- .facetTabItemCount {
118- @apply text-neutral-700;
119- }
120-
121- .searchResultsGroupWrapper {
122- @apply relative
123- items-start
124- overflow-y-auto;
125- }
126-
1273.searchResultsGroup {
1284 @apply mb-3
1295 border-t
14420 text-neutral-600
14521 dark:text-neutral-600;
14622}
147-
148- .skeletonWrapper {
149- @apply flex
150- flex-col
151- gap-5
152- py-6;
153- }
154-
155- .skeletonItem {
156- @apply flex
157- items-center
158- gap-4;
159- }
160-
161- .skeletonAnim {
162- @apply dark:animate-pulse-dark
163- animate-pulse
164- rounded-md;
165- }
166-
167- .skeletonAvatar {
168- @apply h-6
169- w-5
170- shrink-0;
171- }
172-
173- .skeletonText {
174- @apply flex
175- flex-1
176- flex-col
177- gap-2;
178- }
179-
180- .skeletonLineShort {
181- @apply h-3
182- w-1/3;
183- }
184-
185- .skeletonLineLong {
186- @apply h-3
187- w-2/3;
188- }
You can’t perform that action at this time.
0 commit comments