Skip to content

Commit f3042fd

Browse files
committed
feat(orama): mobile ui
1 parent 1a7effb commit f3042fd

File tree

14 files changed

+111
-80
lines changed

14 files changed

+111
-80
lines changed

apps/site/components/Common/Searchbox/ChatInteractions/index.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
.scrollDownButton {
4141
@apply absolute
42-
bottom-28
42+
bottom-36
4343
left-1/2
4444
inline-flex
4545
-translate-x-1/2
@@ -49,10 +49,10 @@
4949
bg-neutral-200
5050
p-2
5151
text-neutral-900
52-
duration-300
5352
focus:bg-neutral-300
5453
focus:outline-none
5554
motion-safe:transition-colors
55+
lg:bottom-28
5656
dark:bg-neutral-900
5757
dark:text-neutral-200
5858
focus:dark:bg-neutral-800;

apps/site/components/Common/Searchbox/ChatSources/index.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
.chatSourceLink {
2828
@apply w-3xs
2929
rounded-xl
30-
bg-neutral-100
30+
bg-white
3131
px-4
3232
py-2
3333
text-neutral-900
34-
duration-300
3534
hover:bg-neutral-200
3635
focus:bg-neutral-200
3736
focus:outline-none
3837
motion-safe:transition-colors
38+
lg:bg-neutral-100
3939
dark:bg-neutral-950
4040
dark:text-neutral-200
4141
hover:dark:bg-neutral-900

apps/site/components/Common/Searchbox/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const Searchbox: FC = () => {
5252
t('components.search.suggestionThree'),
5353
]}
5454
label={t('components.search.suggestions')}
55+
onClick={() => setMode('chat')}
5556
/>
5657
</SearchResults>
5758
</div>

apps/site/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"@opentelemetry/instrumentation": "~0.206.0",
4343
"@opentelemetry/resources": "~1.30.1",
4444
"@opentelemetry/sdk-logs": "~0.206.0",
45-
"@orama/core": "^1.2.14",
46-
"@orama/ui": "^1.5.3",
45+
"@orama/core": "^1.2.15",
46+
"@orama/ui": "^1.5.4",
4747
"@radix-ui/react-tabs": "^1.1.13",
4848
"@radix-ui/react-tooltip": "^1.2.8",
4949
"@tailwindcss/postcss": "~4.1.17",

packages/ui-components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"dependencies": {
3838
"@heroicons/react": "^2.2.0",
39-
"@orama/ui": "^1.5.2",
39+
"@orama/ui": "^1.5.4",
4040
"@radix-ui/react-avatar": "^1.1.11",
4141
"@radix-ui/react-dialog": "^1.1.15",
4242
"@radix-ui/react-dropdown-menu": "~2.1.16",
@@ -53,7 +53,7 @@
5353
"tailwindcss": "catalog:"
5454
},
5555
"devDependencies": {
56-
"@orama/core": "^1.2.14",
56+
"@orama/core": "^1.2.15",
5757
"@storybook/addon-styling-webpack": "^3.0.0",
5858
"@storybook/addon-themes": "^10.1.4",
5959
"@storybook/addon-webpack5-compiler-swc": "^4.0.2",

packages/ui-components/src/Common/Search/Chat/Actions/index.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
rounded-full
2020
p-2
2121
text-neutral-800
22-
duration-300
2322
hover:bg-neutral-300
2423
focus:bg-neutral-300
2524
focus:outline-none

packages/ui-components/src/Common/Search/Chat/Input/index.module.css

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
bg-green-600
3434
p-2
3535
text-white
36-
duration-300
3736
focus:bg-green-600/75
3837
focus:outline-none
3938
disabled:cursor-not-allowed
@@ -58,3 +57,41 @@
5857
sm:text-sm
5958
dark:text-neutral-500;
6059
}
60+
61+
.suggestionsWrapper {
62+
@apply mb-4
63+
flex
64+
items-center
65+
gap-2
66+
overflow-x-auto
67+
px-1
68+
text-sm
69+
lg:justify-center;
70+
71+
&::-webkit-scrollbar {
72+
@apply hidden;
73+
}
74+
}
75+
76+
.suggestionsItem {
77+
@apply flex
78+
size-max
79+
cursor-pointer
80+
rounded-full
81+
border
82+
border-neutral-300
83+
bg-neutral-200
84+
px-3
85+
py-1
86+
whitespace-nowrap
87+
text-neutral-900
88+
hover:bg-neutral-300
89+
focus:bg-neutral-300
90+
focus:outline-none
91+
motion-safe:transition-colors
92+
dark:border-neutral-900
93+
dark:bg-neutral-950
94+
dark:text-neutral-200
95+
dark:hover:bg-neutral-900
96+
dark:focus:bg-neutral-900;
97+
}

packages/ui-components/src/Common/Search/Chat/Input/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ const ChatInput: FC<PropsWithChildren<ChatInputProps>> = ({
3939

4040
return (
4141
<>
42-
{!interactions?.length && <SearchSuggestions suggestions={suggestions} />}
42+
{!interactions?.length && (
43+
<SearchSuggestions
44+
suggestions={suggestions}
45+
wrapper={styles.suggestionsWrapper}
46+
className={styles.suggestionsItem}
47+
/>
48+
)}
4349
<div className={styles.textareaContainer}>
4450
<PromptTextArea.Wrapper className={styles.textareaWrapper}>
4551
<PromptTextArea.Field

packages/ui-components/src/Common/Search/Chat/Trigger/index.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
bg-transparent
2525
p-3
2626
text-sm
27-
duration-300
2827
hover:bg-neutral-300
2928
focus-visible:border-green-600
3029
focus-visible:outline-none

packages/ui-components/src/Common/Search/Modal/index.module.css

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
bg-white
2323
p-1.5
2424
text-neutral-900
25-
duration-300
2625
hover:bg-neutral-100
2726
motion-safe:transition-colors
2827
dark:border-neutral-900
@@ -68,35 +67,39 @@
6867
items-start
6968
justify-center
7069
bg-white/70
71-
pt-[5vh]
70+
lg:pt-[5vh]
7271
dark:bg-zinc-950/70;
7372
}
7473

7574
.modalInner {
7675
@apply fixed
77-
top-auto
78-
bottom-auto
76+
top-0
77+
bottom-0
7978
mx-auto
8079
my-0
8180
flex
82-
h-auto
83-
w-full
84-
max-w-3xl
85-
bg-neutral-100
86-
dark:bg-neutral-950;
87-
88-
> section {
89-
@apply w-full;
90-
}
81+
h-full
82+
max-w-none
83+
bg-white
84+
lg:top-auto
85+
lg:bottom-auto
86+
lg:h-auto
87+
lg:max-w-3xl
88+
lg:bg-neutral-100
89+
dark:bg-zinc-950
90+
lg:dark:bg-neutral-950;
9191
}
9292

9393
.modalContent {
9494
@apply flex
95-
h-auto
96-
max-h-[70vh]
95+
h-full
96+
w-screen
9797
flex-col
98-
rounded-xl
99-
border
10098
border-neutral-200
99+
lg:h-auto
100+
lg:max-h-[70vh]
101+
lg:w-auto
102+
lg:rounded-xl
103+
lg:border
101104
dark:border-neutral-900;
102105
}

0 commit comments

Comments
 (0)