2024-12-11 18:45:46 -05:00
|
|
|
import { Input } from 'antd';
|
|
|
|
|
import styled from 'styled-components';
|
|
|
|
|
|
2025-04-30 11:21:41 -04:00
|
|
|
import { getColor } from '@components/theme/utils';
|
|
|
|
|
|
2025-04-16 16:55:38 -07:00
|
|
|
import { colors, typography } from '@src/alchemy-components/theme';
|
|
|
|
|
|
2025-04-22 19:16:01 +03:00
|
|
|
export const StyledSearchBar = styled(Input)<{ $width?: string; $height?: string }>`
|
|
|
|
|
height: ${(props) => props.$height};
|
2024-12-11 18:45:46 -05:00
|
|
|
width: ${(props) => props.$width};
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
border-radius: 8px;
|
2025-08-20 18:37:02 -04:00
|
|
|
border: 1px solid ${colors.gray[100]};
|
|
|
|
|
box-shadow: 0px 1px 2px 0px rgba(33, 23, 95, 0.07);
|
|
|
|
|
transition: all 0.1s ease;
|
|
|
|
|
|
|
|
|
|
&.ant-input-affix-wrapper {
|
|
|
|
|
border: 1px solid ${colors.gray[100]};
|
|
|
|
|
|
|
|
|
|
&:not(.ant-input-affix-wrapper-disabled) {
|
|
|
|
|
&:hover {
|
|
|
|
|
border-color: ${colors.gray[100]};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:focus,
|
|
|
|
|
&-focused {
|
|
|
|
|
border-color: ${(props) => props.theme.styles['primary-color']};
|
|
|
|
|
box-shadow: 0px 0px 0px 2px ${colors.violet[100]};
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-11 18:45:46 -05:00
|
|
|
|
|
|
|
|
input {
|
|
|
|
|
color: ${colors.gray[600]};
|
|
|
|
|
font-size: ${typography.fontSizes.md} !important;
|
2025-08-20 18:37:02 -04:00
|
|
|
background-color: transparent;
|
|
|
|
|
|
|
|
|
|
&::placeholder {
|
|
|
|
|
color: ${colors.gray[400]};
|
|
|
|
|
}
|
2024-12-11 18:45:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ant-input-prefix {
|
|
|
|
|
width: 20px;
|
2025-08-20 18:37:02 -04:00
|
|
|
color: ${colors.gray[400]};
|
|
|
|
|
margin-right: 4px;
|
2024-12-11 18:45:46 -05:00
|
|
|
|
|
|
|
|
svg {
|
|
|
|
|
height: 16px;
|
|
|
|
|
width: 16px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
|
&:focus,
|
|
|
|
|
&:focus-within {
|
2025-04-30 11:21:41 -04:00
|
|
|
border-color: ${({ theme }) => getColor('primary', 300, theme)} !important;
|
2024-12-11 18:45:46 -05:00
|
|
|
box-shadow: none !important;
|
|
|
|
|
}
|
2025-08-20 18:37:02 -04:00
|
|
|
|
|
|
|
|
&.ant-input-affix-wrapper-focused {
|
|
|
|
|
border-color: ${(props) => props.theme.styles['primary-color']};
|
|
|
|
|
box-shadow: 0px 0px 0px 2px ${colors.violet[100]};
|
|
|
|
|
}
|
2024-12-11 18:45:46 -05:00
|
|
|
`;
|