Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions assets/icons/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/logos/small_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 93 additions & 37 deletions pcweb/components/docpage/navbar/inkeep.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class InkeepSearchBar(rx.NoSSRComponent):
tag = "InkeepSearchBar"
library = "@inkeep/cxkit-react@0.5.55"
library = "@inkeep/cxkit-react@0.5.115"


class Search(rx.el.Div):
Expand Down Expand Up @@ -141,50 +141,106 @@ def add_hooks(self):
key: "custom-theme",
type: "style",
value: `
[data-theme='light'] .ikp-search-bar__button,
[data-theme='dark'] .ikp-search-bar__button {
[data-theme='light'] .ikp-search-bar__button {
color: var(--m-slate-7);
padding: 0.375rem 0.5rem;
border-radius: 0.5rem;
background: var(--m-slate-1);
display: flex;
max-height: 32px;
min-height: 32px;
padding: 6px;
min-width: 256px;
justify-content: space-between;
flex-direction: row;
align-items: center;
border-radius: 10px;
border: 1px solid var(--c-slate-5, #E0E1E6);
background: var(--c-slate-1);
/* Small */
font-family: "Instrument Sans";
font-size: 14px;
justify-content: flex-start;
gap: 0.5rem;
width: 100%;
height: 2rem !important;
min-height: 2rem !important;
max-width: 10rem;
min-width: 0;
box-shadow:
0 -1px 0 0 rgba(0, 0, 0, 0.08) inset,
0 0 0 1px rgba(0, 0, 0, 0.08) inset,
0 1px 2px 0 rgba(0, 0, 0, 0.02),
0 1px 4px 0 rgba(0, 0, 0, 0.02);
font-size: 0.875rem;
font-family: "Instrument Sans", sans-serif;
font-weight: 500;
font-style: normal;
line-height: 1.5rem;
border: none;
transition: none;
}
[data-theme='dark'] .ikp-search-bar__button {
color: var(--m-slate-6);
transition: none;
height: 2rem !important;
min-height: 2rem !important;
padding: 0.375rem 0.5rem;
border-radius: 0.5rem;
background: var(--m-slate-11);
display: flex;
max-width: 10rem;
flex-direction: row;
align-items: center;
justify-content: flex-start;
gap: 0.5rem;
width: 100%;
max-width: none;
min-width: 0;
box-shadow:
0 -1px 0 0 rgba(255, 255, 255, 0.06) inset,
0 0 0 1px rgba(255, 255, 255, 0.04) inset;
font-size: 0.875rem;
font-family: "Instrument Sans", sans-serif;
font-weight: 500;
line-height: 20px;
/* 142.857% */
letter-spacing: -0.0125em;
color: var(--c-slate-9, #8B8D98);
/* Shadow/Large */
box-shadow: 0px 24px 12px 0px rgba(28, 32, 36, 0.02), 0px 8px 8px 0px rgba(28, 32, 36, 0.02), 0px 2px 6px 0px rgba(28, 32, 36, 0.02);
transition: background-color 0.1s linear, width 0s;
font-style: normal;
line-height: 1.5rem;
border: none;
}
[data-theme='light'] .ikp-search-bar__button:hover {
background: var(--m-slate-2);
}
[data-theme='dark'] .ikp-search-bar__button:hover {
background: var(--m-slate-10);
}
@media (min-width: 1024px) {
.ikp-search-bar__button {
width: 10rem;
}
}

[data-theme='light'] .ikp-search-bar__container,
[data-theme='dark'] .ikp-search-bar__container {
display: flex;
justify-content: center;
align-items: center;
min-height: 2rem;
max-height: 2rem;
width: 10rem;
max-width: 10rem;
}

[data-theme='light'] .ikp-search-bar__button:hover,
[data-theme='light'] .ikp-search-bar__button:hover {
background-color: var(--m-slate-2);
}
[data-theme='dark'] .ikp-search-bar__button:hover {
background-color: var(--c-slate-3, #F0F0F3);
background-color: var(--m-slate-10);
}
Comment thread
carlosabadia marked this conversation as resolved.

[data-theme='dark'] .ikp-modal__overlay {
background: rgba(18, 17, 19, 0.50);
backdrop-filter: blur(20px);
}

[data-part="modal__content"] {
font-family: "Instrument Sans", sans-serif;
}

@media (max-width: 80em) {
[data-theme='light'] .ikp-search-bar__container,
[data-theme='dark'] .ikp-search-bar__container {
width: auto !important;
}

[data-theme='light'] .ikp-search-bar__button,
[data-theme='dark'] .ikp-search-bar__button {
padding: 2px 12px;
Expand Down Expand Up @@ -225,35 +281,34 @@ def add_hooks(self):
}

.ikp-search-bar__kbd-wrapper {
padding: 0px 8px;
padding: 0px 0.25rem;
justify-content: center;
align-items: center;
border-radius: 4px;
border-radius: 0.25rem;
box-shadow: none;
color: var(--c-slate-9, #8B8D98);
color: var(--m-slate-7, #67707E);
font-family: "Instrument Sans";
--ikp-colors-transparent: var(--c-slate-3, #FCFCFD);
background: var(--c-slate-3, #F0F0F3) !important;
font-size: 12px;
font-size: 0.8125rem;
font-weight: 475;
line-height: 1.25rem;
height: 1.25rem;
font-style: normal;
font-weight: 500;
line-height: 20px;
/* 166.667% */
letter-spacing: -0.09px;
margin-left: auto;
width: fit-content;
}

.ikp-search-bar__text,
.ikp-search-bar__icon {
color: var(--c-slate-9, #8B8D98);
color: var(--m-slate-7, #67707E);
font-weight: 500;
font-style: normal;
line-height: 1.5rem;
font-size: 0.875rem;
}
`,
},
{
key: "google-fonts-instrument",
type: "link",
value: "https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;700&display=swap",
},
],
}
},
Expand All @@ -265,6 +320,7 @@ def add_hooks(self):
placeholder: 'Search',
},
aiChatSettings: { // optional typeof InkeepAIChatSettings
aiAssistantAvatar: '/logos/small_logo.svg',
exampleQuestions: [
'How does Reflex work?',
'What types of apps can I build with Reflex?',
Expand Down
4 changes: 2 additions & 2 deletions pcweb/components/docpage/navbar/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import reflex as rx

from .typesense import typesense_search
from .inkeep import inkeep


@rx.memo
def search_bar() -> rx.Component:
return typesense_search()
return inkeep()