Skip to content

Commit d893d0d

Browse files
feat: add command component and improve autocomplete and combobox (#602)
* feat: add command component and improve autocomplete and combobox * style: command improvements * refactor: improve command component structure and styling * refactor: remove specific type annotation for chipsRef in Combobox component
1 parent eff8f06 commit d893d0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2227
-435
lines changed

apps/ui/app/particles/search-field.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,16 @@ export default function SearchField({
155155
open={open}
156156
value={selectedItems}
157157
>
158-
<ComboboxChips className="rounded-xl p-[calc(--spacing(2)-1px)] before:rounded-xl">
159-
<HugeiconsIcon
160-
className="ms-[calc(--spacing(2)-1px)] me-[calc(--spacing(2)-1px)] size-5 shrink-0 opacity-80"
161-
icon={Search01Icon}
162-
strokeWidth={2}
163-
/>
158+
<ComboboxChips
159+
className="**:data-[slot=combobox-start-addon]:[&_svg]:-me-0.5 rounded-xl p-[calc(--spacing(2)-1px)] before:rounded-xl"
160+
startAddon={
161+
<HugeiconsIcon
162+
className="size-5.5 sm:size-5"
163+
icon={Search01Icon}
164+
strokeWidth={2}
165+
/>
166+
}
167+
>
164168
<ComboboxValue>
165169
{(
166170
value: { value: string; label: string; isComponent?: boolean }[],
@@ -193,8 +197,6 @@ export default function SearchField({
193197
<ComboboxInput
194198
aria-label="Search components"
195199
autoFocus
196-
className="ps-0"
197-
showClear
198200
size="lg"
199201
/>
200202
</>
@@ -206,7 +208,9 @@ export default function SearchField({
206208
<ComboboxList>
207209
{(group: (typeof groupedItems)[number]) => (
208210
<React.Fragment key={group.type}>
209-
{group.type === "disabled" && <ComboboxSeparator />}
211+
{group.type === "disabled" && (
212+
<ComboboxSeparator className="my-2" />
213+
)}
210214
<ComboboxGroup items={group.items}>
211215
<ComboboxGroupLabel>
212216
{group.type === "enabled"

0 commit comments

Comments
 (0)