Skip to content

Commit

Permalink
[filigran-ui] Filigran-ui fix command missing focus, combobox border,…
Browse files Browse the repository at this point in the history
… select placeholder
  • Loading branch information
jpkha committed Aug 29, 2024
1 parent 15fb3f1 commit 209a81a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/filigran-ui/src/components/clients/combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function Combobox({
variant="outline"
role="combobox"
aria-expanded={open}
className={cn('w-full justify-between', className)}
className={cn('w-full justify-between border-input', className)}
onClick={() => setOpen(!open)}>
{value ? (
dataTab.find((data) => data.value === value)?.label
Expand All @@ -70,7 +70,7 @@ function Combobox({
<ChevronDown className="h-4 cursor-pointer text-muted-foreground" />
</Button>
</PopoverTrigger>
<PopoverContent className="popover-content-width-same-as-its-trigger p-0">
<PopoverContent className="p-0 popover-content-width-same-as-its-trigger">
<Command onChange={handleSearchInputChange}>
<CommandInput placeholder={placeholder} />
<CommandList>
Expand Down
2 changes: 1 addition & 1 deletion packages/filigran-ui/src/components/clients/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const CommandItem = React.forwardRef<
<CommandPrimitive.Item
ref={ref}
className={cn(
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-muted-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',
className
)}
{...props}
Expand Down
3 changes: 1 addition & 2 deletions packages/filigran-ui/src/components/clients/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ const Select = SelectPrimitive.Root
const SelectGroup = SelectPrimitive.Group

const SelectValue = SelectPrimitive.Value

const SelectTrigger = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
>(({className, children, ...props}, ref) => (
<SelectPrimitive.Trigger
ref={ref}
className={cn(
'flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-s py-xs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
'flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-s py-xs text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1',
className
)}
{...props}>
Expand Down

0 comments on commit 209a81a

Please sign in to comment.