diff --git a/apps/site/components/Common/Searchbox/ChatInteractions/index.module.css b/apps/site/components/Common/Searchbox/ChatInteractions/index.module.css index 2bb4384ee51f5..9c3231c65b06c 100644 --- a/apps/site/components/Common/Searchbox/ChatInteractions/index.module.css +++ b/apps/site/components/Common/Searchbox/ChatInteractions/index.module.css @@ -39,7 +39,7 @@ .scrollDownButton { @apply absolute - bottom-36 + bottom-28 left-1/2 inline-flex -translate-x-1/2 @@ -53,7 +53,6 @@ focus:bg-neutral-300 focus:outline-none motion-safe:transition-colors - lg:bottom-28 dark:bg-neutral-900 dark:text-neutral-200 focus:dark:bg-neutral-800; diff --git a/apps/site/components/Common/Searchbox/ChatMessage/index.tsx b/apps/site/components/Common/Searchbox/ChatMessage/index.tsx index 8b94f31ef9f96..8fb1d537ccfdb 100644 --- a/apps/site/components/Common/Searchbox/ChatMessage/index.tsx +++ b/apps/site/components/Common/Searchbox/ChatMessage/index.tsx @@ -1,8 +1,8 @@ +import ChatActions from '@node-core/ui-components/Common/Search/Chat/Actions'; import type { Interaction } from '@orama/core'; import { ChatInteractions } from '@orama/ui/components'; import type { FC } from 'react'; -import { ChatActions } from '../ChatActions'; import ChatSources from '../ChatSources'; import styles from './index.module.css'; diff --git a/apps/site/components/Common/Searchbox/DocumentLink/index.module.css b/apps/site/components/Common/Searchbox/DocumentLink/index.module.css index 9e0483cb5c47c..d5a426fe2194f 100644 --- a/apps/site/components/Common/Searchbox/DocumentLink/index.module.css +++ b/apps/site/components/Common/Searchbox/DocumentLink/index.module.css @@ -2,7 +2,7 @@ .documentLink { @apply rounded-xl - bg-white + bg-neutral-100 px-4 py-2 text-neutral-900 @@ -10,7 +10,6 @@ hover:bg-neutral-200 focus:bg-neutral-200 motion-safe:transition-colors - lg:bg-neutral-100 dark:bg-neutral-950 dark:text-neutral-200 hover:dark:bg-neutral-900 diff --git a/apps/site/components/Common/Searchbox/EmptyResults/index.tsx b/apps/site/components/Common/Searchbox/EmptyResults/index.tsx deleted file mode 100644 index 9671ed04ae32f..0000000000000 --- a/apps/site/components/Common/Searchbox/EmptyResults/index.tsx +++ /dev/null @@ -1,65 +0,0 @@ -'use client'; - -import { SparklesIcon } from '@heroicons/react/24/outline'; -import { SearchResults, Suggestions } from '@orama/ui/components'; -import { useTranslations } from 'next-intl'; -import { type FC } from 'react'; - -import { useSearchbox } from '#site/providers/searchboxProvider'; - -import styles from './index.module.css'; - -export const EmptyResults: FC = () => { - const t = useTranslations(); - const searchbox = useSearchbox(); - const isSearchMode = searchbox?.mode === 'search'; - - return ( - - {term => ( - <> - {term ? ( -
-

- {t('components.search.noResultsFoundFor')} "{term}" -

-
- ) : ( - -

- {t('components.search.suggestions')} -

- searchbox?.switchTo('chat')} - tabIndex={isSearchMode ? 0 : -1} - aria-hidden={!isSearchMode} - className={styles.suggestionItem} - > - - {t('components.search.suggestionOne')} - - searchbox?.switchTo('chat')} - tabIndex={isSearchMode ? 0 : -1} - aria-hidden={!isSearchMode} - className={styles.suggestionItem} - > - - {t('components.search.suggestionTwo')} - - searchbox?.switchTo('chat')} - className={styles.suggestionItem} - > - - {t('components.search.suggestionThree')} - -
- )} - - )} -
- ); -}; diff --git a/apps/site/components/Common/Searchbox/InnerSearchboxModal/index.module.css b/apps/site/components/Common/Searchbox/InnerSearchboxModal/index.module.css deleted file mode 100644 index 211eedd672b8d..0000000000000 --- a/apps/site/components/Common/Searchbox/InnerSearchboxModal/index.module.css +++ /dev/null @@ -1,19 +0,0 @@ -@reference "../../../../styles/index.css"; - -.mobileChatContainer { - @apply flex - grow - flex-col - overflow-hidden - px-4 - pb-4; -} - -.mobileChatTop { - @apply grow - overflow-hidden; -} - -.mobileChatBottom { - @apply mt-4; -} diff --git a/apps/site/components/Common/Searchbox/InnerSearchboxModal/index.tsx b/apps/site/components/Common/Searchbox/InnerSearchboxModal/index.tsx deleted file mode 100644 index 99b3385250a70..0000000000000 --- a/apps/site/components/Common/Searchbox/InnerSearchboxModal/index.tsx +++ /dev/null @@ -1,68 +0,0 @@ -'use client'; -import type { FC, PropsWithChildren } from 'react'; -import { useEffect, useState, useRef } from 'react'; - -import { useSearchbox } from '#site/providers/searchboxProvider'; - -import { ChatInput } from '../ChatInput'; -import { ChatInteractionsContainer } from '../ChatInteractions'; -import { Footer } from '../Footer'; -import { MobileTopBar } from '../MobileTopBar'; -import { Search } from '../Search'; -import { SlidingChatPanel } from '../SlidingChatPanel'; -import styles from './index.module.css'; - -export const InnerSearchboxModal: FC = () => { - const searchbox = useSearchbox(); - const [isMobileScreen, setIsMobileScreen] = useState(false); - const searchInputRef = useRef(null); - - const displaySearch = - !isMobileScreen || (isMobileScreen && searchbox?.mode === 'search'); - - useEffect(() => { - const checkScreenSize = () => { - setIsMobileScreen(window.innerWidth < 1024); - }; - checkScreenSize(); - window.addEventListener('resize', checkScreenSize); - return () => { - window.removeEventListener('resize', checkScreenSize); - }; - }, []); - - return ( - <> - {isMobileScreen && ( - - )} - {displaySearch && } - {isMobileScreen && searchbox?.mode === 'chat' && ( - <> -
-
- -
-
- -
-
-