2023-02-24 11:32:28 -06:00
import { StylesConfig } from "react-select" ;
const font =
"ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji" ;
export const styles : StylesConfig = {
option : ( styles , state ) = > ( {
. . . styles ,
fontFamily : font ,
cursor : "pointer" ,
2023-11-28 04:39:45 -06:00
backgroundColor : state.isSelected ? "oklch(var(--p))" : "inherit" ,
2023-02-24 11:32:28 -06:00
"&:hover" : {
2023-11-28 04:39:45 -06:00
backgroundColor : state.isSelected
? "oklch(var(--p))"
: "oklch(var(--nc))" ,
2023-02-24 11:32:28 -06:00
} ,
2024-08-30 09:54:27 -05:00
transition : "all 100ms" ,
2023-02-24 11:32:28 -06:00
} ) ,
2024-11-08 16:57:50 -06:00
menu : ( styles ) = > ( {
. . . styles ,
zIndex : 10 ,
} ) ,
2023-11-28 04:39:45 -06:00
control : ( styles , state ) = > ( {
2023-02-24 11:32:28 -06:00
. . . styles ,
fontFamily : font ,
2023-11-28 04:39:45 -06:00
borderRadius : "0.375rem" ,
border : state.isFocused
? "1px solid oklch(var(--p))"
: "1px solid oklch(var(--nc))" ,
boxShadow : "none" ,
2023-12-01 11:01:56 -06:00
minHeight : "2.6rem" ,
2023-02-24 11:32:28 -06:00
} ) ,
2023-11-28 04:39:45 -06:00
container : ( styles , state ) = > ( {
2023-02-24 11:32:28 -06:00
. . . styles ,
2023-11-28 04:39:45 -06:00
height : "full" ,
2023-03-25 09:17:34 -05:00
borderRadius : "0.375rem" ,
2023-02-24 11:32:28 -06:00
lineHeight : "1.25rem" ,
2023-05-01 15:00:23 -05:00
// "@media screen and (min-width: 1024px)": {
// fontSize: "0.875rem",
// },
2023-02-24 11:32:28 -06:00
} ) ,
input : ( styles ) = > ( {
. . . styles ,
cursor : "text" ,
} ) ,
dropdownIndicator : ( styles ) = > ( {
. . . styles ,
cursor : "pointer" ,
} ) ,
placeholder : ( styles ) = > ( {
. . . styles ,
borderColor : "black" ,
} ) ,
multiValue : ( styles ) = > {
return {
. . . styles ,
2024-08-30 01:38:58 -05:00
backgroundColor : "oklch(var(--b2))" ,
color : "oklch(var(--bc))" ,
display : "flex" ,
alignItems : "center" ,
gap : "0.1rem" ,
marginRight : "0.4rem" ,
2023-02-24 11:32:28 -06:00
} ;
} ,
multiValueLabel : ( styles ) = > ( {
. . . styles ,
2024-08-30 01:38:58 -05:00
color : "oklch(var(--bc))" ,
2023-02-24 11:32:28 -06:00
} ) ,
multiValueRemove : ( styles ) = > ( {
. . . styles ,
2024-08-30 01:38:58 -05:00
height : "1.2rem" ,
width : "1.2rem" ,
borderRadius : "100px" ,
transition : "all 100ms" ,
color : "oklch(var(--w))" ,
2023-02-24 11:32:28 -06:00
":hover" : {
2024-08-30 01:38:58 -05:00
color : "red" ,
backgroundColor : "oklch(var(--nc))" ,
2023-02-24 11:32:28 -06:00
} ,
} ) ,
2023-11-28 13:24:52 -06:00
menuPortal : ( base ) = > ( { . . . base , zIndex : 9999 } ) ,
2023-02-24 11:32:28 -06:00
} ;