@@ -6,6 +6,7 @@ import { useParams, useRouter } from 'next/navigation'
66import { createPortal } from 'react-dom'
77import { Blimp , Library } from '@/components/emcn'
88import { Calendar , Database , File , HelpCircle , Settings , Table } from '@/components/emcn/icons'
9+ import { Search } from '@/components/emcn/icons/search'
910import { cn } from '@/lib/core/utils/cn'
1011import { hasTriggerCapability } from '@/lib/workflows/triggers/trigger-utils'
1112import { SIDEBAR_SCROLL_EVENT } from '@/app/workspace/[workspaceId]/w/components/sidebar/sidebar'
@@ -344,7 +345,7 @@ export function SearchModal({
344345 { /* Overlay */ }
345346 < div
346347 className = { cn (
347- 'fixed inset-0 z-40 bg-[#E4E4E4]/50 backdrop-blur-[0.75px] transition-opacity duration-100 dark:bg-[#0D0D0D]/50 ' ,
348+ 'fixed inset-0 z-40 transition-opacity duration-100' ,
348349 open ? 'opacity-100' : 'pointer-events-none opacity-0'
349350 ) }
350351 onClick = { ( ) => onOpenChange ( false ) }
@@ -357,21 +358,24 @@ export function SearchModal({
357358 aria-hidden = { ! open }
358359 aria-label = 'Search'
359360 className = { cn (
360- '-translate-x-1/2 fixed top-[15%] z-50 w-[500px] overflow-hidden rounded-[12px ] border border -[var(--border )] bg-[var(--surface- 4)] shadow-lg ' ,
361+ '-translate-x-1/2 fixed top-[15%] z-50 w-[500px] rounded-xl border-[4px ] border-black/[0.06] bg -[var(--bg )] shadow-[0_24px_80px_-16px_rgba(0,0,0,0.15)] dark:border-white/[0.06] dark:shadow-[0_24px_80px_-16px_rgba(0,0,0,0. 4)]' ,
361362 open ? 'visible opacity-100' : 'invisible opacity-0'
362363 ) }
363364 style = { { left : '50%' } }
364365 >
365366 < Command label = 'Search' shouldFilter = { false } >
366- < Command . Input
367- ref = { inputRef }
368- autoFocus
369- onValueChange = { handleSearchChange }
370- placeholder = 'Search anything...'
371- className = 'w-full border-0 border-[var(--border)] border-b bg-transparent px-[12px] py-[10px] font-base text-[15px] text-[var(--text-primary)] placeholder:text-[var(--text-secondary)] focus:outline-none'
372- />
373- < Command . List className = 'scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent max-h-[400px] overflow-y-auto p-[8px]' >
374- < Command . Empty className = 'flex items-center justify-center px-[16px] py-[24px] text-[15px] text-[var(--text-subtle)]' >
367+ < div className = 'mx-[8px] mt-[8px] mb-[4px] flex items-center gap-[6px] rounded-[8px] border border-[var(--border-1)] bg-[var(--surface-5)] px-[8px] dark:bg-[var(--surface-4)]' >
368+ < Search className = 'h-[14px] w-[14px] flex-shrink-0 text-[var(--text-muted)]' />
369+ < Command . Input
370+ ref = { inputRef }
371+ autoFocus
372+ onValueChange = { handleSearchChange }
373+ placeholder = 'Search anything...'
374+ className = 'w-full bg-transparent py-[6px] font-base text-[14px] text-[var(--text-primary)] outline-none placeholder:text-[var(--text-muted)] focus:outline-none'
375+ />
376+ </ div >
377+ < Command . List className = 'scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent max-h-[400px] overflow-y-auto overflow-x-hidden p-[8px] [&_[cmdk-group]+[cmdk-group]]:mt-[10px]' >
378+ < Command . Empty className = 'flex items-center justify-center px-[16px] py-[24px] text-[14px] text-[var(--text-subtle)]' >
375379 No results found.
376380 </ Command . Empty >
377381
@@ -433,7 +437,7 @@ export function SearchModal({
433437 key = { workflow . id }
434438 value = { `${ workflow . name } workflow-${ workflow . id } ` }
435439 onSelect = { ( ) => handleWorkflowSelect ( workflow ) }
436- className = 'group flex h-[28px ] w-full cursor-pointer items-center gap-[8px] rounded-[6px] px-[10px ] text-left text-[15px ] aria-selected:bg -[var(--border)] aria-selected:shadow-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50'
440+ className = 'group flex h-[30px ] w-full cursor-pointer items-center gap-[8px] rounded-[8px] border border-transparent px-[8px ] text-left text-[14px ] aria-selected:border -[var(--border-1 )] aria-selected:bg-[var(--surface-5)] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 dark:aria-selected:bg-[var(--surface-4)] '
437441 >
438442 < div
439443 className = 'h-[14px] w-[14px] flex-shrink-0 rounded-[4px] border-[2px]'
@@ -443,7 +447,7 @@ export function SearchModal({
443447 backgroundClip : 'padding-box' ,
444448 } }
445449 />
446- < span className = 'truncate font-base text- [var(--text-tertiary )] group-aria-selected: text-[var(--text-primary )]' >
450+ < span className = 'truncate font-[var(--sidebar-font-weight )] text-[var(--text-body )]' >
447451 { workflow . name }
448452 { workflow . isCurrent && ' (current)' }
449453 </ span >
@@ -462,12 +466,12 @@ export function SearchModal({
462466 router . push ( task . href )
463467 onOpenChange ( false )
464468 } }
465- className = 'group flex h-[28px ] w-full cursor-pointer items-center gap-[8px] rounded-[6px] px-[10px ] text-left text-[15px ] aria-selected:bg -[var(--border)] aria-selected:shadow-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50'
469+ className = 'group flex h-[30px ] w-full cursor-pointer items-center gap-[8px] rounded-[8px] border border-transparent px-[8px ] text-left text-[14px ] aria-selected:border -[var(--border-1 )] aria-selected:bg-[var(--surface-5)] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 dark:aria-selected:bg-[var(--surface-4)] '
466470 >
467471 < div className = 'relative flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center' >
468- < Blimp className = 'h-[14px] w-[14px] text-[var(--text-tertiary)] group-aria-selected:text-[var(--text-primary )]' />
472+ < Blimp className = 'h-[14px] w-[14px] text-[var(--text-icon )]' />
469473 </ div >
470- < span className = 'truncate font-base text- [var(--text-tertiary )] group-aria-selected: text-[var(--text-primary )]' >
474+ < span className = 'truncate font-[var(--sidebar-font-weight )] text-[var(--text-body )]' >
471475 { task . name }
472476 </ span >
473477 </ Command . Item >
@@ -499,9 +503,9 @@ export function SearchModal({
499503 key = { workspace . id }
500504 value = { `${ workspace . name } workspace-${ workspace . id } ` }
501505 onSelect = { ( ) => handleWorkspaceSelect ( workspace ) }
502- className = 'group flex h-[28px ] w-full cursor-pointer items-center gap-[8px] rounded-[6px] px-[10px ] text-left text-[15px ] aria-selected:bg -[var(--border)] aria-selected:shadow-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50'
506+ className = 'group flex h-[30px ] w-full cursor-pointer items-center gap-[8px] rounded-[8px] border border-transparent px-[8px ] text-left text-[14px ] aria-selected:border -[var(--border-1 )] aria-selected:bg-[var(--surface-5)] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 dark:aria-selected:bg-[var(--surface-4)] '
503507 >
504- < span className = 'truncate font-base text- [var(--text-tertiary )] group-aria-selected: text-[var(--text-primary )]' >
508+ < span className = 'truncate font-[var(--sidebar-font-weight )] text-[var(--text-body )]' >
505509 { workspace . name }
506510 { workspace . isCurrent && ' (current)' }
507511 </ span >
@@ -536,12 +540,12 @@ export function SearchModal({
536540 key = { page . id }
537541 value = { `${ page . name } page-${ page . id } ` }
538542 onSelect = { ( ) => handlePageSelect ( page ) }
539- className = 'group flex h-[28px ] w-full cursor-pointer items-center gap-[8px] rounded-[6px] px-[10px ] text-left text-[15px ] aria-selected:bg -[var(--border)] aria-selected:shadow-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50'
543+ className = 'group flex h-[30px ] w-full cursor-pointer items-center gap-[8px] rounded-[8px] border border-transparent px-[8px ] text-left text-[14px ] aria-selected:border -[var(--border-1 )] aria-selected:bg-[var(--surface-5)] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 dark:aria-selected:bg-[var(--surface-4)] '
540544 >
541545 < div className = 'relative flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center' >
542- < Icon className = 'h-[14px] w-[14px] text-[var(--text-tertiary)] group-aria-selected:text-[var(--text-primary )]' />
546+ < Icon className = 'h-[14px] w-[14px] text-[var(--text-icon )]' />
543547 </ div >
544- < span className = 'truncate font-base text- [var(--text-tertiary )] group-aria-selected: text-[var(--text-primary )]' >
548+ < span className = 'truncate font-[var(--sidebar-font-weight )] text-[var(--text-body )]' >
545549 { page . name }
546550 </ span >
547551 { page . shortcut && (
@@ -563,7 +567,7 @@ export function SearchModal({
563567}
564568
565569const groupHeadingClassName =
566- '[&_[cmdk-group-heading]]:pt-[2px ] [&_[cmdk-group-heading]]:pb-[4px ] [&_[cmdk-group-heading]]:font-base [&_[cmdk-group-heading]]:text-[13px] [&_[cmdk-group-heading]]:text-[var(--text-subtle) ] [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide '
570+ '[&_[cmdk-group-heading]]:px-[8px ] [&_[cmdk-group-heading]]:pt-[2px ] [&_[cmdk-group-heading]]:pb-[6px] [&_[cmdk-group-heading]]:font-base [&_[cmdk-group-heading]]:text-[12px ] [&_[cmdk-group-heading]]:text-[var(--text-icon)] '
567571
568572interface CommandItemProps {
569573 value : string
@@ -589,7 +593,7 @@ const MemoizedCommandItem = memo(
589593 < Command . Item
590594 value = { value }
591595 onSelect = { onSelect }
592- className = 'group flex h-[28px ] w-full cursor-pointer items-center gap-[8px] rounded-[6px] px-[10px ] text-left text-[15px ] aria-selected:bg -[var(--border)] aria-selected:shadow-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50'
596+ className = 'group flex h-[30px ] w-full cursor-pointer items-center gap-[8px] rounded-[8px] border border-transparent px-[8px ] text-left text-[14px ] aria-selected:border -[var(--border-1 )] aria-selected:bg-[var(--surface-5)] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 dark:aria-selected:bg-[var(--surface-4)] '
593597 >
594598 < div
595599 className = 'relative flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center overflow-hidden rounded-[4px]'
@@ -600,11 +604,11 @@ const MemoizedCommandItem = memo(
600604 'transition-transform duration-100 group-hover:scale-110' ,
601605 showColoredIcon
602606 ? '!h-[10px] !w-[10px] text-white'
603- : 'h-[14px] w-[14px] text-[var(--text-tertiary)] group-aria-selected:text-[var(--text-primary )]'
607+ : 'h-[14px] w-[14px] text-[var(--text-icon )]'
604608 ) }
605609 />
606610 </ div >
607- < span className = 'truncate font-base text- [var(--text-tertiary )] group-aria-selected: text-[var(--text-primary )]' >
611+ < span className = 'truncate font-[var(--sidebar-font-weight )] text-[var(--text-body )]' >
608612 { children }
609613 </ span >
610614 </ Command . Item >
0 commit comments