diff --git a/src/components/input/SelectInput.tsx b/src/components/input/SelectInput.tsx index 2571efc5..1eb3ccd8 100644 --- a/src/components/input/SelectInput.tsx +++ b/src/components/input/SelectInput.tsx @@ -95,7 +95,7 @@ const CustomControl = < return ( -
+
{shouldShowAdornment && startAdornment} {children}
@@ -118,7 +118,7 @@ const CustomMenuList = < {children} {options.length > 0 && isLoading && ( -
+
)} @@ -204,16 +204,11 @@ const SelectInput = (props: SelectInputProps) => { }; return ( -
+
{label && ( (props: SelectInputProps) => { ...(!startAdornment && { control: ({ isFocused, isDisabled }) => cn( - 'w-full min-h-12! rounded border bg-white transition-shadow cursor-pointer!', + 'w-full min-h-12! rounded-lg! border bg-white transition-shadow cursor-pointer!', { 'border-red-500! ring-2 ring-red-200': isError, 'border-indigo-500 ring-2 ring-indigo-200': isFocused, - 'border-gray-300': !isError && !isFocused, + 'border-base-content/10!': !isError && !isFocused, 'bg-gray-100 text-gray-400 cursor-not-allowed': isDisabled, } ), - valueContainer: () => cn('flex-1 px-4! py-2! gap-1'), + valueContainer: () => cn('flex-1 p-3! py-2! gap-1'), }), placeholder: () => cn({ 'text-gray-400': !isError, 'text-red-300!': isError }), singleValue: () => cn({ 'text-gray-900': !isError, 'text-error!': isError }), - input: () => cn('text-gray-900'), + input: () => cn('text-gray-900 m-0! p-0!'), indicatorsContainer: () => cn('flex items-center gap-1 pr-2'), dropdownIndicator: ({ isFocused }) => - cn('p-1 rounded hover:bg-gray-100', { + cn('p-1! rounded hover:bg-gray-100', { 'text-gray-900': isFocused, 'text-gray-500': !isFocused, 'text-error!': isError, }), + clearIndicator: () => cn('p-1! rounded hover:bg-gray-100'), menu: () => - cn('border border-gray-200 rounded! bg-base-100 shadow-lg!'), - menuList: () => cn('p-2! max-h-60 overflow-auto'), + cn( + 'border border-base-content/5 rounded-xl! bg-base-100 shadow-lg! my-1.5!' + ), + menuList: () => cn('p-0! max-h-60 overflow-auto'), option: ({ isFocused, isSelected }) => - cn('mt-1 px-3 py-2 rounded-md cursor-pointer!', { + cn('px-3 py-2 rounded-md cursor-pointer!', { 'bg-indigo-600 text-white': isFocused, 'bg-blue-500!': isSelected, 'text-gray-700': !isFocused && !isSelected, @@ -287,13 +285,17 @@ const SelectInput = (props: SelectInputProps) => { multiValue: ({ getValue, index }) => { const selectedValues = getValue() as T[]; return cn( - 'bg-indigo-50 rounded py-0.5 pl-2 pr-1 flex items-center gap-1!', + 'bg-base-200! rounded-lg! py-[3px] px-2.5 m-0! flex items-center gap-1! w-fit gap-2!', selectedValues[index]?.className ); }, + multiValueRemove: () => cn('p-0! w-3 h-3'), multiValueLabel: ({ getValue, index }) => { const selectedValues = getValue() as T[]; - return cn('text-indigo-700', selectedValues[index]?.labelClassName); + return cn( + 'p-0! text-base-content! text-xs!', + selectedValues[index]?.labelClassName + ); }, }} components={{